⬢ DragonFlyBSD Kernel Audit
DF-3893 / verdict.json
← back to finding ↓ download raw
{
  "finding_id": "DF-3893",
  "status": "not_reproduced",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "mpssas_resetdev_complete (sys/dev/raid/mps/mps_sas.c:2791) is the only TM completion handler in the file without a cm_reply==NULL guard; it dereferences resp->IOCStatus/resp->ResponseCode at mps_sas.c:2819-2820 immediately after the ERROR_MASK check. mpssas_complete_all_commands (mps_sas.c:1030-1073) invokes cm_complete with cm_reply=NULL (set at mps_sas.c:1042) for every outstanding command during a Diag Reset (mpssas_handle_reinit, mps_sas.c:1098, called from mps_reinit at mps.c:317), so an XPT_RESET_DEV TM outstanding at reset time reads near NULL and panics. All six sibling handlers have the guard (mps_sas.c:360, 557, 627, 1160, 1246, 1378). Not reproduced: guest has no SAS2 HBA (env.txt), the mps SIM never attaches, and XPT_RESET_DEV cannot reach mpssas_action. Missing guard is certain from source.",
  "exploit_chain": "",
  "evidence": "VERDICT.md (path:line proof incl. all sibling guards), env.txt (no SAS2 HBA), run.sh + run.log (hardware gate), fix.diff (NULL guard completing ccb with CAM_SCSI_BUS_RESET)",
  "kernel_refs": [
    "sys/dev/raid/mps/mps_sas.c:2799",
    "sys/dev/raid/mps/mps_sas.c:2819",
    "sys/dev/raid/mps/mps_sas.c:1042",
    "sys/dev/raid/mps/mps_sas.c:1053",
    "sys/dev/raid/mps/mps_sas.c:1098",
    "sys/dev/raid/mps/mps.c:317",
    "sys/dev/raid/mps/mps_sas.c:1246"
  ],
  "poc_changes": "Trigger requires an XPT_RESET_DEV racing a controller diag reset on real SAS2 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": 15,
  "guest_dirty": 0,
  "build_cmd": "n/a",
  "run_cmd": "sh findings/poc/DF-3893/run.sh",
  "code_hash": "",
  "notes": "Same defect exists in upstream FreeBSD mps(4) mpssas_resetdev_complete. Exact twin of DF-3801 (mpr_sas.c), which was fixed by adding this guard.",
  "recommended_fix": "Add resp == NULL guard completing the CCB with CAM_SCSI_BUS_RESET and freeing the TM, matching mpssas_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 SAS2 HBA).",
  "fix_evidence": "findings/poc/DF-3893/fix.diff"
}