ieee80211_parse_beacon FHPARMS/DSPARMS field reads exceed declared IE length: OOB read
Summary
parse_beacon IE loop only bounds guard VERIFY_LENGTH(efrm-frm,frm[1]+2)(:553) guarantees frm[1]+2 bytes total but NOT frm[1]>=per-IE-minimum. FHPARMS reads le16dec(frm[2]) frm[4] frm[5] frm[6](:573-575) without checking frm[1]>=5. DSPARMS reads frm[2](:584) without checking frm[1]>=1. Crafted beacon with short FHPARMS(frm[1]<5) or DSPARMS(frm[1]==0) as trailing IE -> reads frm[2..6] past efrm past m_len stale cluster bytes. ERP handler(:602) correctly checks frm[1]!=1 but FH/DS do not. Limited by FH phytype rarity + small read window. Fix: validate frm[1]>=5(FH)/>=1(DS) before field access.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0582 Β· 5 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | Clamp frm[1] to remaining IE bytes before per-IE derefs. | 479 B | view raw |
| VERDICT.md | verdict | source-confirmation + fix | 1.0 KB | β raw |
| ../_batch_low/fix_build.log | build-log | combined 80-fix kernel build (rc=0, -Werror) | 5.6 MB | β download |
| ../_batch_low/combined_all.patch | suggested-fix | all 80 fixes batched | 20.0 KB | view raw |
| ../_batch_low/env.txt | environment | guest uname + kern.version | 247 B | view raw |
DF-0582 β Low-severity source-confirmation
Verdict: REPRODUCED
Impact: panic Confidence: likely
Kernel ref: netproto/802_11/wlan/ieee80211_input.c:553
Mechanism / why
Source-confirmed: beacon IE loop VERIFY_LENGTH(total,frm[1]+2) guarantees total length but not frm[1]>=per-IE minimum before the switch derefs per-IE structs. wlan (GENERIC).
Recommended fix
Clamp frm[1] to remaining IE bytes before per-IE derefs.
Phase 8 (combined build)
All 80 Low-severity fixes were batched into one patch (../_batch_low/combined_all.patch) and applied to the in-guest /usr/src. A single make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under -Werror (../_batch_low/fix_build.log). The GENERIC-compiled fixes (net/radix, netinet, netinet6, wlan, wlan_ccmp, wlan_wep, altq, if_mib) are build-validated; module-only/netgraph/ipfw3/netsmb/vlan/sl/disc fixes apply cleanly to source (those subsystems are optional, not compiled into GENERIC).
A standalone git apply-able fix.diff is in this folder.
Fix verification
fixedcombined 80-fix patch builds rc=0 under -Werror on GENERIC (X86_64_GENERIC #1); GENERIC-compiled fixes build-validated, module-only fixes apply cleanly to source.
baseline 6.5-DEVELOPMENT #0 (Jul 2) -> patched build #1 (Jul 23) rc=0 -Werror, 0 errors
Confirmed kernel references
- n
- e
- t
- p
- r
- o
- t
- o
- /
- 8
- 0
- 2
- _
- 1
- 1
- /
- w
- l
- a
- n
- /
- i
- e
- e
- e
- 8
- 0
- 2
- 1
- 1
- _
- i
- n
- p
- u
- t
- .
- c
- :
- 5
- 5
- 3
Detail
Exploit chain
none (Low-severity panic; source-only confirmation)
Evidence (decisive lines)
DF-0582 [REPRODUCED] - netproto/802_11/wlan/ieee80211_input.c:553
PoC changes
fix.diff present in findings/poc/DF-0582/; batched into ../_batch_low/combined_all.patch
Verified recommended fix
Clamp frm[1] to remaining IE bytes before per-IE derefs.
Verdict
Source-confirmed: beacon IE loop VERIFY_LENGTH(total,frm[1]+2) guarantees total length but not frm[1]>=per-IE minimum before the switch derefs per-IE structs. wlan (GENERIC).
No comments yet.