# CVE-2024-26939: drm/i915/vma: Fix UAF on destroy against retire race

> 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.25% (percentile 17, 2026-12-03)
- **CWE:** CWE-416
- **Published:** 2024-05-01T05:17:44.370Z
- **Modified:** 2026-08-05T11:28:28.848Z

## Who should check

- Anyone running Linux \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 704edc9252f4988ae1ad7dafa23d0db8d90d7190; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 59b2626dd8c8a2e13f18054b3530e0c00073d79f; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 0e45882ca829b26b915162e8e86dbb1095768e9e
- Anyone running Linux 5.19

## Description

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

drm/i915/vma: Fix UAF on destroy against retire race

Object debugging tools were sporadically reporting illegal attempts to
free a still active i915 VMA object when parking a GT believed to be idle.

\[161.359441\] ODEBUG: free active (active state 0) object: ffff88811643b958 object type: i915\_active hint: \_\_i915\_vma\_active+0x0/0x50 \[i915\]
\[161.360082\] WARNING: CPU: 5 PID: 276 at lib/debugobjects.c:514 debug\_print\_object+0x80/0xb0
...
\[161.360304\] CPU: 5 PID: 276 Comm: kworker/5:2 Not tainted 6.5.0-rc1-CI\_DRM\_13375-g003f860e5577+ \#1
\[161.360314\] Hardware name: Intel Corporation Rocket Lake Client Platform/RocketLake S UDIMM 6L RVP, BIOS RKLSFWI1.R00.3173.A03.2204210138 04/21/2022
\[161.360322\] Workqueue: i915-unordered \_\_intel\_wakeref\_put\_work \[i915\]
\[161.360592\] RIP: 0010:debug\_print\_object+0x80/0xb0
...
\[161.361347\] debug\_object\_free+0xeb/0x110
\[161.361362\] i915\_active\_fini+0x14/0x130 \[i915\]
\[161.361866\] release\_references+0xfe/0x1f0 \[i915\]
\[161.362543\] i915\_vma\_parked+0x1db/0x380 \[i915\]
\[161.363129\] \_\_gt\_park+0x121/0x230 \[i915\]
\[161.363515\] \_\_\_\_intel\_wakeref\_put\_last+0x1f/0x70 \[i915\]

That has been tracked down to be happening when another thread is
deactivating the VMA inside \_\_active\_retire() helper, after the VMA's
active counter has been already decremented to 0, but before deactivation
of the VMA's object is reported to the object debugging tool.

We could prevent from that race by serializing i915\_active\_fini() with
\_\_active\_retire() via ref-\>tree\_lock, but that wouldn't stop the VMA from
being used, e.g. from \_\_i915\_vma\_retire() called at the end of
\_\_active\_retire(), after that VMA has been already freed by a concurrent
i915\_vma\_destroy() on return from the i915\_active\_fini().  Then, we should
rather fix the issue at the VMA level, not in i915\_active.

Since \_\_i915\_vma\_parked() is called from \_\_gt\_park() on last put of the
GT's wakeref, the issue could be addressed by holding the GT wakeref long
enough for \_\_active\_retire() to complete before that wakeref is released
and the GT parked.

I believe the issue was introduced by commit d93939730347 ("drm/i915:
Remove the vma refcount") which moved a call to i915\_active\_fini() from
a dropped i915\_vma\_release(), called on last put of the removed VMA kref,
to i915\_vma\_parked() processing path called on last put of a GT wakeref.
However, its visibility to the object debugging tool was suppressed by a
bug in i915\_active that was fixed two weeks later with commit e92eb246feb9
("drm/i915/active: Fix missing debug object activation").

A VMA associated with a request doesn't acquire a GT wakeref by itself.
Instead, it depends on a wakeref held directly by the request's active
intel\_context for a GT associated with its VM, and indirectly on that
intel\_context's engine wakeref if the engine belongs to the same GT as the
VMA's VM.  Those wakerefs are released asynchronously to VMA deactivation.

Fix the issue by getting a wakeref for the VMA's GT when activating it,
and putting that wakeref only after the VMA is deactivated.  However,
exclude global GTT from that processing path, otherwise the GPU never goes
idle.  Since \_\_i915\_vma\_retire() may be called from atomic contexts, use
async variant of wakeref put.  Also, to avoid circular locking dependency,
take care of acquiring the wakeref before VM mutex when both are needed.

v7: Add inline comments with justifications for:
    - using untracked variants of intel\_gt\_pm\_get/put() (Nirmoy),
    - using async variant of \_put(),
    - not getting the wakeref in case of a global GTT,
    - always getting the first wakeref outside vm-\>mutex.
v6: Since \_\_i915\_vma\_active/retire() callbacks are not serialized, storing
    a wakeref tracking handle inside struct i915\_vma is not safe, and
    there is no other good place for that.  Use untracked variants of
    intel\_gt\_pm\_get/put\_async().
v5: Replace "tile" with "GT" across commit description (Rodrigo),
  - 
---truncated---

## Affected and fixed versions

- Linux: \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 704edc9252f4988ae1ad7dafa23d0db8d90d7190; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 59b2626dd8c8a2e13f18054b3530e0c00073d79f; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 0e45882ca829b26b915162e8e86dbb1095768e9e (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 0e45882ca829b26b915162e8e86dbb1095768e9e or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-26939.md
Affected: Linux >= d93939730347360db0afe6a4367451b6f84ab7b1, < 704edc9252f4988ae1ad7dafa23d0db8d90d7190; >= d93939730347360db0afe6a4367451b6f84ab7b1, < 5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5; >= d93939730347360db0afe6a4367451b6f84ab7b1, < 59b2626dd8c8a2e13f18054b3530e0c00073d79f; >= d93939730347360db0afe6a…
Fixed in: Linux 704edc9252f4988ae1ad7dafa23d0db8d90d7190, Linux 5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5, Linux 59b2626dd8c8a2e13f18054b3530e0c00073d79f, Linux 0e45882ca829b26b915162e8e86dbb1095768e9e

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-2024-26939 being exploited?

There is no confirmed exploitation: CVE-2024-26939 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-12-03).

### How serious is CVE-2024-26939?

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

### Which versions are affected by CVE-2024-26939?

Linux \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 704edc9252f4988ae1ad7dafa23d0db8d90d7190; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 59b2626dd8c8a2e13f18054b3530e0c00073d79f; \>= d93939730347360db0afe6a4367451b6f84ab7b1, \< 0e45882ca829b26b915162e8e86dbb1095768e9e; Linux 5.19.

### Is there a fix for CVE-2024-26939?

Yes. Fixed in Linux 704edc9252f4988ae1ad7dafa23d0db8d90d7190, Linux 5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5, Linux 59b2626dd8c8a2e13f18054b3530e0c00073d79f, Linux 0e45882ca829b26b915162e8e86dbb1095768e9e. Upgrade Linux to 0e45882ca829b26b915162e8e86dbb1095768e9e or later.

### How do I check if I'm affected by CVE-2024-26939?

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/704edc9252f4988ae1ad7dafa23d0db8d90d7190>
- patch: <https://git.kernel.org/stable/c/5e3eb862df9f972ab677fb19e0d4b9b1be8db7b5>
- patch: <https://git.kernel.org/stable/c/59b2626dd8c8a2e13f18054b3530e0c00073d79f>
- patch: <https://git.kernel.org/stable/c/0e45882ca829b26b915162e8e86dbb1095768e9e>

## 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-2024-26939>

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