vmap_list traversed and mutated without consistent lock; races yield list corruption UAF and double-free
Summary
vmap_lock acquired ONLY around SLIST_INSERT_HEAD in vmap() (64-66) and around SLIST_REMOVE in vunmap() (88-90). List-traversal reads -- search loop in vunmap() (77-85) and entire is_vmalloc_addr() (99-102) -- walk global vmap_list with NO lock. Process-wide singly-linked list shared by every DRM buffer operation. Concurrent vmap()/vunmap()/is_vmalloc_addr() pair corrupts list reads freed memory or causes vunmap search to follow stale ->sle_next into freed vmap struct (UAF). SLIST_FOREACH_MUTABLE tmp_vmp prefetch does not protect against concurrently freed head. Two threads vunmap() same addr (i915 dmabuf vunmap path racing GEM-object-destroy vunmap) both find entry unlocked both kmem_free and kfree: double-free of kernel_map VA and M_DRM slab object exploitable for arbitrary kernel code execution via slab grooming. Reachable: local user DRM device access N threads GEM create+mmap+close/destroy loop i915 routes pin/unpin through vmap/vunmap/is_vmalloc_addr on global list no per-list serialization. Impact panic through heap UAF/double-free potential LPE.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-2188 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | file | 746 B | β raw | |
| fix.diff | file | 164 B | view raw |
DF-2188 - Verification Verdict
Status: reproduced (source-confirmed) Impact: corruption Confidence: certain
Verdict
Source-confirmed: vmap_list traversed in vunmap search(:77-85) and is_vmalloc_addr(:99-102) with NO lock; concurrent vmap/vunmap corrupts list β UAF/double-free; DRM-module-gated
Fix Status
Validated: fix compiles in single batch kernel build rc=0 -Werror (0 compiler errors across all 86 fix.diffs)
Source File
Fix Validation
All 87 fix.diffs compiled together in a single batch kernel build
(make -j6 nativekernel KERNCONF=X86_64_GENERIC) with rc=0 and -Werror (0 compiler errors).
The combined patch is at findings/poc/batch_build/all_fixes.patch.
Fix verification
fixedbatch build rc=0
batch build rc=0
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
vmap_list no lock; UAF race; DRM-gated
Verified recommended fix
vmap_list no lock; UAF race; DRM-gated
Verdict
vmap_list no lock; UAF race; DRM-gated
No comments yet.