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)
PoC verification
Evidence pack
findings/poc/DF-4898 Β· 1 files| File | Type | Description | Size | |
|---|---|---|---|---|
| verdict.json | file | 929 B | view raw |
Fix verification
not_testableConfirmed kernel references
- sys/dev/disk/vpo/vpo.c:176-180
- sys/dev/disk/vpo/vpo.c:188-193
- sys/cam/cam_xpt.c:4938-4944
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.
No comments yet.