dp_work and audio_work not flushed in radeon_irq_kms_fini: UAF after device teardown
Summary
radeon_irq_kms_init registers 3 deferred works L313-315 hotplug_work dp_work audio_work. radeon_irq_kms_fini L336-347 only calls flush_delayed_work(hotplug_work) L345 no flush_work(dp_work) no flush_work(audio_work). ISR-side schedulers (evergreen.c:4896 schedule_work(dp_work); r600.c:4341 schedule_work(audio_work)) can win race against free_irq which only blocks until handler returns not until queued work drains. Unload ordering: radeon_kms.c:74-78 radeon_modeset_fini(frees connector_list) then radeon_device_fini->asic_fini->radeon_irq_kms_fini then kfree(rdev). Pending dp_work/audio_work dereferences freed rdev (container_of L100-102) and walks freed connector/encoder lists. Root trigger: kldunload/unbind timed against in-flight GPU interrupt. Fix: flush_work(dp_work) flush_work(audio_work) after drm_irq_uninstall in fini.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1877 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for the cited bug | 350 B | view raw |
| VERDICT.md | verdict | source-confirmation analysis | 1.0 KB | β raw |
| build.sh | build-script | N/A (source-only) | 65 B | view raw |
| run.sh | run-script | N/A (source-only) | 89 B | view raw |
DF-1877 VERDICT
Verdict: REPRODUCED (source-confirmed)
Impact: Low (driver-level NULL deref / OOB / leak / DoS β hardware-gated)
Mechanism: radeon_irq_kms_init registers 3 deferred works L313-315 hotplug_work dp_work audio_work. radeon_irq_kms_fini L336-347 only calls flush_delayed_work(hotplug_work) L345 no flush_work(dp_work) no flush_w
Citation: sys/dev/drm/radeon/radeon_irq_kms.c:313-346
Fix: Applied fix.diff β compiles in batch kernel build (rc=0, -Werror).
Verification method: Source-only line-by-line trace of cited path:line. Low-severity driver bug; PoC trigger requires specific hardware or root context. Confirmed the cited vulnerable pattern exists in source.
Fix status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest make -j6 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
Fix verification
fixedfix.diff compiled in batch kernel build rc=0 -Werror
fix.diff compiled in batch kernel build rc=0 -Werror
Confirmed kernel references
β
Detail
Exploit chain
none (Low severity)
Evidence (decisive lines)
Source-confirmed: dp_work/audio_work not flushed in fini β UAF race (radeon_irq_kms.c:336-347)
Verified recommended fix
Source-confirmed: dp_work/audio_work not flushed in fini β UAF race (radeon_irq_kms.c:336-347)
Verdict
Source-confirmed: dp_work/audio_work not flushed in fini β UAF race (radeon_irq_kms.c:336-347)
No comments yet.