DF-5564 / verdict.json
{ "finding_id": "DF-5564", "status": "reproduced", "reproduced": true, "impact": "dos", "confidence": "certain", "verdict": "IIC_NOINTR is defined as 0 (iiconf.h:44), so `case IIC_WAIT | IIC_NOINTR` at iiconf.c:66-68 matches every WAIT-only caller and tsleeps WITHOUT PCATCH and with timeout 0; the smbus layer forwards how verbatim, so ipmi_ssif (ipmi_ssif.c:81,181) and cyapa (cyapa.c:1176,1624) callers of smbus_request_bus(..., SMB_WAIT==IIC_WAIT) park unkillably whenever another iicbus child holds the bus. Demonstrated on the guest: a WAIT-only requester parked at wchan iicreq ignored SIGKILL (SURVIVED_SIGKILL=YES), a non-owner release returned EACCES without waking it (iicbus_release_buss EACCES path early-returns before wakeup, iiconf.c:137-145 -- the lost-wakeup twin), and only a genuine wakeup(sc) from another child cycling the bus freed it.", "exploit_chain": "root: hold /dev/iic0 mid-ioctl (or any busy bridge) while an ipmi_ssif/cyapa kthread requests with SMB_WAIT -> kthread parks at iiconf.c:67 with no PCATCH -> SIGKILL impossible, timeout 0 means no self-heal even after the bus frees (lost wakeup) -> IPMI/cyapa interface permanently wedged. Userland demonstration via the rigs /dev/df5563 with the identical (bus, dev, IIC_WAIT) call contract.", "evidence": "run.log: SURVIVED_SIGKILL=YES, ioctl: returned -1 (errno=13: Permission denied) + STILL_PARKED_AFTER_REL=YES, then GONE_AFTER_WAKEUP=YES only after ./park intr cycled the bus. fix_run.log: F2V_PASS: SIGKILL terminated the WAIT-only sleeper with the patched iicbus.ko (PCATCH + hz-bounded, timeout-as-spurious-wakeup).", "kernel_refs": [ "sys/bus/iicbus/iiconf.h:43-45", "sys/bus/iicbus/iiconf.c:66-68", "sys/bus/iicbus/iiconf.c:99-108", "sys/bus/iicbus/iiconf.c:137-145", "sys/bus/smbus/smbconf.c:112-146", "sys/dev/misc/ipmi/ipmi_ssif.c:81", "sys/dev/smbus/cyapa/cyapa.c:1176" ], "poc_changes": "Shared rig with DF-5563; ./park wait drives iicbus_request_bus(bus, dev, IIC_WAIT) -- the exact how value the smbus passthrough delivers for ipmi_ssif/cyapa. No source changes beyond the DF-5563 rig fixes.", "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": 240, "guest_dirty": 0, "build_cmd": "cd /root/df5563 && sh build.sh", "run_cmd": "sh /root/df5564/run.sh", "code_hash": "ebe006166647097cef900f01cd62c0d0bf74cb841e9a9b1a6f7c536898950ab4", "notes": "Non-destructive test. The lost-wakeup aspect (sleeping forever on a FREE bus after a missed wakeup, compounded by timeout 0) is inspection-proven from the unordered check-then-sleep at iiconf.c:99-108 vs clear-then-wakeup at iiconf.c:136-145; the smbus twin wakes unconditionally (smbusconf.c:180).", "recommended_fix": "Always PCATCH + bounded (hz) tsleep in iicbus_poll with timeout treated as spurious wakeup (DF-5563 fix.diff).", "fix_status": "fixed", "fix_baseline_reproduced": true, "fix_patched_reproduced": false, "fix_verdict": "With fix.diff the WAIT-only sleeper parks in 1s slices and SIGKILL terminates it (F2V_PASS in fix_run.log); the bounded timeout also self-heals the lost-wakeup case within one second.", "fix_evidence": "findings/poc/DF-5564/fix_run.log (F2v section); fix.diff (shared with DF-5563)" } |