# CVE-2026-89996: dma-buf: dma-heap: don't publish fd before copy\_to\_user() succeeds

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.21% (percentile 7, 2026-11-26)
- **Published:** 2026-09-16T10:33:08.620Z
- **Modified:** 2026-10-30T13:20:38.333Z

## Who should check

- Anyone running Linux \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 1953ef8d11eb5870fe621259708a90900bead272; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< ad61defb3e66ac0c598ad6f39b57f15784543d46; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 1bf6083a41f810d760c4dcd1b80c5194a92575aa; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 69d57dbadb27ffd5eef34fd184bab145500cdabc; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 0d4a5d218055db29b50cc07d3d73d27007c2a391; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0
- Anyone running Linux 5.6

## Description

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

dma-buf: dma-heap: don't publish fd before copy\_to\_user() succeeds

DMA\_HEAP\_IOCTL\_ALLOC allocates a dma-buf and installs an fd into the
caller's fd table via dma\_buf\_fd() -\> fd\_install() before
dma\_heap\_ioctl() copies the result back to userspace.  If the trailing
copy\_to\_user() fails, userspace never learns the fd number, but the
fd (and the underlying dma-buf reference) are already visible to
other threads in the same process and are leaked for the lifetime of
the process.

The obvious "close it on the failure path" fix is unsafe: once
fd\_install() has run, another thread can already dup() the fd, send
it via SCM\_RIGHTS, or close() it and let its number be reused, so a
subsequent close\_fd() from the ioctl path can operate on an unrelated
file.  This was pointed out by Christian König on v1 \[1\].

Restructure the allocation path so that fd\_install() is the last,
unfailable step of a successful ioctl:

  1. heap-\>ops-\>allocate()      creates the dma\_buf.
  2. get\_unused\_fd\_flags()      reserves an fd number in the caller's
                                fd table without publishing it, so
                                no other thread can observe it.
  3. copy\_to\_user()             delivers the fd number to userspace;
                                on failure the fd is returned with
                                put\_unused\_fd() and the dma\_buf
                                reference is dropped with
                                dma\_buf\_put(), leaving no user-
                                visible state behind.
  4. dma\_buf\_fd\_install()       publishes the fd and emits the
                                trace\_dma\_buf\_fd tracepoint -- from
                                here on the ioctl cannot fail.

A new dma\_buf\_fd\_install() helper is introduced in dma-buf.c to wrap
fd\_install() together with the DMA\_BUF\_TRACE() call, preserving the
export tracing that dma\_buf\_fd() provides.  dma\_heap\_ioctl\_allocate()
is refactored to return the struct dma\_buf \* directly (returning
ERR\_PTR on failure) so the caller holds the dmabuf reference across
steps 3 and 4.

The failure at step 3 is easily reachable from userspace: pass a
struct dma\_heap\_allocation\_data that lives in a page whose protection
is flipped to PROT\_READ between copy\_from\_user() and copy\_to\_user()
(e.g. via mprotect()).  Before this change each such ioctl leaks one
dmabuf fd; after it, the fd table is unchanged on failure and only
/dev/dma\_heap/\<name\> remains open.

No UAPI or heap-driver interface change.

\[1\] https://lore.kernel.org/dri-devel/175e98de-f414-47d7-81c1-c0fe0a8f7f62@amd.com/

## Affected and fixed versions

- Linux: \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 1953ef8d11eb5870fe621259708a90900bead272; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< ad61defb3e66ac0c598ad6f39b57f15784543d46; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 1bf6083a41f810d760c4dcd1b80c5194a92575aa; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 69d57dbadb27ffd5eef34fd184bab145500cdabc; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 0d4a5d218055db29b50cc07d3d73d27007c2a391; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0 (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2026-89996.md
Affected: Linux >= c02a81fba74fe3488ad6b08bfb5a1329005418f8, < 1953ef8d11eb5870fe621259708a90900bead272; >= c02a81fba74fe3488ad6b08bfb5a1329005418f8, < ad61defb3e66ac0c598ad6f39b57f15784543d46; >= c02a81fba74fe3488ad6b08bfb5a1329005418f8, < 1bf6083a41f810d760c4dcd1b80c5194a92575aa; >= c02a81fba74fe3488ad6b08…
Fixed in: Linux 1953ef8d11eb5870fe621259708a90900bead272, Linux 1bf6083a41f810d760c4dcd1b80c5194a92575aa, Linux 69d57dbadb27ffd5eef34fd184bab145500cdabc, Linux 0d4a5d218055db29b50cc07d3d73d27007c2a391, Linux 30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 1953ef8d11eb5870fe621259708a90900bead272; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< ad61defb3e66ac0c598ad6f39b57f15784543d46; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 1bf6083a41f810d760c4dcd1b80c5194a92575aa; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 69d57dbadb27ffd5eef34fd184bab145500cdabc; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 0d4a5d218055db29b50cc07d3d73d27007c2a391; \>= c02a81fba74fe3488ad6b08bfb5a1329005418f8, \< 30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0; Linux 5.6.

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

Yes. Fixed in Linux 1953ef8d11eb5870fe621259708a90900bead272, Linux 1bf6083a41f810d760c4dcd1b80c5194a92575aa, Linux 69d57dbadb27ffd5eef34fd184bab145500cdabc, Linux 0d4a5d218055db29b50cc07d3d73d27007c2a391, Linux 30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0. Upgrade Linux to 30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0 or later.

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

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

- other: <https://git.kernel.org/stable/c/1953ef8d11eb5870fe621259708a90900bead272>
- other: <https://git.kernel.org/stable/c/ad61defb3e66ac0c598ad6f39b57f15784543d46>
- other: <https://git.kernel.org/stable/c/1bf6083a41f810d760c4dcd1b80c5194a92575aa>
- other: <https://git.kernel.org/stable/c/69d57dbadb27ffd5eef34fd184bab145500cdabc>
- other: <https://git.kernel.org/stable/c/0d4a5d218055db29b50cc07d3d73d27007c2a391>
- other: <https://git.kernel.org/stable/c/30d0aff2c65a277135cfd8ea28fa1ee75e0ea4e0>

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

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