DF-5552 / verdict.json
{ "finding_id": "DF-5552", "status": "untested", "reproduced": false, "impact": "none", "confidence": "likely", "verdict": "cam_devq_reference/cam_devq_release (cam_queue.c:241-257) use a plain non-atomic ++/-- on devq->refcount with no lock, and the final release frees the devq (camq_fini + kfree) after only a kprintf warning when alloc_active/send_active are non-zero. Two SIMs sharing one devq concurrently registered/released can lose a refcount update -> premature free -> UAF of the queue arrays under the scheduler. Analysis-only: no in-tree guest-reachable path registers two sims on one shared devq concurrently (virtio/nata use private devqs); hardening-class, PoC not built per contract for Low findings.", "exploit_chain": "", "evidence": "README.md code analysis with path:line citations", "kernel_refs": [ "sys/bus/cam/cam_queue.c:241-257", "sys/bus/cam/cam_sim.c:151", "sys/bus/cam/cam_sim.c:185" ], "poc_changes": "n/a (no PoC built)", "attempts": 0, "guest_uname": "DragonFly dfbsd 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": 0, "guest_dirty": 0, "build_cmd": "", "run_cmd": "", "code_hash": "", "notes": "Fix sketch in README (atomic refcount + refuse free while active); neighbors xpt_release_bus/target/device already use the atomic-cmpset pattern.", "recommended_fix": "atomic refcount (atomic_add_int/cmpset) for cam_devq_reference/cam_devq_release and refuse the final free while alloc_active/send_active != 0", "fix_status": "not_applicable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "not_applicable (no PoC; hardening)", "fix_evidence": "" } |