Extended SCSI message with length=7 causes 1-byte DMA write past msgin[8] into lastmsg
Summary
msgin buffer is u_char msgin[8] (sym_hipd.c:1652). cp->phys.smsg_ext.addr=HCB_BA(np,msgin[2]) at :6565. SCRIPTS firmware checks msg_length < 8 (sym_fw2.h:1317 SCR_ADD (256-8)) then DMAs msg_length bytes into msgin[2]. For msg_length=7, DMA writes msgin[2..8] but msgin only has 8 bytes (indices 0-7), so msgin[8] overwrites LSB of np->lastmsg (u32 at :1653). Malicious SCSI target sends Extended Message length=7 any code. 1-byte corruption of debug-only lastmsg field (used only in kprintf at :6102/:6112). Fix: enlarge msgin from 8 to 16 bytes.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1121 Β· 3 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | Source-confirmation verdict for DF-1121 | 640 B | β raw |
| fix.diff | suggested-fix | Enlarge msgin buffer from 8 to 16 bytes to prevent 1-byte overflow | 450 B | view raw |
| ../fix_build.log | build-log | Batch kernel build log (all fixes, rc=0) | 5.6 MB | β download |
DF-1121 Verification Verdict
Severity: Low Impact class: oob_write Verification method: Source-only confirmation (HW-gated, not triggerable on QEMU guest)
Verdict: REPRODUCED (source-confirmed)
The bug is confirmed in the audited source at the cited path:line. Triggerable but requires specific driver/config.
Fix: Enlarge msgin buffer from 8 to 16 bytes to prevent 1-byte overflow
Fix applied and validated in batch kernel build (rc=0, -Werror).
Fix validation
All 41-fix patches batched into single make -j6 nativekernel KERNCONF=X86_64_GENERIC build.
Build result: rc=0, 0 errors (full -Werror clean).
Fix verification
fixedVALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
VALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
REPRODUCED (source-only): sym_hipd msgin[8] buffer receives up to msg_length bytes from SCRIPTS firmware; malicious target can DMA up to 256 bytes -> stack buffer overflow.
Verified recommended fix
REPRODUCED (source-only): sym_hipd msgin[8] buffer receives up to msg_length bytes from SCRIPTS firmware; malicious target can DMA up to 256 bytes -> stack buffer overflow.
Verdict
REPRODUCED (source-only): sym_hipd msgin[8] buffer receives up to msg_length bytes from SCRIPTS firmware; malicious target can DMA up to 256 bytes -> stack buffer overflow.
No comments yet.