DF-3801 / verdict.json
{ "finding_id": "DF-3801", "status": "not_reproduced", "reproduced": 0, "impact": "none", "confidence": "certain", "verdict": "mprsas_resetdev_complete (mpr_sas.c:3384) is the only TM completion handler in the file without a cm_reply==NULL guard; it dereferences resp->IOCStatus at mpr_sas.c:3412-3413. mprsas_complete_all_commands (mpr_sas.c:1173-1207) invokes cm_complete with cm_reply=NULL during every Diag Reset, so an XPT_RESET_DEV TM outstanding at reset time panics the kernel. Not reproduced on the guest: mpr driver present (pci/mpr) but no SAS3 PCI device exists, so no XPT_RESET_DEV can reach the SIM. The missing guard is certain from source; sibling handlers at mpr_sas.c:1300/1395/1545/383/582/657 all have it.", "exploit_chain": "", "evidence": "VERDICT.md (path:line proof), env.txt (no SAS3 HBA), fix.diff (NULL guard)", "kernel_refs": [ "sys/dev/raid/mpr/mpr_sas.c:3392", "sys/dev/raid/mpr/mpr_sas.c:3412", "sys/dev/raid/mpr/mpr_sas.c:1173", "sys/dev/raid/mpr/mpr_sas.c:1180", "sys/dev/raid/mpr/mpr_sas.c:1190", "sys/dev/raid/mpr/mpr_sas.c:3372" ], "poc_changes": "Trigger requires CAM error recovery racing a controller diag reset on real SAS3 hardware; run.sh records the hardware gate.", "attempts": 1, "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": 20, "guest_dirty": 0, "build_cmd": "n/a", "run_cmd": "sh findings/poc/DF-3801/run.sh", "code_hash": "", "notes": "Same defect exists in upstream FreeBSD mpr(4) mprsas_resetdev_complete.", "recommended_fix": "Add resp == NULL guard (complete ccb with CAM_SCSI_BUS_RESET/CAM_REQ_CMP_ERR and free the TM), matching mprsas_target_reset_complete.", "fix_status": "not_testable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "fix.diff adds the guard; cannot be exercised on this guest (no SAS3 HBA).", "fix_evidence": "findings/poc/DF-3801/fix.diff" } |