Vulnerability in Kernel package: clk: Fix clk_hw_get_clk() when dev is NULL
Summary
GSD-2022-1001497: clk: Fix clk_hw_get_clk() when dev is NULL. Affects Kernel versions >= 30d6f8c15d2cd877c1f3d47d8a1064649ebe58e2, < d183f20cf5a7b546d4108e796b98210ceb317579. 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, responsible for managing the system's resources and providing an interface between hardware and software. It includes various subsystems, such as the clock framework (clk), which handles clock-related operations. The clk_hw_get_clk() function is used to retrieve the parent clock of a given clock hardware (clk_hw) instance. However, a vulnerability has been discovered in this function when the device (dev) parameter is NULL, leading to potential security issues.
Vulnerability Detail
The vulnerability in the clk_hw_get_clk() function arises from a failure to handle the case when the dev parameter is NULL. This can occur in certain scenarios, such as during initialization or when accessing clock information for a device that is not yet fully initialized. An attacker could potentially exploit this vulnerability to cause a denial-of-service (DoS) condition or execute arbitrary code with elevated privileges. The impact and attack plausibility of this vulnerability have not been proven yet.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, developers can manually modify the affected code to handle the NULL dev parameter appropriately. The following code snippet demonstrates the necessary modification:
if (!dev)
return ERR_PTR(-EINVAL);
Conclusion
In conclusion, a vulnerability has been identified in the Kernel package, specifically in the clk_hw_get_clk() function when the dev parameter is NULL. This vulnerability could potentially lead to a denial-of-service (DoS) condition or arbitrary code execution. To mitigate the risk, it is recommended to update the Linux Kernel package to version v5.16.19 or later. Developers can also apply a workaround by modifying the affected code. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability could range from a denial-of-service (DoS) condition to potential execution of arbitrary code with elevated privileges. However, the actual impact and attack plausibility have not been proven yet.
You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just a manifest file like package-lock.json.
Yes, a patch for this vulnerability is available in the Linux Kernel version v5.16.19. It is recommended to update to this version or a later one to fix the issue.
Yes, a workaround is available. Developers can modify the affected code to handle the NULL dev parameter appropriately. Please refer to the 'workaround' section for the necessary code modification.
You can find more information about this vulnerability in the vulnerability database maintained by the Cloud Security Alliance. The specific vulnerability ID is GSD-2022-1001497, and the source can be accessed at https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1001xxx/GSD-2022-1001497.json.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.