# CVE-2025-38449: drm/gem: Acquire references on GEM handles for framebuffers

> 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.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-07-25T15:27:30.702Z
- **Modified:** 2026-10-15T22:18:41.470Z

## Who should check

- Anyone running Linux \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< cb4c956a15f8b7f870649454771fc3761f504b5f; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 08480e285c6a82ce689008d643e4a51db0aaef8b; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 3cf520d9860d4ec9f7f32068825da31f18dd3f25; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 5307dce878d4126e1b375587318955bd019c3741
- Anyone running Linux 3.12

## Description

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

drm/gem: Acquire references on GEM handles for framebuffers

A GEM handle can be released while the GEM buffer object is attached
to a DRM framebuffer. This leads to the release of the dma-buf backing
the buffer object, if any. \[1\] Trying to use the framebuffer in further
mode-setting operations leads to a segmentation fault. Most easily
happens with driver that use shadow planes for vmap-ing the dma-buf
during a page flip. An example is shown below.

\[  156.791968\] ------------\[ cut here \]------------
\[  156.796830\] WARNING: CPU: 2 PID: 2255 at drivers/dma-buf/dma-buf.c:1527 dma\_buf\_vmap+0x224/0x430
\[...\]
\[  156.942028\] RIP: 0010:dma\_buf\_vmap+0x224/0x430
\[  157.043420\] Call Trace:
\[  157.045898\]  \<TASK\>
\[  157.048030\]  ? show\_trace\_log\_lvl+0x1af/0x2c0
\[  157.052436\]  ? show\_trace\_log\_lvl+0x1af/0x2c0
\[  157.056836\]  ? show\_trace\_log\_lvl+0x1af/0x2c0
\[  157.061253\]  ? drm\_gem\_shmem\_vmap+0x74/0x710
\[  157.065567\]  ? dma\_buf\_vmap+0x224/0x430
\[  157.069446\]  ? \_\_warn.cold+0x58/0xe4
\[  157.073061\]  ? dma\_buf\_vmap+0x224/0x430
\[  157.077111\]  ? report\_bug+0x1dd/0x390
\[  157.080842\]  ? handle\_bug+0x5e/0xa0
\[  157.084389\]  ? exc\_invalid\_op+0x14/0x50
\[  157.088291\]  ? asm\_exc\_invalid\_op+0x16/0x20
\[  157.092548\]  ? dma\_buf\_vmap+0x224/0x430
\[  157.096663\]  ? dma\_resv\_get\_singleton+0x6d/0x230
\[  157.101341\]  ? \_\_pfx\_dma\_buf\_vmap+0x10/0x10
\[  157.105588\]  ? \_\_pfx\_dma\_resv\_get\_singleton+0x10/0x10
\[  157.110697\]  drm\_gem\_shmem\_vmap+0x74/0x710
\[  157.114866\]  drm\_gem\_vmap+0xa9/0x1b0
\[  157.118763\]  drm\_gem\_vmap\_unlocked+0x46/0xa0
\[  157.123086\]  drm\_gem\_fb\_vmap+0xab/0x300
\[  157.126979\]  drm\_atomic\_helper\_prepare\_planes.part.0+0x487/0xb10
\[  157.133032\]  ? lockdep\_init\_map\_type+0x19d/0x880
\[  157.137701\]  drm\_atomic\_helper\_commit+0x13d/0x2e0
\[  157.142671\]  ? drm\_atomic\_nonblocking\_commit+0xa0/0x180
\[  157.147988\]  drm\_mode\_atomic\_ioctl+0x766/0xe40
\[...\]
\[  157.346424\] ---\[ end trace 0000000000000000 \]---

Acquiring GEM handles for the framebuffer's GEM buffer objects prevents
this from happening. The framebuffer's cleanup later puts the handle
references.

Commit 1a148af06000 ("drm/gem-shmem: Use dma\_buf from GEM object
instance") triggers the segmentation fault easily by using the dma-buf
field more widely. The underlying issue with reference counting has
been present before.

v2:
- acquire the handle instead of the BO (Christian)
- fix comment style (Christian)
- drop the Fixes tag (Christian)
- rename err\_ gotos
- add missing Link tag

## Affected and fixed versions

- Linux: \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< cb4c956a15f8b7f870649454771fc3761f504b5f; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 08480e285c6a82ce689008d643e4a51db0aaef8b; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 3cf520d9860d4ec9f7f32068825da31f18dd3f25; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 5307dce878d4126e1b375587318955bd019c3741 (cvelist)
- Linux: 3.12 (cvelist)

## Mitigation

- Upgrade Linux to 5307dce878d4126e1b375587318955bd019c3741 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38449.md
Affected: Linux >= 319c933c71f3dbdb2b3274d1634d3494c70efa06, < cb4c956a15f8b7f870649454771fc3761f504b5f; >= 319c933c71f3dbdb2b3274d1634d3494c70efa06, < 08480e285c6a82ce689008d643e4a51db0aaef8b; >= 319c933c71f3dbdb2b3274d1634d3494c70efa06, < 3cf520d9860d4ec9f7f32068825da31f18dd3f25; >= 319c933c71f3dbdb2b3274d…
Fixed in: Linux 08480e285c6a82ce689008d643e4a51db0aaef8b, Linux 3cf520d9860d4ec9f7f32068825da31f18dd3f25, Linux 5307dce878d4126e1b375587318955bd019c3741

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-38449 being exploited?

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

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

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

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

Linux \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< cb4c956a15f8b7f870649454771fc3761f504b5f; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 08480e285c6a82ce689008d643e4a51db0aaef8b; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 3cf520d9860d4ec9f7f32068825da31f18dd3f25; \>= 319c933c71f3dbdb2b3274d1634d3494c70efa06, \< 5307dce878d4126e1b375587318955bd019c3741; Linux 3.12.

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

Yes. Fixed in Linux 08480e285c6a82ce689008d643e4a51db0aaef8b, Linux 3cf520d9860d4ec9f7f32068825da31f18dd3f25, Linux 5307dce878d4126e1b375587318955bd019c3741. Upgrade Linux to 5307dce878d4126e1b375587318955bd019c3741 or later.

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

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/cb4c956a15f8b7f870649454771fc3761f504b5f>
- patch: <https://git.kernel.org/stable/c/08480e285c6a82ce689008d643e4a51db0aaef8b>
- patch: <https://git.kernel.org/stable/c/3cf520d9860d4ec9f7f32068825da31f18dd3f25>
- patch: <https://git.kernel.org/stable/c/5307dce878d4126e1b375587318955bd019c3741>

## 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-38449>

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