{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50027","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-10-21T12:17:06.066Z","datePublished":"2024-10-21T19:39:31.141Z","dateUpdated":"2026-08-05T11:41:03.310Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:41:03.310Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: Free tzp copy along with the thermal zone\n\nThe object pointed to by tz->tzp may still be accessed after being\nfreed in thermal_zone_device_unregister(), so move the freeing of it\nto the point after the removal completion has been completed at which\nit cannot be accessed any more."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The dangling `tz->tzp` is reached through the thermal generic-netlink family (AF_NETLINK socket, init netns) and the world-readable `/sys/class/thermal/thermal_zoneN/{slope,offset,k_*,sustainable_powe r}` attributes, and the free side is a local device/driver teardown; no remote peer parses any of this data.\nAC:L - The attacker drives the surviving side of the race itself — a tight loop of `THERMAL_GENL_CMD_TZ_GET_TEMP`/`TZ_GET_TRIP` pins the zone with `get_device()` while unregistration proceeds — and the freed window spans `device_del()` teardown, a netlink multicast delete notification and an unbounded `wait_for_completion()`, which is wide enough to reliably reclaim the 48-byte `tzp` from the heavily-trafficked kmalloc-64 cache; the attempt is repeatable at will.\nPR:L - None of the thermal genl ops set `GENL_ADMIN_PERM` (`thermal_genl_ops[]`), and `thermal_zone_get_by_id()` performs no capability check, so an ordinary unprivileged local user obtains and holds the zone reference; the `tzp` sysfs show handlers are likewise world-readable at 0444/0644.\nUI:N - The attacker's netlink polling loop needs no cooperation from any other user, and the unregistration it races is ordinary system activity (charger/battery power-supply removal, transceiver or CPU-package zone teardown, driver rebind) rather than an action the attacker must induce a victim to perform.\nS:U - The corrupted memory is kernel slab memory managed by the same kernel security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - `thermal_zone_get_slope()`/`thermal_zone_get_offset()` and the power-allocator PID code read the freed `tzp`, and those values propagate into the temperature returned over netlink and sysfs, disclosing whatever kernel object has since been allocated into the reclaimed kmalloc-64 slot; as with any UAF the stale pointer generalises into an arbitrary-read primitive once the attacker controls the reallocation.\nI:H - The dangling pointer is also written through — `estimate_pid_constants()`/`get_sustainable_power()` store into `tz->tzp->k_po`, `k_pu`, `k_i` and `sustainable_power`, and the `sustainable_power`/`k_*`/`slope`/`offset` sysfs store handlers assign directly through `tz->tzp` — giving a heap write into a reallocated, groomable kmalloc-64 object and thus corruption of adjacent kernel structures usable for control-flow hijack and privilege escalation.\nA:H - Dereferencing the freed `tzp` (plus the `def_governor` fallback entering `power_allocator_manage()` with `tz->governor_data` already NULLed) produces slab use-after-free corruption and oops/panic, and an unprivileged user can retry the race indefinitely."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c"],"versions":[{"version":"3d439b1a2ad36c8b4ea151c8de25309d60d17407","lessThan":"eabe285e1c629a719d6e68fc319939c63b83bf22","status":"affected","versionType":"git"},{"version":"3d439b1a2ad36c8b4ea151c8de25309d60d17407","lessThan":"bdb0d40507c85bee33c2a71fde7b2e857346f112","status":"affected","versionType":"git"},{"version":"3d439b1a2ad36c8b4ea151c8de25309d60d17407","lessThan":"827a07525c099f54d3b15110408824541ec66b3c","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c"],"versions":[{"version":"6.4","status":"affected"},{"version":"0","lessThan":"6.4","status":"unaffected","versionType":"semver"},{"version":"6.6.60","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.11.4","lessThanOrEqual":"6.11.*","status":"unaffected","versionType":"semver"},{"version":"6.12","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.6.60"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.11.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.12"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/eabe285e1c629a719d6e68fc319939c63b83bf22"},{"url":"https://git.kernel.org/stable/c/bdb0d40507c85bee33c2a71fde7b2e857346f112"},{"url":"https://git.kernel.org/stable/c/827a07525c099f54d3b15110408824541ec66b3c"}],"title":"thermal: core: Free tzp copy along with the thermal zone","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-50027","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-22T13:26:36.583525Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-10-22T13:28:46.345Z"}}]}}