KernelScan.io

HIGH Introduced in 6.6

drm/exec PrelockedObj UAF

CVE-2026-99147

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: drm/exec: don't immediately add prelocked obj to array of locked objs When a contention is detected the drm_exec object grabs a reference to the contended object, unlocks all other objects and pre-locks the contended one before anything else. The problem is that it is possible that this pre-locked object was about to be destroyed and drm_exec is now holding the last reference to it. So we never actually see this pre-locked object again to be explicitly locked and so also never reserve a slot for a dma_fence object on it. Should the driver now use drm_exec_for_each_locked_object() to add a new fence to all locked objects we eventually see a warning or even a BUG_ON() to prevent random memory corruption. Fix this by keeping the prelocked object out of the array of locked objs until it was explicitly mentioned by the driver again. If the prelocked object is never mentioned again by the driver just unlock and drop the reference at the end of the locking loop.

02

Engine v0.9.0

Risk summary

A local attacker with access to a DRM render node (e.g., /dev/dri/renderD128) can trigger a use-after-free in the GPU execution context locking code, leading to kernel memory corruption or a kernel panic via BUG_ON(). The bug is reachable from unprivileged user code, containers with GPU device access, and any process that can submit GPU commands.

Affecteddrivers/gpu/drm/drm_exec.c (drm/exec subsystem)

Vulnerability analysis

When the DRM execution context detects lock contention on a GEM buffer object, it takes a reference to the contended object, unlocks all other objects, and pre-locks the contended one. The flaw is that this pre-locked object was immediately added to the array of locked objects even though it might be in the process of being destroyed — the execution context could be holding the last reference. If the driver never explicitly re-locks that object (because it is being cleaned up), the object remains in the locked array without a reserved dma_fence slot. Later, when the driver iterates over locked objects to attach fences, it attempts to write a fence to the destroyed object, triggering a kernel warning or BUG_ON() that panics the system. The fix keeps the pre-locked object out of the locked-object array until the driver explicitly references it again, and ensures the reference is cleanly dropped if the object is never re-locked. An attacker needs only local access to a DRM render node (commonly available to non-root users in the render/video group or via container device passthrough) to trigger the race condition.

03

BranchIntroducedFixed inPatch commit
6.126.66.12.1159dd91a22f076
6.186.66.18.5996d9996e5dbc
6.66.66.6.16174b4d2370a9e
7.26.67.2.137a10cd79c4d9
mainline6.67.326401a4999f1

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 6.12.114-cip34)