⬢ DragonFlyBSD Kernel Audit
DF-3895 / verdict.json
← back to finding ↓ download raw
{
  "finding_id": "DF-3895",
  "status": "not_reproduced",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "mpssas_send_reset (mps_sas.c:1303-1307) and mpssas_send_abort (mps_sas.c:1443-1447) return -1 on a zero dev handle without unwinding \u2014 the TM is not freed, targ->tm is not cleared, and no TM timeout is armed on that leg. All five callers ignore the return (mps_sas.c:1203, 1218, 1418, 1428, 1536). Result: only TM completion handlers ever clear targ->tm (mps_sas.c:1165/1206/1251/1278/1384/1409), so the target is wedged forever \u2014 later timeouts pile onto timedout_commands (mps_sas.c:1522-1530), the victim CCBs never reach xpt_done (XPT_ABORT is faked-success at mps_sas.c:986-991 so nothing can unwedge them), the TM high-priority credit leaks, and tm_count stays >=1 keeping the simq frozen for the life of the adapter (mps_sas.c:262-265). Provable trigger, twin of DF-3802s mpr proof: mpssas_remove_volume clears targ->handle (mps_sas.c:389) without draining targ->commands, unlike mpssas_remove_device (mps_sas.c:592-599); mpssas_handle_reinit zeroes all handles (mps_sas.c:1113-1121) without purging timedout_commands. Not reproduced: guest has no SAS2 HBA, SIM never attaches; wedge mechanics certain from source.",
  "exploit_chain": "",
  "evidence": "VERDICT.md (path:line proof incl. remove_volume/remove_device asymmetry), env.txt, run.sh + run.log (hardware gate), fix.diff (ports the accepted DF-3802 fix)",
  "kernel_refs": [
    "sys/dev/raid/mps/mps_sas.c:1303",
    "sys/dev/raid/mps/mps_sas.c:1443",
    "sys/dev/raid/mps/mps_sas.c:1536",
    "sys/dev/raid/mps/mps_sas.c:1522",
    "sys/dev/raid/mps/mps_sas.c:262",
    "sys/dev/raid/mps/mps_sas.c:389",
    "sys/dev/raid/mps/mps_sas.c:592",
    "sys/dev/raid/mps/mps_sas.c:1113"
  ],
  "poc_changes": "Trigger needs real SAS2 hardware (volume delete or diag-reset rediscovery racing a timeout); 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-3895/run.sh",
  "code_hash": "",
  "notes": "Same defect in upstream FreeBSD mpr(4)/mps(4) family; DF-3802 (mpr) carried the identical analysis and its fix was accepted for that driver.",
  "recommended_fix": "On the -1 paths clear targ->tm, free the TM, and complete queued timedout commands with CAM_DEV_NOT_THERE; drain targ->commands in mpssas_remove_volume like mpssas_remove_device.",
  "fix_status": "not_testable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "fix.diff ports the accepted DF-3802 mpr fix verbatim to mps; cannot be exercised on this guest (no SAS2 HBA).",
  "fix_evidence": "findings/poc/DF-3895/fix.diff"
}