# CVE-2024-36932: thermal/debugfs: Prevent use-after-free from occurring after cdev removal

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 12% of CVEs (2026-11-30)
- Published: 2024-05-30T15:29:23.178Z
- Modified: 2026-06-17T07:37:23.513Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

thermal/debugfs: Prevent use-after-free from occurring after cdev removal

Since thermal_debug_cdev_remove() does not run under cdev->lock, it can
run in parallel with thermal_debug_cdev_state_update() and it may free
the struct thermal_debugfs object used by the latter after it has been
checked against NULL.

If that happens, thermal_debug_cdev_state_update() will access memory
that has been freed already causing the kernel to crash.

Address this by using cdev->lock in thermal_debug_cdev_remove() around
the cdev->debugfs value check (in case the same cdev is removed at the
same time in two different threads) and its reset to NULL.

Cc :6.8+ <stable@vger.kernel.org> # 6.8+

(As written by CVE List.)

## Affected

- Linux Linux: from 755113d7678681a137c330f7997ceb680adb644e before c1279dee33369e2525f532364bb87207d23b9481; from 755113d7678681a137c330f7997ceb680adb644e before d351eb0ab04c3e8109895fc33250cebbce9c11da; 6.8 (not affected: before 6.8; from 6.8.10 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 755113d76786 before c1279dee3336; from 755113d76786 before d351eb0ab04c; 6.8; from 6.8 before 6.8.10 (not affected: before 6.8; 6.8.10; 6.9)

## References

- <https://git.kernel.org/stable/c/c1279dee33369e2525f532364bb87207d23b9481> (patch)
- <https://git.kernel.org/stable/c/d351eb0ab04c3e8109895fc33250cebbce9c11da> (patch)

## Sources

- CVE List: [CVE-2024-36932](https://www.cve.org/CVERecord?id=CVE-2024-36932), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-36932](https://nvd.nist.gov/vuln/detail/CVE-2024-36932), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-36932 · Whole record: https://cve.day/CVE-2024-36932.json · Rebuilt by cve.day 2026-11-25T22:58:41.287Z
