Vulnerability in Kernel package: clk: Fix clk_hw_get_clk() when dev is NULL
Summary
GSD-2022-1001179: clk: Fix clk_hw_get_clk() when dev is NULL. Affects Kernel versions >= 30d6f8c15d2cd877c1f3d47d8a1064649ebe58e2, < 23f89fe005b105f0dcc55034c13eb89f9b570fac. No fix is published. 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 Kernel package is a crucial component of the Linux operating system. It provides the core functionality and interfaces for various hardware devices and system resources. The clk module within the Kernel package is responsible for managing clock sources and clock consumers. Clocks are essential for synchronizing operations and ensuring proper timing in a system. However, a vulnerability has been discovered in the clk module that affects the clk_hw_get_clk() function when the 'dev' parameter is NULL.
Vulnerability Detail
The vulnerability in the clk module arises from a flaw in the clk_hw_get_clk() function when it is called with a NULL 'dev' parameter. This flaw can lead to a NULL pointer dereference, causing a system crash or potential privilege escalation. An attacker may exploit this vulnerability to crash the system or execute arbitrary code with elevated privileges. The vulnerability was introduced in version v5.11 of the Linux Kernel and has been fixed in version v5.17.2.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel package to version v5.17.2 or later. This update includes the necessary patch to address the NULL pointer dereference issue in the clk_hw_get_clk() function. Users can obtain the updated Kernel package from the official Linux Kernel repository.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can avoid passing a NULL 'dev' parameter to the clk_hw_get_clk() function. This can be achieved by ensuring that the 'dev' parameter is always valid before calling the function. Here is an example code snippet demonstrating the workaround:
if (dev != NULL) {
clk_hw_get_clk(dev);
}
Conclusion
In conclusion, a vulnerability has been discovered in the Kernel package's clk module, specifically in the clk_hw_get_clk() function when the 'dev' parameter is NULL. This vulnerability can lead to a system crash or potential privilege escalation. It is crucial to update the Linux Kernel package to version v5.17.2 or later to fix this vulnerability. In the meantime, a temporary workaround is available by ensuring the 'dev' parameter is not NULL when calling the clk_hw_get_clk() function. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can result in a system crash or potential privilege escalation, allowing an attacker to execute arbitrary code with elevated privileges.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will analyze and alert you in real-time.
Yes, the vulnerability has been fixed in version v5.17.2 of the Linux Kernel package. It is recommended to update to this version or a later one to mitigate the vulnerability.
Yes, a temporary workaround is available. By ensuring that the 'dev' parameter passed to the clk_hw_get_clk() function is not NULL, you can mitigate the vulnerability. Refer to the 'workaround' section for an example code snippet.
You can find more information about this vulnerability in the GSD-2022-1001179 entry of the GSD database maintained by the Cloud Security Alliance. The entry can be accessed at https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1001xxx/GSD-2022-1001179.json.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.