# CVE-2026-52951: drm/xe/dma-buf: handle empty bo and UAF races

> 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.18% (percentile 4, 2026-11-28)
- **CWE:** CWE-416, CWE-476
- **Published:** 2026-06-24T16:28:34.351Z
- **Modified:** 2026-10-19T20:18:49.950Z

## Who should check

- Anyone running Linux \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 9894731e513019df22a29e5c52f1c98890355ff1; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 20a99ea1e2fd720856d6ba497ff26b82c604751f; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< c473ae25421fddc3dde247ba7b85225b10641d09; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 981bedbbe61364fcc3a3b87ebaf648a66cd07108
- Anyone running Linux 6.8

## Description

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

drm/xe/dma-buf: handle empty bo and UAF races

There look to be some nasty races here when triggering the
invalidate\_mappings hook:

1) We do xe\_bo\_alloc() followed by the attach, before the actual full bo
   init step in xe\_dma\_buf\_init\_obj(). However the bo is visible on the
   attachments list after the attach.  This is bad since exporter driver,
   say amdgpu, can at any time call back into our invalidate\_mappings hook,
   with an empty/bogus bo, leading to potential bugs/crashes.

2) Similar to 1) but here we get a UAF, when the invalidate\_mappings
   hook is triggered. For example, we get as far as xe\_bo\_init\_locked()
   but this fails in some way. But here the bo will be freed on error, but
   we still have it attached from dma-buf pov, so if the
   invalidate\_mappings is now triggered then the bo we access is gone and
   we trigger UAF and more bugs/crashes.

To fix this, move the attach step until after we actually have a fully
set up buffer object. Note that the bo is not published to userspace
until later, so not sure what the comment "Don't publish the bo
until we have a valid attachment", is referring to.

We have at least two different customers reporting hitting a NULL ptr
deref in evict\_flags when importing something from amdgpu, followed by
triggering the evict flow. Hit rate is also pretty low, which would
hint at some kind of race, so something like 1) or 2) might explain
this.

v2:
  - Shuffle the order of the ops slightly (no functional change)
  - Improve the comment to better explain the ordering (Matt B)

(cherry picked from commit af1f2ad0c59fe4e2f924c526f66e968289d77971)

## Affected and fixed versions

- Linux: \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 9894731e513019df22a29e5c52f1c98890355ff1; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 20a99ea1e2fd720856d6ba497ff26b82c604751f; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< c473ae25421fddc3dde247ba7b85225b10641d09; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 981bedbbe61364fcc3a3b87ebaf648a66cd07108 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 981bedbbe61364fcc3a3b87ebaf648a66cd07108 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-52951. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-52951.md
Affected: Linux >= dd08ebf6c3525a7ea2186e636df064ea47281987, < 9894731e513019df22a29e5c52f1c98890355ff1; >= dd08ebf6c3525a7ea2186e636df064ea47281987, < 20a99ea1e2fd720856d6ba497ff26b82c604751f; >= dd08ebf6c3525a7ea2186e636df064ea47281987, < c473ae25421fddc3dde247ba7b85225b10641d09; >= dd08ebf6c3525a7ea2186e6…
Fixed in: Linux 9894731e513019df22a29e5c52f1c98890355ff1, Linux 20a99ea1e2fd720856d6ba497ff26b82c604751f, Linux 981bedbbe61364fcc3a3b87ebaf648a66cd07108

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

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

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

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

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

Linux \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 9894731e513019df22a29e5c52f1c98890355ff1; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 20a99ea1e2fd720856d6ba497ff26b82c604751f; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< c473ae25421fddc3dde247ba7b85225b10641d09; \>= dd08ebf6c3525a7ea2186e636df064ea47281987, \< 981bedbbe61364fcc3a3b87ebaf648a66cd07108; Linux 6.8.

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

Yes. Fixed in Linux 9894731e513019df22a29e5c52f1c98890355ff1, Linux 20a99ea1e2fd720856d6ba497ff26b82c604751f, Linux 981bedbbe61364fcc3a3b87ebaf648a66cd07108. Upgrade Linux to 981bedbbe61364fcc3a3b87ebaf648a66cd07108 or later.

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

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/9894731e513019df22a29e5c52f1c98890355ff1>
- patch: <https://git.kernel.org/stable/c/20a99ea1e2fd720856d6ba497ff26b82c604751f>
- patch: <https://git.kernel.org/stable/c/c473ae25421fddc3dde247ba7b85225b10641d09>
- patch: <https://git.kernel.org/stable/c/981bedbbe61364fcc3a3b87ebaf648a66cd07108>
- other: <https://access.redhat.com/security/cve/CVE-2026-52951>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2492353>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-52951.json>

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

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