{
  "finding_id": "DF-2526",
  "status": "reproduced",
  "reproduced": 1,
  "impact": "corruption",
  "confidence": "certain",
  "verdict": "The verbatim trm_detach call order was recorded live: bus_release_resource(IOPORT) -> trm_destroySRB -> bus_dmamem_free(srb_dmat = the SRB array) -> bus_dmamem_free(sense_dmat = sense_buffers) -> ... -> bus_teardown_intr LAST. Any trm_Interrupt dispatched in that window runs against freed memory - and DF-2522 (this project, earlier session) already dispatched the PRODUCTION trm_Interrupt live and proved it reads/writes sense_buffers, pActiveDCB/pFreeSRB - so the window is a genuine UAF exposure, as the finding argues (the race itself was not timed on real hardware here; the ordering proof plus the production-handler cross-evidence is the demonstration). Fixed source A/B: bus_teardown_intr FIRST in the recorded order. Teardown requires detaching the Tekram HBA (not present on the guest) - rig-based proof.",
  "exploit_chain": "privileged/physical-context UAF window (device detach with interrupt activity); corruption class.",
  "evidence": "run.log: full call-order log with teardown_intr last; fixed order log with teardown_intr first.",
  "kernel_refs": [
    "sys/dev/disk/trm/trm.c:3696",
    "sys/dev/disk/trm/trm.c:3710",
    "sys/dev/disk/trm/trm.c:3715"
  ],
  "poc_changes": "bus/cam teardown interposed with ordering log; cross-references findings/poc/DF-2522 (production trm_Interrupt dispatch).",
  "attempts": 1,
  "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": 500,
  "guest_dirty": 0,
  "build_cmd": "sh /root/rigs/dfv_trm/gen.sh && make -m /usr/src/share/mk (in dfv_trm)",
  "run_cmd": "kldload dfv_trm.ko; sysctl kern.dfv_trm_run=2; sysctl -n kern.dfv_trm_status",
  "code_hash": "4d7c3c1a587e752a269a1339473cc58bd9b400079ded62404901af7e8c7805f6",
  "notes": "Ordering proof on verbatim trm_detach + the DF-2522 live proof that production trm_Interrupt dereferences sense_buffers/pActiveDCB/pFreeSRB. Fixed order log: bus_teardown_intr FIRST. The full UAF race itself was not timed live (needs an interrupt during detach on real hardware).",
  "recommended_fix": "bus_teardown_intr before releasing/freeing anything in trm_detach",
  "fix_status": "fixed"
}