HIGH Introduced in 7.2
dma-buf FenceOps UAF
CVE-2026-98243
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
KernelScan AI6.7MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: dma-buf/dma-fence: fix checking signaling bit for timeline and driver name v3 The patch "dma-buf: dma-fence: Fix potential NULL pointer dereference" changed the check to test for the ops pointer instead of the signaled bit to avoid a potential NULL dereference when the ops pointer has been cleared. The problem is now that the ops pointer is cleared only when neither the release nor the wait callback is implemented and this isn't true for a lot of dma_fence implementations yet. So those implementations lost the RCU protection after signaling of the returned string resulting in potential use after free. Add the signaling check additional to the ops pointer check so that we have both the protection against NULL dereference as well as the RCU protection after signaling for the returned string. v2: improve comments to note RCU protection and explain why we check both signaling state and ops pointer v3: some comment improvements suggested by Philip
02KernelScan AI Analysis
Risk summary
A race condition in the dma-buf fence subsystem allows a local attacker with access to GPU or display devices to trigger a use-after-free when querying fence driver or timeline names. This can lead to memory corruption, information disclosure, or kernel crashes. Exploitation requires precise timing during fence signaling and RCU grace period transitions.
Vulnerability analysis
When querying a dma-buf fence's driver or timeline name, the code decides whether to call the producer's name callback or return a fallback string. A prior fix replaced the check for whether the fence had already completed with a test on the callback pointer to avoid a NULL dereference, but many fence implementations never clear that pointer because they implement release or wait callbacks. For those implementations, the completion check was the only thing preventing access to the callback after the fence had finished and its returned string became eligible for freeing after a grace period. Without that check, the code can call the name callback and hold a reference to the returned string during the window after completion but before the grace period finishes, creating a use-after-free if the producer frees the string in that interval. The fix restores the completion check alongside the callback pointer test so both NULL-dereference safety and protection after signaling are preserved. This is reachable from local processes with access to dma-buf fences — typically through GPU, display, or media device interfaces — and requires no special kernel privileges beyond device access, though exploitation depends on winning a race between fence completion and the grace period.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.1 | 7.1.5 | 7.2 | a4db25b8949d |
| 7.2 | 7.2 | 7.2.8 | 3ed11c671ff7 |
| mainline | 7.2 | 7.3 | — |