# CVE-2025-38389: drm/i915/gt: Fix timeline left held on VMA alloc error

> 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, NVD) `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.31% (percentile 16, 2026-11-26)
- **Published:** 2025-07-25T12:53:29.394Z
- **Modified:** 2026-06-17T09:16:45.570Z

## Who should check

- Anyone running Linux \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 60b757730884e4a223152a68d9b5f625dac94119; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< e47d7d6edc40a6ace7cc04e5893759fee68569f5; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< f10af34261448610d4048ac6e6af87f80e3881a4; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 4c778c96e469fb719b11683e0a3be8ea68052fa2; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 40e09506aea1fde1f3e0e04eca531bbb23404baf; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 5a7ae7bebdc4c2ecd48a2c061319956f65c09473; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< c542d62883f62ececafcb630a1c5010133826bea; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< a5aa7bc1fca78c7fa127d9e33aa94a0c9066c1d6
- Anyone running Linux 5.4

## Description

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

drm/i915/gt: Fix timeline left held on VMA alloc error

The following error has been reported sporadically by CI when a test
unbinds the i915 driver on a ring submission platform:

\<4\> \[239.330153\] ------------\[ cut here \]------------
\<4\> \[239.330166\] i915 0000:00:02.0: \[drm\] drm\_WARN\_ON(dev\_priv-\>mm.shrink\_count)
\<4\> \[239.330196\] WARNING: CPU: 1 PID: 18570 at drivers/gpu/drm/i915/i915\_gem.c:1309 i915\_gem\_cleanup\_early+0x13e/0x150 \[i915\]
...
\<4\> \[239.330640\] RIP: 0010:i915\_gem\_cleanup\_early+0x13e/0x150 \[i915\]
...
\<4\> \[239.330942\] Call Trace:
\<4\> \[239.330944\]  \<TASK\>
\<4\> \[239.330949\]  i915\_driver\_late\_release+0x2b/0xa0 \[i915\]
\<4\> \[239.331202\]  i915\_driver\_release+0x86/0xa0 \[i915\]
\<4\> \[239.331482\]  devm\_drm\_dev\_init\_release+0x61/0x90
\<4\> \[239.331494\]  devm\_action\_release+0x15/0x30
\<4\> \[239.331504\]  release\_nodes+0x3d/0x120
\<4\> \[239.331517\]  devres\_release\_all+0x96/0xd0
\<4\> \[239.331533\]  device\_unbind\_cleanup+0x12/0x80
\<4\> \[239.331543\]  device\_release\_driver\_internal+0x23a/0x280
\<4\> \[239.331550\]  ? bus\_find\_device+0xa5/0xe0
\<4\> \[239.331563\]  device\_driver\_detach+0x14/0x20
...
\<4\> \[357.719679\] ---\[ end trace 0000000000000000 \]---

If the test also unloads the i915 module then that's followed with:

\<3\> \[357.787478\] =============================================================================
\<3\> \[357.788006\] BUG i915\_vma (Tainted: G     U  W        N ): Objects remaining on \_\_kmem\_cache\_shutdown()
\<3\> \[357.788031\] -----------------------------------------------------------------------------
\<3\> \[357.788204\] Object 0xffff888109e7f480 @offset=29824
\<3\> \[357.788670\] Allocated in i915\_vma\_instance+0xee/0xc10 \[i915\] age=292729 cpu=4 pid=2244
\<4\> \[357.788994\]  i915\_vma\_instance+0xee/0xc10 \[i915\]
\<4\> \[357.789290\]  init\_status\_page+0x7b/0x420 \[i915\]
\<4\> \[357.789532\]  intel\_engines\_init+0x1d8/0x980 \[i915\]
\<4\> \[357.789772\]  intel\_gt\_init+0x175/0x450 \[i915\]
\<4\> \[357.790014\]  i915\_gem\_init+0x113/0x340 \[i915\]
\<4\> \[357.790281\]  i915\_driver\_probe+0x847/0xed0 \[i915\]
\<4\> \[357.790504\]  i915\_pci\_probe+0xe6/0x220 \[i915\]
...

Closer analysis of CI results history has revealed a dependency of the
error on a few IGT tests, namely:
- igt@api\_intel\_allocator@fork-simple-stress-signal,
- igt@api\_intel\_allocator@two-level-inception-interruptible,
- igt@gem\_linear\_blits@interruptible,
- igt@prime\_mmap\_coherency@ioctl-errors,
which invisibly trigger the issue, then exhibited with first driver unbind
attempt.

All of the above tests perform actions which are actively interrupted with
signals.  Further debugging has allowed to narrow that scope down to
DRM\_IOCTL\_I915\_GEM\_EXECBUFFER2, and ring\_context\_alloc(), specific to ring
submission, in particular.

If successful then that function, or its execlists or GuC submission
equivalent, is supposed to be called only once per GEM context engine,
followed by raise of a flag that prevents the function from being called
again.  The function is expected to unwind its internal errors itself, so
it may be safely called once more after it returns an error.

In case of ring submission, the function first gets a reference to the
engine's legacy timeline and then allocates a VMA.  If the VMA allocation
fails, e.g. when i915\_vma\_instance() called from inside is interrupted
with a signal, then ring\_context\_alloc() fails, leaving the timeline held
referenced.  On next I915\_GEM\_EXECBUFFER2 IOCTL, another reference to the
timeline is got, and only that last one is put on successful completion.
As a consequence, the legacy timeline, with its underlying engine status
page's VMA object, is still held and not released on driver unbind.

Get the legacy timeline only after successful allocation of the context
engine's VMA.

v2: Add a note on other submission methods (Krzysztof Karas):
    Both execlists and GuC submission use lrc\_alloc() which seems free
    from a similar issue.

(cherry picked from commit cc43422b3cc79eacff4c5a8ba0d224688ca9dd4f)

## Affected and fixed versions

- Linux: \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 60b757730884e4a223152a68d9b5f625dac94119; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< e47d7d6edc40a6ace7cc04e5893759fee68569f5; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< f10af34261448610d4048ac6e6af87f80e3881a4; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 4c778c96e469fb719b11683e0a3be8ea68052fa2; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 40e09506aea1fde1f3e0e04eca531bbb23404baf; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 5a7ae7bebdc4c2ecd48a2c061319956f65c09473; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< c542d62883f62ececafcb630a1c5010133826bea; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< a5aa7bc1fca78c7fa127d9e33aa94a0c9066c1d6 (cvelist)
- Linux: 5.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38389.md
Affected: Linux >= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, < 60b757730884e4a223152a68d9b5f625dac94119; >= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, < e47d7d6edc40a6ace7cc04e5893759fee68569f5; >= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, < f10af34261448610d4048ac6e6af87f80e3881a4; >= 75d0a7f31eec8ec4a53b448…
Fixed in: Linux 60b757730884e4a223152a68d9b5f625dac94119, Linux 4c778c96e469fb719b11683e0a3be8ea68052fa2, Linux 40e09506aea1fde1f3e0e04eca531bbb23404baf, Linux 5a7ae7bebdc4c2ecd48a2c061319956f65c09473

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-2025-38389 being exploited?

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

### How serious is CVE-2025-38389?

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

### Which versions are affected by CVE-2025-38389?

Linux \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 60b757730884e4a223152a68d9b5f625dac94119; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< e47d7d6edc40a6ace7cc04e5893759fee68569f5; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< f10af34261448610d4048ac6e6af87f80e3881a4; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 4c778c96e469fb719b11683e0a3be8ea68052fa2; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 40e09506aea1fde1f3e0e04eca531bbb23404baf; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< 5a7ae7bebdc4c2ecd48a2c061319956f65c09473; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< c542d62883f62ececafcb630a1c5010133826bea; \>= 75d0a7f31eec8ec4a53b4485905800e09dc5091f, \< a5aa7bc1fca78c7fa127d9e33aa94a0c9066c1d6; Linux 5.4.

### Is there a fix for CVE-2025-38389?

Yes. Fixed in Linux 60b757730884e4a223152a68d9b5f625dac94119, Linux 4c778c96e469fb719b11683e0a3be8ea68052fa2, Linux 40e09506aea1fde1f3e0e04eca531bbb23404baf, Linux 5a7ae7bebdc4c2ecd48a2c061319956f65c09473. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-38389?

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/60b757730884e4a223152a68d9b5f625dac94119>
- patch: <https://git.kernel.org/stable/c/e47d7d6edc40a6ace7cc04e5893759fee68569f5>
- patch: <https://git.kernel.org/stable/c/f10af34261448610d4048ac6e6af87f80e3881a4>
- patch: <https://git.kernel.org/stable/c/4c778c96e469fb719b11683e0a3be8ea68052fa2>
- patch: <https://git.kernel.org/stable/c/40e09506aea1fde1f3e0e04eca531bbb23404baf>
- patch: <https://git.kernel.org/stable/c/5a7ae7bebdc4c2ecd48a2c061319956f65c09473>
- patch: <https://git.kernel.org/stable/c/c542d62883f62ececafcb630a1c5010133826bea>
- patch: <https://git.kernel.org/stable/c/a5aa7bc1fca78c7fa127d9e33aa94a0c9066c1d6>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## 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-2025-38389>

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