CVE-2024-36961: thermal/debugfs: Fix two locking issues with thermal zone debug
In the Linux kernel, the following vulnerability has been resolved:
thermal/debugfs: Fix two locking issues with thermal zone debug
With the current thermal zone locking arrangement in the debugfs code,
user space can open the "mitigations" file for a thermal zone before
the zone's debugfs pointer is set which will result in a NULL pointer
dereference in tze_seq_start().
Moreover, thermal_debug_tz_remove() is not called under the thermal
zone lock, so it can run in parallel with the other functions accessing
the thermal zone's struct thermal_debugfs object. Then, it may clear
tz->debugfs after one of those functions has checked it and the
struct thermal_debugfs object may be freed prematurely.
To address the first problem, pass a pointer to the thermal zone's
struct thermal_debugfs object to debugfs_create_file() in
thermal_debug_tz_add() and make tze_seq_start(), tze_seq_next(),
tze_seq_stop(), and tze_seq_show() retrieve it from s->private
instead of a pointer to the thermal zone object. This will ensure
that tz_debugfs will be valid across the "mitigations" file accesses
until thermal_debugfs_remove_id() called by thermal_debug_tz_remove()
removes that file.
To address the second problem, use tz->lock in thermal_debug_tz_remove()
around the tz->debugfs value check (in case the same thermal zone is
removed at the same time in two different threads) and its reset to NULL.
Cc :6.8+ <stable@vger.kernel.org> # 6.8+
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue affects thermal zone debugfs handling. A local user-space interaction with the thermal “mitigations” debug file can trigger unsafe locking behavior, including a NULL pointer dereference and premature freeing of debugfs state. Business impact is unclear from the sources because no CVSS, CWE, or exploit report is provided.
Executive priority
Treat this as a targeted kernel maintenance item, not an emergency based on the supplied evidence. Patch during the next kernel update cycle, faster for multi-user Linux systems or environments exposing debugfs. Reassess priority if vendors publish higher severity, exploitability, or distribution-specific impact details.
Technical view
The flaw is in Linux thermal/debugfs locking. The vulnerable code can expose a thermal zone file before its debugfs pointer is initialized, causing tze_seq_start() to dereference NULL. Removal can also race with readers because thermal_debug_tz_remove() was not protected by the thermal zone lock, allowing tz->debugfs to be cleared and freed while in use.
Likely exposure
Exposure is most likely on systems running affected Linux kernels listed in the CVE source, including 6.8, 6.8.10, and 6.9, where thermal debugfs paths are present and reachable. The bundle does not identify affected distributions, configurations, or whether debugfs must be mounted for practical reachability.
Exploitation context
The source bundle does not report active exploitation, public exploit code, or KEV listing. The described trigger involves user-space access to a thermal zone debugfs file, suggesting local reachability, but the bundle does not define required privileges, impact beyond kernel fault conditions, or reliable exploitation paths.
Researcher notes
The key fix changes debugfs file private data from the thermal zone object to struct thermal_debugfs and adds locking in thermal_debug_tz_remove(). The bundle supports a race/NULL dereference analysis but does not establish privilege escalation, denial-of-service severity, or exploit reliability.
Mitigation direction
Prioritize kernel updates that include the referenced stable fixes.
Check your Linux distribution’s advisory for fixed package versions.
Limit access to debugfs where operationally feasible.
Review systems running Linux 6.8-series or 6.9 kernels first.
Avoid direct wrangler or deployment assumptions; this CVE is kernel-level only.
Validation and detection
Inventory kernel versions across Linux hosts and appliances.
Check whether debugfs is mounted and accessible to users.
Confirm vendor kernel packages include the referenced stable commits.
Review logs for kernel NULL dereference or thermal debugfs faults.
Track CVE status for later CVSS or distribution advisories.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-36961 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.