DF-4369 / manifest.json
{ "finding_id": "DF-4369", "verdict": "not_reproduced", "impact": "none", "reproduced": 0, "confidence": "likely", "summary": "hpt_timeout() races os_cmddone(): callout_stop() does not interlock against an in-progress timeout, so the 20s deadline firing on another CPU while the command completes reads pCmd->priv after ldm_free_cmds() freed it; if the PCOMMAND is recycled (flush: priv=&done on the kernel stack; internal LDM commands: NULL/other), ext->vbus_ext resolves to stack/garbage and ldm_reset_vbus() panics. Hardware-gated: requires a RocketRAID 27xx controller; audit guest has none (dmesg: 'hpt27xx: no controller detected.'), so the race could not be executed. Static proof chain in race_proof.txt / VERDICT.md.", "exploit_chain": "", "kernel_refs": [ "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:411", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:414", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:418", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:421", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:428", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:463", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:464", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:530", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:730", "sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c:303", "sys/dev/raid/hpt27xx/os_bsd.h:190", "sys/dev/raid/hpt27xx/him.h:417", "sys/kern/kern_timeout.c:1087" ], "artifacts": [ "README.md", "VERDICT.md", "race_proof.txt", "verify_env.sh", "run.sh", "run.log", "env.txt", "fix.diff", "manifest.json", "verdict.json" ], "reproduce": { "build": "nothing to build โ driver compiled into X86_64_GENERIC (sys/config/X86_64_GENERIC:117)", "run": "./run.sh (guest probe: pciconf -l; kldstat -v; ls /dev/hpt27xx; dmesg | grep hpt)", "expected": "On real RocketRAID 27xx hardware under SMP: command completing at the same instant its 20s HPT_OSM_TIMEOUT expires causes hpt_timeout() to read pCmd->priv after ldm_free_cmds() freed it; recycled command blocks (flush priv=&done stack at :303) turn this into ldm_reset_vbus(wild pointer) -> fatal trap. On this guest: 'hpt27xx: no controller detected.' โ paths unreachable." }, "fix_status": "not_testable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "fix.diff authored (hpt_timeout takes the recursive vbus lock and re-validates pCmd->priv==ext and pCmd->done==os_cmddone before resetting). Cannot be build-validated on the audit guest: no HighPoint controller, and reproducing the baseline race itself requires one. callout_stop_sync() was deliberately avoided โ os_cmddone runs in interrupt context while hpt_timeout needs the same vbus lock, so a synchronizing stop would deadlock.", "fix_evidence": "fix.diff; VERDICT.md 'Fix' section" } |