# CVE-2026-64008: accel/rocket: fix UAF via dangling GEM handle in create_bo

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-07-19T14:56:23.746Z
- Modified: 2026-10-02T19:55:18.030Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

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

accel/rocket: fix UAF via dangling GEM handle in create_bo

rocket_ioctl_create_bo() inserts a GEM handle into the file's IDR via
drm_gem_handle_create() early on, then performs several operations that
can fail (sgt allocation, drm_mm insert, iommu_map). If any fail after
the handle is live, the error path calls drm_gem_shmem_object_free()
which kfree's the object without removing the handle from the IDR.

This leaves a dangling handle pointing to freed slab memory. Any
subsequent ioctl using that handle (PREP_BO, FINI_BO, SUBMIT) calls
drm_gem_object_lookup() and dereferences freed memory (UAF).

Fix by moving drm_gem_handle_create() to after all fallible operations
succeed, matching the pattern used by panfrost, lima, and etnaviv.

Also fix drm_mm_insert_node_generic() whose return value was silently
overwritten by iommu_map_sgtable() on the next line. Add the missing
error check.

[tomeu: Move handle creation to the very end]

(As written by CVE List.)

## Affected

- Linux Linux: from 658ebeac33517bd3169d4b65ed801e9065d0211a before 18abd88d19ea195e2e1547fca0970c2f91d77a42; from 658ebeac33517bd3169d4b65ed801e9065d0211a before 451f1ccbbdb7b65021646704b15902655f8d228a; from 658ebeac33517bd3169d4b65ed801e9065d0211a before f706e6a4ce75585af979aec3dcbdce68bc76306b; 6.18 (not affected: before 6.18; from 6.18.35 up to 6.18.*; from 7.0.12 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.18 before 6.18.35; from 6.19 before 7.0.12; 7.1

## References

- <https://git.kernel.org/stable/c/18abd88d19ea195e2e1547fca0970c2f91d77a42> (patch)
- <https://git.kernel.org/stable/c/451f1ccbbdb7b65021646704b15902655f8d228a> (patch)
- <https://git.kernel.org/stable/c/f706e6a4ce75585af979aec3dcbdce68bc76306b> (patch)

## Sources

- CVE List: [CVE-2026-64008](https://www.cve.org/CVERecord?id=CVE-2026-64008), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2026-64008](https://nvd.nist.gov/vuln/detail/CVE-2026-64008), Public domain, modified 2026-10-02

---

Page: https://cve.day/CVE-2026-64008 · Whole record: https://cve.day/CVE-2026-64008.json · Rebuilt by cve.day 2026-11-25T22:59:28.917Z
