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

vpo_cam_rescan leaks struct cam_path on every attach and the entire CCB (incl. its callout) when xpt_create_path fails

Summary

The rescan callback frees only the CCB (never the path - xpt_free_ccb does not touch it), leaking cam_path + pinned topology refs on every successful attach; the failure branch leaks the ~1KB CCB + callout. The kernel's own and aac/ciss/mrsas patterns free both. Free-both fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

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

Fix verification

not_testable
per-fix-DF-4898

Confirmed kernel references

Detail

Exploit chain

ZIP/imm device attaches -> rescan runs -> cam_path + topology refs leak per attach

Evidence (decisive lines)

findings/poc/DF-4898/ (this verdict)

Verdict

Hardware-gated (no ZIP on the guest parallel port): the async XPT_SCAN_BUS rescan at attach never releases its resources - the callback frees only the CCB (never xpt_free_path), leaking the kmalloc'd cam_path plus its pinned topology refs on EVERY successful attach; the xpt_create_path failure branch leaks the whole ~1KB CCB incl. its callout. The kernel's own pattern (and aac/ciss/mrsas) frees both. Free-the-path + free-the-ccb-on-fail fix.