{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-31731", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2026-03-09T15:48:24.137Z", "datePublished": "2026-05-01T14:14:30.177Z", "dateUpdated": "2026-08-05T12:24:52.873Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T12:24:52.873Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: Address thermal zone removal races with resume\n\nSince thermal_zone_pm_complete() and thermal_zone_device_resume()\nre-initialize the poll_queue delayed work for the given thermal zone,\nthe cancel_delayed_work_sync() in thermal_zone_device_unregister()\nmay miss some already running work items and the thermal zone may\nbe freed prematurely [1].\n\nThere are two failing scenarios that both start with\nrunning thermal_pm_notify_complete() right before invoking\nthermal_zone_device_unregister() for one of the thermal zones.\n\nIn the first scenario, there is a work item already running for\nthe given thermal zone when thermal_pm_notify_complete() calls\nthermal_zone_pm_complete() for that thermal zone and it continues to\nrun when thermal_zone_device_unregister() starts. Since the poll_queue\ndelayed work has been re-initialized by thermal_pm_notify_complete(), the\nrunning work item will be missed by the cancel_delayed_work_sync() in\nthermal_zone_device_unregister() and if it continues to run past the\nfreeing of the thermal zone object, a use-after-free will occur.\n\nIn the second scenario, thermal_zone_device_resume() queued up by\nthermal_pm_notify_complete() runs right after the thermal_zone_exit()\ncalled by thermal_zone_device_unregister() has returned. The poll_queue\ndelayed work is re-initialized by it before cancel_delayed_work_sync() is\ncalled by thermal_zone_device_unregister(), so it may continue to run\nafter the freeing of the thermal zone object, which also leads to a\nuse-after-free.\n\nAddress the first failing scenario by ensuring that no thermal work\nitems will be running when thermal_pm_notify_complete() is called.\nFor this purpose, first move the cancel_delayed_work() call from\nthermal_zone_pm_complete() to thermal_zone_pm_prepare() to prevent\nnew work from entering the workqueue going forward. Next, switch\nover to using a dedicated workqueue for thermal events and update\nthe code in thermal_pm_notify() to flush that workqueue after\nthermal_pm_notify_prepare() has returned which will take care of\nall leftover thermal work already on the workqueue (that leftover\nwork would do nothing useful anyway because all of the thermal zones\nhave been flagged as suspended).\n\nThe second failing scenario is addressed by adding a tz->state check\nto thermal_zone_device_resume() to prevent it from re-initializing\nthe poll_queue delayed work if the thermal zone is going away.\n\nNote that the above changes will also facilitate relocating the suspend\nand resume of thermal zones closer to the suspend and resume of devices,\nrespectively." } ], "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 code is reached through local power-management and device lifecycle paths, specifically resume notification racing with thermal zone unregister. It is not reachable from network packet handling or user-namespace-only subsystems.\nAC:L - The race can be stimulated repeatedly by driving resume completion and device/driver removal paths, and syzbot reproduced the UAF through such lifecycle concurrency. Under the required rule, this is Low because the attacker can influence both sides in a local scenario.\nPR:L - Exploitation requires local access to exercise PM/hotplug or device-management paths; there is no unauthenticated remote path. Where raw kernel knobs are root-owned, PR:L is the higher-severity defensible choice for local authenticated deployments.\nUI:N - No separate victim action is required once the attacker can drive the local lifecycle operations. The race is between kernel workqueue, PM notifier, and unregister paths.\nS:U - The impact remains within the kernel’s own security authority. This is standard kernel memory corruption, not a VM escape, IOMMU bypass, or cross-scope boundary violation.\nC:H - This is a use-after-free of a thermal zone object containing locks, work, state, callbacks, and pointers. Per kernel UAF guidance, reclaimed-object control can support high-impact information disclosure.\nI:H - The stale work can operate on freed and potentially reallocated kernel memory, including reinitializing embedded work and using object fields/callbacks. Per UAF guidance, this is high integrity impact due to potential memory corruption and control-flow abuse.\nA:H - Syzbot observed a KASAN slab-use-after-free in thermal_zone_device_check, and the stale work can dereference freed kernel memory. This can reliably crash or panic the kernel." } ] } ], "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": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae", "lessThan": "1a6d2b001eb730d85f00da39ae7db6f3b4edc540", "status": "affected", "versionType": "git" }, { "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae", "lessThan": "2dbe93f344f10b432b95a23304006be805c097a1", "status": "affected", "versionType": "git" }, { "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae", "lessThan": "c4593f1654f7dea3bcf9bb1851ded86311d4f370", "status": "affected", "versionType": "git" }, { "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae", "lessThan": "45b859b0728267a6199ee5002d62e6c6f3e8c89d", "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.8", "status": "affected" }, { "version": "0", "lessThan": "6.8", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.83", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.18.22", "lessThanOrEqual": "6.18.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.19.12", "lessThanOrEqual": "6.19.*", "status": "unaffected", "versionType": "semver" }, { "version": "7.0", "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.8", "versionEndExcluding": "6.12.83" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.8", "versionEndExcluding": "6.18.22" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.8", "versionEndExcluding": "6.19.12" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.8", "versionEndExcluding": "7.0" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/1a6d2b001eb730d85f00da39ae7db6f3b4edc540" }, { "url": "https://git.kernel.org/stable/c/2dbe93f344f10b432b95a23304006be805c097a1" }, { "url": "https://git.kernel.org/stable/c/c4593f1654f7dea3bcf9bb1851ded86311d4f370" }, { "url": "https://git.kernel.org/stable/c/45b859b0728267a6199ee5002d62e6c6f3e8c89d" } ], "title": "thermal: core: Address thermal zone removal races with resume", "x_generator": { "engine": "bippy-1.2.0" } } } }