# CVE-2026-31731: thermal: core: Address thermal zone removal races with resume

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.14% (percentile 2, 2026-11-28)
- **CWE:** CWE-416, CWE-362
- **Published:** 2026-05-01T14:14:30.177Z
- **Modified:** 2026-11-11T21:10:00.200Z

## Who should check

- Anyone running Linux \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 1a6d2b001eb730d85f00da39ae7db6f3b4edc540; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 2dbe93f344f10b432b95a23304006be805c097a1; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< c4593f1654f7dea3bcf9bb1851ded86311d4f370; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 45b859b0728267a6199ee5002d62e6c6f3e8c89d
- Anyone running Linux 6.8

## Description

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

thermal: core: Address thermal zone removal races with resume

Since thermal\_zone\_pm\_complete() and thermal\_zone\_device\_resume()
re-initialize the poll\_queue delayed work for the given thermal zone,
the cancel\_delayed\_work\_sync() in thermal\_zone\_device\_unregister()
may miss some already running work items and the thermal zone may
be freed prematurely \[1\].

There are two failing scenarios that both start with
running thermal\_pm\_notify\_complete() right before invoking
thermal\_zone\_device\_unregister() for one of the thermal zones.

In the first scenario, there is a work item already running for
the given thermal zone when thermal\_pm\_notify\_complete() calls
thermal\_zone\_pm\_complete() for that thermal zone and it continues to
run when thermal\_zone\_device\_unregister() starts.  Since the poll\_queue
delayed work has been re-initialized by thermal\_pm\_notify\_complete(), the
running work item will be missed by the cancel\_delayed\_work\_sync() in
thermal\_zone\_device\_unregister() and if it continues to run past the
freeing of the thermal zone object, a use-after-free will occur.

In the second scenario, thermal\_zone\_device\_resume() queued up by
thermal\_pm\_notify\_complete() runs right after the thermal\_zone\_exit()
called by thermal\_zone\_device\_unregister() has returned.  The poll\_queue
delayed work is re-initialized by it before cancel\_delayed\_work\_sync() is
called by thermal\_zone\_device\_unregister(), so it may continue to run
after the freeing of the thermal zone object, which also leads to a
use-after-free.

Address the first failing scenario by ensuring that no thermal work
items will be running when thermal\_pm\_notify\_complete() is called.
For this purpose, first move the cancel\_delayed\_work() call from
thermal\_zone\_pm\_complete() to thermal\_zone\_pm\_prepare() to prevent
new work from entering the workqueue going forward.  Next, switch
over to using a dedicated workqueue for thermal events and update
the code in thermal\_pm\_notify() to flush that workqueue after
thermal\_pm\_notify\_prepare() has returned which will take care of
all leftover thermal work already on the workqueue (that leftover
work would do nothing useful anyway because all of the thermal zones
have been flagged as suspended).

The second failing scenario is addressed by adding a tz-\>state check
to thermal\_zone\_device\_resume() to prevent it from re-initializing
the poll\_queue delayed work if the thermal zone is going away.

Note that the above changes will also facilitate relocating the suspend
and resume of thermal zones closer to the suspend and resume of devices,
respectively.

## Affected and fixed versions

- Linux: \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 1a6d2b001eb730d85f00da39ae7db6f3b4edc540; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 2dbe93f344f10b432b95a23304006be805c097a1; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< c4593f1654f7dea3bcf9bb1851ded86311d4f370; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 45b859b0728267a6199ee5002d62e6c6f3e8c89d (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 45b859b0728267a6199ee5002d62e6c6f3e8c89d or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31731. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31731.md
Affected: Linux >= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, < 1a6d2b001eb730d85f00da39ae7db6f3b4edc540; >= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, < 2dbe93f344f10b432b95a23304006be805c097a1; >= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, < c4593f1654f7dea3bcf9bb1851ded86311d4f370; >= 5a5efdaffda5d23717d9117…
Fixed in: Linux 1a6d2b001eb730d85f00da39ae7db6f3b4edc540, Linux 2dbe93f344f10b432b95a23304006be805c097a1, Linux 45b859b0728267a6199ee5002d62e6c6f3e8c89d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31731 being exploited?

There is no confirmed exploitation: CVE-2026-31731 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.14% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31731?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31731?

Linux \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 1a6d2b001eb730d85f00da39ae7db6f3b4edc540; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 2dbe93f344f10b432b95a23304006be805c097a1; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< c4593f1654f7dea3bcf9bb1851ded86311d4f370; \>= 5a5efdaffda5d23717d9117cf36cda9eafcf2fae, \< 45b859b0728267a6199ee5002d62e6c6f3e8c89d; Linux 6.8.

### Is there a fix for CVE-2026-31731?

Yes. Fixed in Linux 1a6d2b001eb730d85f00da39ae7db6f3b4edc540, Linux 2dbe93f344f10b432b95a23304006be805c097a1, Linux 45b859b0728267a6199ee5002d62e6c6f3e8c89d. Upgrade Linux to 45b859b0728267a6199ee5002d62e6c6f3e8c89d or later.

### How do I check if I'm affected by CVE-2026-31731?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1a6d2b001eb730d85f00da39ae7db6f3b4edc540>
- patch: <https://git.kernel.org/stable/c/2dbe93f344f10b432b95a23304006be805c097a1>
- patch: <https://git.kernel.org/stable/c/c4593f1654f7dea3bcf9bb1851ded86311d4f370>
- patch: <https://git.kernel.org/stable/c/45b859b0728267a6199ee5002d62e6c6f3e8c89d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31731>

HTML: <https://flawdb.com/CVE-2026-31731> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31731>
