NULL Pointer Dereference in Linux Kernel's clk_hw_get_clk Function
Summary
CVE-2022-49187: In the Linux kernel, the following vulnerability has been resolved: clk: Fix clk_hw_get_clk() when dev is NULL Any registered clk_core structure can have a NULL pointer in its dev field. Affects linux versions < 5.17.3-1. Fixed in 5.17.3-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is a core component of many operating systems, providing essential services for hardware management and system operations. It is widely used in various distributions, including Debian. The kernel's clk subsystem manages clock signals for devices, ensuring proper timing and synchronization. This vulnerability arises from improper handling of NULL pointers in the clk_hw_get_clk function, which can lead to system instability and crashes.
Vulnerability Detail
In the Linux kernel, a vulnerability exists in the clk subsystem where the clk_hw_get_clk function does not adequately check for NULL device pointers. This oversight can lead to a NULL pointer dereference when the function attempts to access the device name using dev_name(). The issue stems from the fact that clk_core structures can be registered with a NULL device pointer, which is not well-documented but is evidenced by the usage patterns of clk_register and clk_hw_register. The potential ramifications include system crashes and instability, particularly in environments where the affected functions are invoked.
How To Fix
Minimum fixed version
5.17.3-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to apply the available patch by updating the kernel.
Conclusion
The CVE-2022-49187 vulnerability in the Linux kernel poses a significant risk due to its potential to cause system instability through NULL pointer dereferences. Users are strongly encouraged to update their kernel to the patched version to mitigate this risk. Regular monitoring and prompt updates are essential for maintaining system security.
See every vulnerability recorded for linux →
FAQ
CVE-2022-49187 is a vulnerability in the Linux kernel's clk subsystem that can lead to a NULL pointer dereference.
This vulnerability can cause system crashes and instability when the clk_hw_get_clk function is called with a NULL device pointer.
Yes, a patch is available in version 5.17.3-1 of the Linux kernel. Users should update to this version or later.
While there are no specific workarounds, it is advisable to monitor your system for any unusual behavior and plan to apply the update as soon as possible.
You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading a manifest file like package-lock.json, you can check for vulnerabilities without needing to access the code.
Related vulnerabilities
Recent vulnerabilities recorded for linux.