{"id":"CVE-2024-50028","state":"PUBLISHED","title":"thermal: core: Reference count the zone in thermal_zone_get_by_id()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: Reference count the zone in thermal_zone_get_by_id()\n\nThere are places in the thermal netlink code where nothing prevents\nthe thermal zone object from going away while being accessed after it\nhas been returned by thermal_zone_get_by_id().\n\nTo address this, make thermal_zone_get_by_id() get a reference on the\nthermal zone device object to be returned with the help of get_device(),\nunder thermal_list_lock, and adjust all of its callers to this change\nwith the help of the cleanup.h infrastructure.","publishedAt":"2024-10-21T19:39:31.809Z","updatedAt":"2026-08-05T11:41:04.376Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00","status":"affected","lessThan":"c95538b286efc6109c987e97a051bc7844ede802","versionType":"git"},{"version":"1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00","status":"affected","lessThan":"a42a5839f400e929c489bb1b58f54596c4535167","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c","drivers/thermal/thermal_core.h","drivers/thermal/thermal_netlink.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"6.11.4","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c","drivers/thermal/thermal_core.h","drivers/thermal/thermal_netlink.c"]}],"references":["https://git.kernel.org/stable/c/c95538b286efc6109c987e97a051bc7844ede802","https://git.kernel.org/stable/c/a42a5839f400e929c489bb1b58f54596c4535167"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50028.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50028","state":"PUBLISHED","datePublished":"2024-10-21T19:39:31.809Z","dateUpdated":"2026-08-05T11:41:04.376Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T12:17:06.066Z"},"containers":{"cna":{"title":"thermal: core: Reference count the zone in thermal_zone_get_by_id()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: Reference count the zone in thermal_zone_get_by_id()\n\nThere are places in the thermal netlink code where nothing prevents\nthe thermal zone object from going away while being accessed after it\nhas been returned by thermal_zone_get_by_id().\n\nTo address this, make thermal_zone_get_by_id() get a reference on the\nthermal zone device object to be returned with the help of get_device(),\nunder thermal_list_lock, and adjust all of its callers to this change\nwith the help of the cleanup.h infrastructure."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00","status":"affected","lessThan":"c95538b286efc6109c987e97a051bc7844ede802","versionType":"git"},{"version":"1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00","status":"affected","lessThan":"a42a5839f400e929c489bb1b58f54596c4535167","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c","drivers/thermal/thermal_core.h","drivers/thermal/thermal_netlink.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"6.11.4","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c","drivers/thermal/thermal_core.h","drivers/thermal/thermal_netlink.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c95538b286efc6109c987e97a051bc7844ede802"},{"url":"https://git.kernel.org/stable/c/a42a5839f400e929c489bb1b58f54596c4535167"}],"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 vulnerable handlers are reached through the thermal generic-netlink family via a local AF_NETLINK socket, not from any remote peer. Per kernel scoring guidance, netlink-reachable code is Local.\nAC:L - The attacker fully controls and can continuously repeat the read side (unlimited TZ_GET_TEMP/TRIP/GOV requests from many threads), and the free side leaves a very wide window (list_del under thermal_list_lock, then cancel_delayed_work_sync, device_del and wait_for_completion before kfree), so a zone teardown from any routine event (driver/module removal, device hot-unplug, power-supply/charger removal, CPU hotplug or suspend/resume) is reliably won; the stale pointer can also be held across preemption.\nPR:L - The thermal genl ops carry no GENL_ADMIN_PERM or GENL_UNS_ADMIN_PERM flag, so genl_family_rcv_msg() applies no capability check — any unprivileged local user can open NETLINK_GENERIC and issue these commands with an arbitrary zone id.\nUI:N - Exploitation is entirely driven by the attacker's own netlink requests plus a concurrent zone teardown; no victim action is needed at any point.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - Contents of the freed thermal_zone_device are copied directly back to the attacker in the netlink reply — trip temperatures/types, the governor name via a stale tz->governor pointer dereference, and a trip loop bounded by num_trips read from freed memory, giving an effectively unbounded heap read primitive after reclaim.\nI:H - The handlers write into the freed object (mutex_lock on tz->lock) and, in the GET_TEMP path, make an indirect call through tz->ops.get_temp read out of freed slab memory, which after a heap spray yields attacker-controlled control-flow hijack and arbitrary kernel modification.\nA:H - Even unweaponized, dereferencing and locking the freed thermal zone (and calling a stale ops pointer) causes memory corruption and kernel oops/panic, repeatable at will by an unprivileged process."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:41:04.376Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.11.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-50028","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-22T13:26:28.280587Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-22T13:28:46.203Z"}}]}}}