Vulnerability in ARM: hisi Package - Missing of_node_put after of_find_compatible_node
Summary
GSD-2022-1003871: ARM: hisi: Add missing of_node_put after of_find_compatible_node. Affects Kernel versions < dd4be8ecfb41a29e7c4e551b4e866157ce4a3429. 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 ARM: hisi package is a component of the Linux Kernel, which is responsible for supporting ARM-based Hisilicon SoCs. It provides necessary drivers and functionalities for these specific system-on-chips. The vulnerability in question arises from a missing of_node_put function call after of_find_compatible_node. This vulnerability affects versions of the Linux Kernel prior to v4.19.247.
Vulnerability Detail
The vulnerability stems from a missing of_node_put function call after of_find_compatible_node in the ARM: hisi package. This oversight can lead to a resource leak, potentially causing memory corruption or other unexpected behavior. Attackers may exploit this vulnerability to execute arbitrary code, escalate privileges, or cause a denial-of-service condition. It is crucial to address this vulnerability promptly to mitigate potential security risks.
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 add the missing of_node_put function call after of_find_compatible_node in the affected code. Here is an example of the modified code:
// Original code
node = of_find_compatible_node(NULL, NULL, "compatible-string");
// Modified code
node = of_find_compatible_node(NULL, NULL, "compatible-string");
of_node_put(node);
Conclusion
The vulnerability in the ARM: hisi package, caused by a missing of_node_put function call after of_find_compatible_node, can have severe security implications. It is crucial to update the Linux Kernel to version v4.19.247 or later to mitigate this vulnerability. Alternatively, developers can apply the provided workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
This vulnerability can potentially lead to memory corruption, resource leaks, and unexpected behavior. Attackers may exploit it to execute arbitrary code, escalate privileges, or cause a denial-of-service condition.
Versions of the Linux Kernel prior to v4.19.247 are affected by this vulnerability.
To fix this vulnerability, update the Linux Kernel to version v4.19.247 or later, which includes the necessary commit to address the issue.
Yes, a workaround is available. Developers can manually add the missing of_node_put function call after of_find_compatible_node in the affected code.
For more information about this vulnerability, refer to the provided references link in the vulnerability details.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.