NULL deref / panic in bwn_dma_parse_cookie on unexpected TX-status cookie
Summary
bwn_dma_parse_cookie at if_bwn.c:7081-7087: default case sets dr=NULL with only debug KASSERT, then falls through to :7086-7087 dereferencing dr->dr_numslots while dr is still NULL. PIO sibling bwn_pio_parse_cookie has correct pattern (KASSERT then if(tq==NULL) return NULL at :6751-6752). Requires firmware bug/hardware fault/corrupt TX-status FIFO to trigger. Kernel panic. Fix: add if(dr==NULL) return NULL after the switch.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1132 Β· 3 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | Source-confirmation verdict for DF-1132 | 641 B | β raw |
| fix.diff | suggested-fix | Add if(dr==NULL) return NULL after default case in bwn_dma_parse_cookie | 371 B | view raw |
| ../fix_build.log | build-log | Batch kernel build log (all fixes, rc=0) | 5.6 MB | β download |
DF-1132 Verification Verdict
Severity: Low Impact class: panic 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: Add if(dr==NULL) return NULL after default case in bwn_dma_parse_cookie
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): bwn_dma_parse_cookie default case sets dr=NULL with only debug KASSERT, then falls through to dereference dr->dr_numslots. NULL deref panic.
Verified recommended fix
REPRODUCED (source-only): bwn_dma_parse_cookie default case sets dr=NULL with only debug KASSERT, then falls through to dereference dr->dr_numslots. NULL deref panic.
Verdict
REPRODUCED (source-only): bwn_dma_parse_cookie default case sets dr=NULL with only debug KASSERT, then falls through to dereference dr->dr_numslots. NULL deref panic.
No comments yet.