CVE-2024-36961: thermal/debugfs: Fix two locking issues with thermal zone debug

Published Jun 3, 2024
·
Updated

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

thermal/debugfs: Fix two locking issues with thermal zone debug

The Linux kernel CVE team has assigned CVE-2024-36961 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024060344-CVE-2024-36961-58bb@gregkh/T

Other sources

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 tzeseqstart().

Moreover, thermaldebugtzremove() is not called under the thermal zone lock, so it can run in parallel with the other functions accessing the thermal zone's struct thermaldebugfs object. Then, it may clear tz->debugfs after one of those functions has checked it and the struct thermaldebugfs object may be freed prematurely.

To address the first problem, pass a pointer to the thermal zone's struct thermaldebugfs object to debugfscreatefile() in thermaldebugtzadd() and make tzeseqstart(), tzeseqnext(), tzeseqstop(), and tzeseqshow() retrieve it from s->private instead of a pointer to the thermal zone object. This will ensure that tzdebugfs will be valid across the "mitigations" file accesses until thermaldebugfsremoveid() called by thermaldebugtzremove() removes that file.

To address the second problem, use tz->lock in thermaldebugtzremove() 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+

NVD

Affected Software

10 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.133-16.12.22-16.12.25-1
redhat/kernel<6.8.10
6.8.10
redhat/kernel<6.9
6.9
Linux Linux kernel>=6.8<6.8.10
Linux Linux kernel=6.9-rc1
Linux Linux kernel=6.9-rc2
Linux Linux kernel=6.9-rc3
Linux Linux kernel=6.9-rc4
Linux Linux kernel=6.9-rc5
Linux Linux kernel=6.9-rc6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.133-1Fixed in 6.12.22-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.8.10
  3. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.9
  4. Upgrade

    Upgrade linux-kernel to a version that resolves this vulnerability.

    Patch CVE-2024-36961

Event History

Jun 3, 2024
CVE Published
via MITRE·07:49 AM
Data Sourced
via MITRE·07:49 AM
DescriptionSeverity
Data Sourced
via NVD·08:15 AM
Description
Data Sourced
via NVD·08:15 AM
RemedySeverityWeaknessAffected Software
Jun 4, 2024
Data Sourced
via Red Hat·04:20 PM
DescriptionSeverityAffected Software
Aug 8, 2024
Data Sourced
via Launchpad·11:27 PM
Description
Dec 2, 2024
Data Sourced
via Ubuntu·11:54 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-36961?

CVE-2024-36961 has a moderate severity rating due to the potential impact on thermal zone debugging functions in the Linux kernel.

2

How do I fix CVE-2024-36961?

To address CVE-2024-36961, update to the recommended kernel versions provided by your distribution's security advisories.

3

What versions of Linux are affected by CVE-2024-36961?

CVE-2024-36961 affects various versions of the Linux kernel, specifically those prior to 6.8.10 for Red Hat and specific versions for Debian.

4

Is CVE-2024-36961 a local or remote vulnerability?

CVE-2024-36961 is considered a local vulnerability as it primarily impacts user space interactions with the thermal subsystem.

5

What components are involved in CVE-2024-36961?

CVE-2024-36961 involves debugging components within the thermal subsystem of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203