OOB read of ridx2rate[] in urtwn_rx_frame for legacy rates >= 12
Summary
urtwn_rx_frame at if_urtwn.c:1069 rate=MS(rxdw3,R92C_RXDW3_RATE) 0..63. Line 1102-1103: if(!(rxdw3&R92C_RXDW3_HT)) tap->wr_rate=ridx2rate[rate]. ridx2rate has 12 entries (0..11). rate in 12..63 with HT bit clear -> OOB read up to 51 bytes past array in .rodata. Leaked byte placed in radiotap wr_rate exposed via bpf/tcpdump. Malicious USB device (firmware sets RX descriptor rate field) or malicious AP triggers. 52 distinct .rodata bytes recoverable. Fix: if(rate<nitems(ridx2rate)).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0984 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for the cited path | 480 B | view raw |
| VERDICT.md | verdict | source-confirmation narrative | 994 B | β raw |
DF-0984 source-confirmation
Verdict: REPRODUCED (source-confirmed)
Impact: leak Confidence: likely
Kernel ref: sys/bus/u4b/wlan/if_urtwn.c:1103
Mechanism
ridx2rate[rate] OOB read for legacy rate>11 -> .rodata leak via radiotap
Confirmation method
Source-trace confirmed the cited code path matches the finding (exact line/condition
verified against sys/). Runtime PoC not exercised for this source-only Low-severity
item; confirmation is by code inspection.
Recommended fix
See fix.diff in this folder (git-apply-able unified diff).
Phase 8 (combined build)
All 70 fixes were batched into one combined patch
(../_batch70/combined_70.patch) and applied to in-guest /usr/src. A single
make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under
-Werror (../_batch70/../_batch70/fix_build.log, 35374 lines). The GENERIC kernel + all modules
(drm, firewire, usb, netgraph, smbfs, fuse, crypto, vm, pmap) compiled clean.
Fix verification
fixedVALIDATED via combined build: fix in combined_70.patch; single make -j6 nativekernel built rc=0, 0 errors under -Werror (../_batch70/fix_build.log). Cited line corrected. Source-only -> validation = clean -Werror compile.
'>>> Kernel build for X86_64_GENERIC completed' + 'NK_DONE rc=0'; grep -cE 'error:|undefined reference' fix_build.log = 0
Confirmed kernel references
- s
- y
- s
- /
- b
- u
- s
- /
- u
- 4
- b
- /
- w
- l
- a
- n
- /
- i
- f
- _
- u
- r
- t
- w
- n
- .
- c
- :
- 1
- 1
- 0
- 2
Detail
Exploit chain
none (source-only Low finding, not memory-corruption driven to runtime; no escalation chain)
Evidence (decisive lines)
baseline (with-src #0): bug at sys/bus/u4b/wlan/if_urtwn.c:1102. combined-70 fix kernel: NK_DONE rc=0 (0 errors, -Werror).
PoC changes
authored/validated fix.diff (findings/poc/DF-0984/fix.diff); part of combined_70 kernel build.
Verified recommended fix
See findings/poc/DF-0984/fix.diff (git-apply-able). Matches finding proposal.
Verdict
REAL: ridx2rate[rate] indexed by device-controlled rate (0..63) with no
No comments yet.