DF-4242 / verdict.json
{ "finding_id": "DF-4242", "status": "reproduced", "reproduced": 1, "impact": "panic", "confidence": "certain", "verdict": "REPRODUCED: with an in-range, EOC-set status packet and five device-fed register bytes (offsets 2..5 spelling DPTH plus HA_SERROR in HA_RSTATUS), the production dpt_intr (0xffffffff80439670 in the shipped kernel, panic site dpt_intr+0x2c2) executes panic(\"DPT Rebooted\") -- serial console shows the production dpt9: HBA rebooted ... This is incomplete, fix me banner immediately followed by panic: DPT Rebooted with the backtrace through rig_ioctl. The panic fires at dpt_scsi.c:1566 BEFORE ccb is dereferenced (line 1571), so no in-flight I/O is needed: a rebooting (or hostile) HBA alone takes the whole kernel down. FIX VALIDATED on a rebuilt kernel with the identical trigger aimed at an ACTIVE in-flight CCB (so it passes the DF-4241 guard and reaches the reboot branch): production dpt_intr prints the same banner, drains the interrupt, continues -- NO panic; the ioctl returned to userland (RC=0) and the guest stayed up, with in-flight commands left to dpttimeout/CAM recovery.", "exploit_chain": "device (rebooting or hostile) presents HA_SERROR + DPTH signature on a completion -> production dpt_intr panic(\"DPT Rebooted\") -> kernel down. Single-shot, zero-privilege-from-the-OS-side, purely device-fed DoS.", "evidence": "run.log (serial console: dpt9: HBA rebooted. + This is incomplete, fix me + panic: DPT Rebooted, backtrace dpt_intr+0x2c2 <- rig_ioctl <- dev_dioctl); panic.txt (panic block); fix_validation.log (same trigger on patched kernel: banner + Encountered bogus status packet drain, [dptrig] PANIC: dpt_intr RETURNED, guest up)", "kernel_refs": [ "sys/dev/raid/dpt/dpt_scsi.c:1551", "sys/dev/raid/dpt/dpt_scsi.c:1558", "sys/dev/raid/dpt/dpt_scsi.c:1566", "sys/dev/raid/dpt/dpt_scsi.c:159" ], "poc_changes": "No seed PoC existed. Added the panic ioctl to the production-handler dispatch rig: writes the device-fed status packet + poisons the virtual register file (DPTH / HA_SERROR), then calls production dpt_intr. On the fix-validation run the trigger was aimed at an ACTIVE ccb (queued through production dpt_action) so the fixed reboot branch itself is exercised rather than being pre-empted by the DF-4241 inactive-CCB guard.", "attempts": 2, "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": 900, "guest_dirty": 0, "build_cmd": "cd /root/rig && make && cc -O2 -Wall -o dfdpt_ctl dfdpt_ctl.c && kldload ./dfdpt_rig.ko && ./dfdpt_ctl prime", "run_cmd": "./dfdpt_ctl panic 0 (panics the kernel; capture serial console)", "code_hash": "93d90103a5d6faf59e478ac7d74fbb3fcd04cb6fb799c747dc9e515eedf1d4ee", "notes": "Impact panic = deterministic full-kernel DoS from device-fed input; sibling of DF-4042/DF-4098 (hostile-HBA panic family). The ctls literal message dpt_intr RETURNED (unexpected!) is the SUCCESS marker on the patched kernel (message predates the fix). Guest reset clean afterwards.", "recommended_fix": "Replace panic() with interrupt drain + continue; let CAM timeouts recover in-flight commands (fix.diff).", "fix_status": "fixed", "fix_baseline_reproduced": 1, "fix_patched_reproduced": 0, "fix_verdict": "Validated on the rebuilt kernel: identical trigger on an ACTIVE ccb prints the reboot banner but drains and continues -- no panic, ioctl returns, guest stays up.", "fix_evidence": "fix_validation.log" } |