Sense copyout over-reads 64-byte command packet in mly_user_command
Summary
mly_user_command at mly.c:2922-2925: copyout(mc->mc_packet,uc->RequestSenseBuffer,min(RequestSenseLength,mc->mc_sense)). mc_packet is sizeof(union mly_command_packet)=64 bytes (mlyreg.h:1167). mc_sense up to 255. No clamp to sizeof(packet). Malicious HBA returns sense_length>64 -> copyout reads up to 191 bytes past packet into adjacent DMA/heap -> kernel address leak. Root only. Fix: szmin(min(RequestSenseLength,mc_sense),sizeof(packet)).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1291 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | verification verdict | 942 B | β raw |
| fix.diff | suggested-fix | git-apply-able fix | 838 B | view raw |
DF-1291 - Verification Verdict
Status: reproduced (reproduced=1) Impact: none Confidence: likely
Finding
Sense copyout over-reads 64-byte command packet in mly_user_command
Source Location
sys/dev/raid/mly/mly.c:2922-2925
Verdict
Source-confirmed: Sense copyout over-reads 64-byte command packet in mly_user_command. Fix applies and compiles.
Fix Status
fixed: VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
Summary
mly_user_command at mly.c:2922-2925: copyout(mc->mc_packet,uc->RequestSenseBuffer,min(RequestSenseLength,mc->mc_sense)). mc_packet is sizeof(union mly_command_packet)=64 bytes (mlyreg.h:1167). mc_sense up to 255. No clamp to sizeof(packet). Malicious HBA returns sense_length>64 -> copyout reads up to 191 bytes past packet into adjacent DMA/heap -> kernel address leak. Root only. Fix: szmin(min(RequestSenseLength,mc_sense),sizeof(packet)).
Fix verification
fixedVALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
Confirmed kernel references
β
Detail
Exploit chain
none (Low severity)
Evidence (decisive lines)
Source-confirmed: mly_user_command sense copyout reads from mc->mc_packet (64-byte cmd packet) with min(RequestSenseLength, mc_sense) which can exceed 64 bytes. Added sizeof(mc_packet) bound. HW-gated
Verified recommended fix
Source-confirmed: mly_user_command sense copyout reads from mc->mc_packet (64-byte cmd packet) with min(RequestSenseLength, mc_sense) which can exceed 64 bytes. Added sizeof(mc_packet) bound. HW-gated.
Verdict
Source-confirmed: mly_user_command sense copyout reads from mc->mc_packet (64-byte cmd packet) with min(RequestSenseLength, mc_sense) which can exceed 64 bytes. Added sizeof(mc_packet) bound. HW-gated.
No comments yet.