Multi-part SSIF response read loop has no iteration cap -- infinite-loop DoS via malicious BMC
Summary
Multi-part response read loop "for(;;)" at line 257 has NO maximum iteration count. Only exits when BMC sends block whose first byte is 0xff (297-298). block=1 at 255; ssif_buf[0]!=0xff && ssif_buf[0]!=block check at 274 -- if BMC sends matching incrementing block number loop continues indefinitely. block++ at 299 (u_char wraps at 255). No cap on iterations. BMC controls ssif_buf[0] on every READ_CONT; by always sending matching block and never 0xff keeps loop alive forever. Each iteration smbus_bread (260-262) holding bus consuming kthread CPU. bcopy at 292 stops writing once len>=ir_replybuflen (291) so no buffer overflow but len (size_t) grows without bound and kthread never returns to ipmi_complete_request stalling all pending+future IPMI requests including watchdog resets -> potential hardware system reset if IPMI hardware watchdog active. Same class of unbounded-polling DoS as sibling ipmi_smic.c (DF-2003) here in read loop. Requires compromised BMC (or fault emitting endless READ_CONT blocks without 0xff terminator). AV:L/AC:H/PR:L, A:H.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-2026 Β· 7 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | unbounded for(;;) loop analysis + iteration-cap fix rationale | 3.0 KB | β raw |
| fix.diff | suggested-fix | add SSIF_MAX_READ_BLOCKS iteration cap to multi-part read loop; matches finding proposal | 967 B | view raw |
| fix_build.log | build-log | combined kernel build rc=0, 0 warnings/errors -Werror; ipmi_ssif.c recompiled | 1.4 KB | view raw |
| env.txt | environment | guest uname, cc version, no-ipmi/no-bmc confirmation | 405 B | view raw |
| build.sh | build-script | documents source-only verification (HW-gated) | 645 B | view raw |
| run.sh | run-script | documents no runtime PoC (HW-gated) | 256 B | view raw |
| README.md | readme | status + verification method summary | 644 B | β raw |
DF-2026 PoC β Multi-part SSIF response read loop has no iteration cap
Status: inconclusive / reproduced=0 β HW-GATED (IPMI SSIF needs a BMC; none
present, ipmi.ko not loaded).
Verification method: source trace of sys/dev/misc/ipmi/ipmi_ssif.c:257 (for (;;)),
lines 260-262, 274, 297-299. The multi-part READ_CONT loop has no iteration cap; a BMC that
returns 0xff (or incrementing matching block numbers) on every READ_CONT spins it forever
β kernel infinite-loop DoS (CWE-835). See VERDICT.md, fix.diff.
Build/run: no runtime PoC (no BMC). fix_build.log proves the fix compiles under
-Werror rc=0.
DF-2026 β Multi-part SSIF response read loop has no iteration cap
Verdict
CONFIRMED (source-trace); NOT REPRODUCED AT RUNTIME β HW-GATED.
Status: inconclusive, reproduced=0. The unbounded loop is real; it is unreachable on
this guest (no BMC, no ichsmb/amdsmb, ipmi.ko not loaded).
Mechanism (confirmed)
The multi-part response read loop is an unconditional for (;;):
- ipmi_ssif.c:257 β for (;;) {
- ipmi_ssif.c:260-262 β each iteration calls smbus_bread(..., SMBUS_READ_CONT, &count,
ssif_buf); so the BMC controls ssif_buf[0] (block marker) on every iteration.
- ipmi_ssif.c:274 β if (ssif_buf[0] != 0xff && ssif_buf[0] != block) goto fail; a
block that is neither 0xff nor the expected incrementing block number is rejected.
- ipmi_ssif.c:297-299 β if (ssif_buf[0] != 0xff) break; block++;
There is no maximum iteration counter. A BMC that returns 0xff (or a sequence of
incrementing/matching block numbers) on every READ_CONT keeps the loop spinning: block
increments and wraps as a u_char (255 β 0 β β¦), and the 0xff marker short-circuits the
line-274 guard, so the loop never exits. The only other exits are an smbus_bread error
(goto fail) β which the BMC can simply not produce. Result: infinite kernel-loop DoS
(wedge) at IPL of the SSIF thread, driven entirely by attacker-controlled BMC responses.
Class: CWE-835 (reachable assertion / unbounded iteration).
(Observation, out of scope for this fix: the line-297 exit condition
if (ssif_buf[0] != 0xff) break; reads as if a non-0xff block terminates the transfer,
which is the inverse of the line-273 comment "0xff marks the last block"; regardless of the
exact intended termination semantics, the absence of an iteration cap is the confirmed
defect and the cap below closes the DoS.)
Why it is not reproduced on this guest (HW-gate)
Identical to DF-2024/2025: the loop body is only entered through ssif_polled_request(),
which is only reachable with a real BMC on an SMBus block controller. No BMC on this guest
β dead code at runtime. Threat actor = malicious/compromised BMC. No escalation chain
(this is a DoS/infinite-loop class, not memory corruption; even on real hardware it is a
wedge, not a write primitive).
PoC changes
None (source-only verification).
Fix (fix.diff)
In sys/dev/misc/ipmi/ipmi_ssif.c: add #define SSIF_MAX_READ_BLOCKS 256, declare
int readblocks, initialize it before the loop, and bail (goto fail) once the iteration
count exceeds the cap. 256 blocks Γ 31 payload bytes β 8 KB, far above any legitimate IPMI
response while bounding the loop deterministically. The fix does not alter the existing
block-termination logic, so it is safe regardless of the 0xff/block-number semantics.
Matches the finding proposal's intent (add an iteration cap).
Fix validation (Phase 8)
Combined kernel build with all four fixes: rc=0, 0 warnings, 0 errors under -Werror;
ipmi_ssif.c recompiled, ipmi.ko relinked (see fix_build.log). HW-gated β
fix_status = not_testable.
Fix verification
not_testableVALIDATED build. ipmi.ko rebuilds rc=0.
NK_DONE rc=0.
Confirmed kernel references
- s
- y
- s
- /
- d
- e
- v
- /
- m
- i
- s
- c
- /
- i
- p
- m
- i
- /
- i
- p
- m
- i
- _
- s
- s
- i
- f
- .
- c
- :
- 2
- 5
- 7
- s
- y
- s
- /
- d
- e
- v
- /
- m
- i
- s
- c
- /
- i
- p
- m
- i
- /
- i
- p
- m
- i
- _
- s
- s
- i
- f
- .
- c
- :
- 2
- 9
- 7
Detail
Exploit chain
none (DoS class, not memory corruption).
Evidence (decisive lines)
Source trace ipmi_ssif.c:257,260,274,297,299.
Verified recommended fix
Bound loop with SSIF_MAX_READ_BLOCKS=256 counter; goto fail when exceeded.
Verdict
HW-GATED (no BMC). Source-CONFIRMED. Multi-part response read loop for(;;) has NO iteration cap. BMC controls ssif_buf[0]; 0xff short-circuits block check; block++ wraps u_char. Malicious BMC keeps loop spinning -> kernel wedge DoS (CWE-835).
No comments yet.