Memory Leak in thermal/core Package

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

GSD-2022-1002749: thermal/core: Fix memory leak in __thermal_cooling_device_register(). Affects Kernel versions >= 8ea229511e06f9635ecc338dcbe0db41a73623f0, < 9abdf0c0184230f0cb5c6685aabf33dda89aa9fb. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The thermal/core package is a component of the Linux Kernel that manages thermal cooling devices. It provides an interface for registering and controlling cooling devices to prevent overheating of hardware components. The package is responsible for monitoring temperature sensors and adjusting cooling mechanisms accordingly. However, a vulnerability has been identified in the package that can lead to a memory leak.

Vulnerability Detail

The vulnerability, identified as GSD-2022-1002749, exists in the __thermal_cooling_device_register() function of the thermal/core package. When a cooling device is registered, memory is allocated for its data structure. However, due to a coding error, this memory is not properly freed when the device is unregistered. As a result, a memory leak occurs, leading to a gradual depletion of available memory resources. This can potentially cause system instability or even denial of service if the memory exhaustion reaches critical levels.

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, users can manually free the memory allocated for cooling devices by modifying the code in the __thermal_cooling_device_unregister() function. The following code snippet demonstrates the necessary modification:

void __thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
{
    // Existing code
    ...

    // Add deallocation of memory
    kfree(cdev);
}

Conclusion

In conclusion, the thermal/core package in the Linux Kernel is vulnerable to a memory leak issue. This vulnerability can lead to memory exhaustion and system instability. To mitigate the risk, it is recommended to update the kernel to version v5.18.3 or later. Alternatively, a workaround is available by modifying the __thermal_cooling_device_unregister() function to manually deallocate memory. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability can lead to a memory leak, gradually depleting available memory resources. This can result in system instability or denial of service if memory exhaustion reaches critical levels.

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, and Vulert will analyze it for any open-source vulnerabilities, including this memory leak in the thermal/core package.

Yes, a patch for this vulnerability is available in the Linux Kernel version v5.18.3. It is recommended to update to this version or a later one to fix the memory leak issue.

While updating the kernel is the recommended solution, you can apply the provided workaround by modifying the __thermal_cooling_device_unregister() function to manually deallocate memory. However, it is still advisable to update the kernel to ensure a comprehensive fix.

There are no known instances of this vulnerability being exploited in the wild. However, it is essential to address the issue promptly to prevent any potential memory exhaustion and system instability.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback