DF-5737 / verdict.json
{ "finding_id": "DF-5737", "status": "untested", "reproduced": false, "impact": "none", "confidence": "speculative", "verdict": "Statically argued use-after-free WRITE: netbt has no lock serializing the syscall transmit path (l2cap_lower.c:204 -> hci_acl_send -> TAILQ_INSERT_TAIL on link->hl_txq, hci_link.c:585) against event-context link teardown in hci_event.c (command_status CREATE_CON 0x12 at :271-273, con_compl error at :559, discon_compl at :629, forged RESET completion at :1063-1070 -> hci_link_free -> kfree). hl_refcnt only protects channels already attached; the connecting window (hci_acl_open hci_link.c:109-143) and the per-call lc_link dereference are uncovered. Forged completions need no matching outstanding command (dispatch is opcode-only, hci_event.c:324-351). Not guest-verified: winning the syscall-vs-NETISR interleaving needs instrumentation inside the verbatim code under test, which would invalidate the rig; documented as speculative/likely with the full chain.", "exploit_chain": "attacker injects forged HCI event (e.g. RESET completion) while local L2CAP socket send() is inside hci_acl_send() -> link freed under the syscall thread -> TAILQ_INSERT_TAIL writes through freed 356-byte M_BLUETOOTH chunk (slab-groomable in principle)", "evidence": "VERDICT.md (full static chain with path:line for both threads and the windows)", "kernel_refs": [ "sys/netbt/hci_event.c:271", "sys/netbt/hci_event.c:559", "sys/netbt/hci_event.c:629", "sys/netbt/hci_event.c:1063", "sys/netbt/hci_link.c:585", "sys/netbt/hci_link.c:931", "sys/netbt/hci_link.c:109", "sys/netbt/l2cap_lower.c:204" ], "poc_changes": "no runnable PoC (race window not instrumentable without patching the code under test)", "attempts": 0, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64", "runtime_sec": 0, "guest_dirty": 0, "build_cmd": "", "run_cmd": "", "code_hash": "", "notes": "Filed speculative per contract; the recommended fix (link refcount across the transmit call + teardown through hci_acl_close + opcode/command matching for completions) removes the class. Related: hci_disable()s unlocked IF_DRAIN vs hci_intr dequeue (hci_unit.c:252-262) - same no-locking family, driver-detach scoped.", "recommended_fix": "hold an hl_refcnt reference across hci_acl_send() in l2cap_lower.c; make event-path teardown go through hci_acl_close(); match command completions to outstanding commands before acting", "fix_status": "not_testable", "fix_kernel_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "", "fix_evidence": "" } |