⬢ DragonFlyBSD Kernel Audit
DF-5754 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-5754",
  "title": "hci_detach() frees struct hci_unit with no lifetime protection for in-flight netisr processing (btintr list walk / hci_intr devlock loop) or in-flight driver rx: use-after-free through the unit object; hci_unit_lookup() hands out unreferenced unit pointers",
  "verdict": "reproduced",
  "impact": "panic",
  "reproduce": {
    "build": "cd /root/hciuu && sh build.sh",
    "run": "kldload ./hci_unit_harness.ko; sysctl hw.hciu_setup=1; sysctl hw.hciud_fire=300",
    "expected": "Fatal trap 12 within the first rounds: fault virtual address 0x90, supervisor READ, current process Idle; Stopped at lockmgr_exclusive+0x5d: orl (%r14),%esi (lockmgr(&unit->hci_devlock) on the unit freed by hci_detach)"
  },
  "kernel_refs": [
    "sys/netbt/hci_unit.c:95",
    "sys/netbt/hci_unit.c:113",
    "sys/netbt/hci_unit.c:120",
    "sys/netbt/hci_unit.c:123",
    "sys/netbt/hci_unit.c:126",
    "sys/netbt/hci_unit.c:129",
    "sys/netbt/hci_unit.c:265",
    "sys/netbt/hci_unit.c:270",
    "sys/netbt/hci_unit.c:335",
    "sys/netbt/bt_input.c:37"
  ],
  "artifacts": [
    "harness.c", "hci_stub.c", "Makefile", "build.sh", "run.sh", "xfer.sh",
    "build.log", "setup.log", "run.log", "fix_run.log", "panic.txt",
    "fix.diff", "README.md", "VERDICT.md", "manifest.json", "verdict.json",
    "env.txt"
  ]
}