Memory Leak in thermal/core Package
Summary
GSD-2022-1003089: thermal/core: Fix memory leak in __thermal_cooling_device_register(). Affects Kernel versions >= 8ea229511e06f9635ecc338dcbe0db41a73623f0, < 3802171f0b5b8b831f4ade5c827547cb323a5bb2. 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 thermal/core package is a component of the Linux Kernel that manages thermal cooling devices. These devices are responsible for regulating the temperature of various components in a system, such as CPUs and GPUs. The package provides APIs and functions for registering and controlling cooling devices. However, a vulnerability has been discovered in the package that leads to a memory leak when registering a cooling device.
Vulnerability Detail
The vulnerability, identified as GSD-2022-1003089, originates from a memory leak in the __thermal_cooling_device_register() function within the thermal/core package. When this function is called to register a cooling device, it fails to release allocated memory in certain scenarios. As a result, memory resources are not properly freed, leading to a memory leak. Although the impact and attack plausibility of this vulnerability have not been proven, it has the potential to exhaust system memory over time, resulting in performance degradation or even system instability.
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 release the allocated memory after calling __thermal_cooling_device_register(). This can be achieved by adding a call to the appropriate memory deallocation function, such as kfree(), immediately after the registration function. Here is an example of the workaround code:
__thermal_cooling_device_register(device);
kfree(device);
Conclusion
In conclusion, the thermal/core package in the Linux Kernel is vulnerable to a memory leak issue in the __thermal_cooling_device_register() function. This vulnerability can potentially lead to memory exhaustion and system instability. It is recommended to update the kernel to version v5.17.14 or later to fix the issue. Alternatively, developers can apply the provided workaround to manually release the allocated memory. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
While the impact of this vulnerability has not been proven, it has the potential to cause memory exhaustion over time, leading to performance degradation or system instability.
You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will provide real-time alerts for open-source vulnerabilities, including this one.
Yes, the vulnerability is fixed in Linux Kernel version v5.17.14. It is recommended to update your kernel to this version or a later one to mitigate the issue.
Yes, a workaround is available. You can manually release the allocated memory after calling __thermal_cooling_device_register(). Please refer to the 'workaround' section for the code example.
As of now, there are no known exploits for this vulnerability. However, it is still important to apply the fix or workaround to ensure system security.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.