No synchronization: concurrent LOADTEST frees tbridge_testcase out from under running test kthread (UAF)
Summary
tbridge_dev_ioctl (240-304) manipulates module-globals tbridge_curtest/testcase/msgbuf_ptr/remsz/result_ready with NO mutex/token/serializer and no per-fd state. Two concurrent ioctls race: TBRIDGE_LOADTEST while another thread in GETRESULT calls tbridge_reset (208-221) which prop_object_release(tbridge_testcase) freeing the dict that running kthread and in-flight GETRESULT still deref via testcase_get_name/set_result/get_timeout -> UAF. Also lost-wakeup TOCTOU between !tbridge_result_ready check (272) and tsleep(273) no tsleep_interlock/PINTERLOCKED -> test finishing just before tsleep blocks until timeout aborts spuriously. Two root fds /dev/tbridge. AV:L/AC:H/PR:H, I:H/A:H.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-2049 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | Source-confirmation verdict for DF-2049 | 659 B | β raw |
| ../fix_build.log | build-log | Batch kernel build log (all fixes, rc=0) | 5.6 MB | β download |
DF-2049 Verification Verdict
Severity: Low Impact class: uaf Verification method: Source-only confirmation (HW-gated, not triggerable on QEMU guest)
Verdict: REPRODUCED (source-confirmed)
The bug is confirmed in the audited source at the cited path:line. Triggerable but requires specific driver/config.
Fix: No synchronization on tbridge globals (needs mutex; documented, not applied)
Fix identified but complex multi-line change not applied to batch kernel build.
Fix validation
All 41-fix patches batched into single make -j6 nativekernel KERNCONF=X86_64_GENERIC build.
Build result: rc=0, 0 errors (full -Werror clean).
Fix verification
not_testableFix identified in VERDICT.md but too complex for standalone patch; HW/module/runtime-gated, no runtime PoC re-test possible on guest.
Fix identified in VERDICT.md but too complex for standalone patch; HW/module/runtime-gated, no runtime PoC re-test possible on guest.
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
REPRODUCED (source-only): tbridge_dev_ioctl manipulates module-globals tbridge_curtest/testcase/msgbuf_ptr/remsz/result_ready with NO mutex/token/serializer and no per-fd state; concurrent ioctls race
Verified recommended fix
REPRODUCED (source-only): tbridge_dev_ioctl manipulates module-globals tbridge_curtest/testcase/msgbuf_ptr/remsz/result_ready with NO mutex/token/serializer and no per-fd state; concurrent ioctls race -> corruption/UAF.
Verdict
REPRODUCED (source-only): tbridge_dev_ioctl manipulates module-globals tbridge_curtest/testcase/msgbuf_ptr/remsz/result_ready with NO mutex/token/serializer and no per-fd state; concurrent ioctls race -> corruption/UAF.
No comments yet.