DF-3833 / verdict.json
{ "finding_id": "DF-3833", "status": "inconclusive", "reproduced": 0, "impact": "none", "confidence": "speculative", "verdict": "Two sibling panic windows around the reset paths that pass-1s DF-2524 (trm_Disconnect pActiveSRB NULL) did not cover. (1) trm_Interrupt (sys/dev/disk/trm/trm.c:1337-1343): INT_BUSSERVICE|INT_CMDDONE dereferences pACB->pActiveDCB under a KASSERT and then pDCB->pActiveSRB with no NULL check; pActiveDCB is NULL in real windows \u2014 trm_Disconnect clears it at trm.c:2359 before the next start, trm_reset clears it at trm.c:1185 after completing all going SRBs but after re-enabling interrupts (trm.c:1176-1178), and trm_ScsiRstDetect at trm.c:2805 \u2014 so a stale chip completion in those windows panics on GENERIC (KASSERT is INVARIANTS-only, sys/sys/systm.h:94-118) via the NULL pDCB->pActiveSRB read. (2) trm_SRBdone (trm.c:2720-2724) unlinks the completed SRB with an unbounded while (psrb->pNextSRB != pSRB) walk; trm_RecoverSRB (trm.c:1141-1160) empties the going list on external-reset detection without clearing pDCB->pActiveSRB, so a stale completion of a recovered SRB walks off the list end and NULL-derefs. Both need adversarial chip timing (bus reset mid-command + stale interrupt) \u2014 plausible with flaky or hostile targets, not demonstrable on the audit guest (no Tekram HBA, env.txt). Speculative-likely, hardware-gated panic/DoS.", "exploit_chain": "hostile/flaky SCSI target: keep a tagged command in flight -> force bus reset (or wait for external reset) -> chip raises stale bus-service interrupt before the next StartSCSI re-arms pActiveDCB -> kernel panic (local DoS). No privilege gain.", "evidence": "README.md (both windows with line refs and the RecoverSRB non-cleanup); env.txt; fix.diff (NULL guards + terminating walk, git-apply --check passes)", "kernel_refs": [ "sys/dev/disk/trm/trm.c:1337", "sys/dev/disk/trm/trm.c:1339", "sys/dev/disk/trm/trm.c:1340", "sys/dev/disk/trm/trm.c:2359", "sys/dev/disk/trm/trm.c:1185", "sys/dev/disk/trm/trm.c:2805", "sys/dev/disk/trm/trm.c:2720", "sys/dev/disk/trm/trm.c:1141", "sys/sys/systm.h:117" ], "poc_changes": "No PoC \u2014 requires Tekram hardware and reset/interrupt racing; analysis + fix only.", "attempts": 1, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 X86_64_GENERIC x86_64", "runtime_sec": 0, "guest_dirty": 0, "build_cmd": null, "run_cmd": null, "code_hash": null, "notes": "Pass-2 hunt item (a)+(b): the pSRB done-list walks vs the reset/ISR paths. Explicitly a sibling of known DF-2524 (different functions/lines: trm_Interrupt BUSSERVICE path and trm_SRBdone unlink walk, both reachable only after reset-recovery).", "recommended_fix": "NULL-guard pActiveDCB/pActiveSRB in trm_Interrupt before the phase dispatch and terminate the trm_SRBdone going-list walk (fix.diff).", "fix_status": "not_testable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "Needs Tekram hardware plus reset/interrupt racing; absent on the audit guest. fix.diff is git-apply-able (verified).", "fix_evidence": "fix.diff" } |