Bug 2502454 (CVE-2026-64008) - CVE-2026-64008 kernel: accel/rocket: fix UAF via dangling GEM handle in create_bo
Summary: CVE-2026-64008 kernel: accel/rocket: fix UAF via dangling GEM handle in creat...
Keywords:
Status: NEW
Alias: CVE-2026-64008
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-19 16:09 UTC by OSIDB Bzimport
Modified: 2026-07-21 13:52 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-19 16:09:03 UTC
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]

Comment 1 Mauro Matteo Cascella 2026-07-21 13:45:38 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2026071908-CVE-2026-64008-8d40@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.