β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-3711

arcmsr_detach() tears down DMA pool and cdev before deregistering the CAM SIM; MSIX IRQ resources leaked

Summary

arcmsr_detach() calls arcmsr_free_resource() - which destroys the ioctl cdev, unloads/destroys the srb_dmamap and frees the SRB pool mapping - BEFORE xpt_bus_deregister()/cam_sim_free(). Any CCB still owned by CAM/SIM at detach time completes through paths that touch the freed pool and the per-SRB ccb_callouts, a use-after-free on module unload under I/O. Additionally arcmsr_teardown_intr() leaves the MSIX irqres[] unreleased (the bus_release_resource calls are commented out), leaking the IRQ resource per detach/attach cycle. Module unload requires root, hence Low. Verification skipped per contract (Low, hardware-gated).

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-3711 Β· 1 files
FileTypeDescriptionSize
verdict.json file 449 B view raw

Confirmed kernel references

β€”

Detail

Evidence (decisive lines)

β€”

Verdict

Low - verification skipped per contract (root-only kldunload trigger, hardware-gated driver). Source-certain: free_resource ordering at :4893-4902 and commented-out irqres[] release at :4636-4638 directly visible.