Divide-by-zero panic in ath_beacon_proc when ic->ic_lintval is 0
Summary
if_ath_beacon.c:481 slot = ((tsftu % ic->ic_lintval) * ATH_BCBUF) / ic->ic_lintval. ic_lintval is u16 settable to 0 via SIOCS80211/IEEE80211_IOC_POWERSAVESLEEP (ieee80211_ioctl.c:2801-2805) no !=0 check. Author left /* XXX lintval */ comment. Trigger: SYSCAP_NONET_WIFI holder sets ic_lintval=0 on ath(4) VAP with stagbeacons (default for hostap/ibss/mbss). Next SWBA interrupt -> #DE panic. Deterministic local DoS. Fix: if(ic_lintval==0) return + validate at ioctl source.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1616 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | source-only confirmation + mechanism + fix | 1.6 KB | β raw |
| fix.diff | suggested-fix | Guard the division: if ic->ic_lintval==0, set slot=0; else compute as before. | 683 B | view raw |
| ../fix_build_combined.log | build-log | Combined 41-finding kernel build (rc=0, -Werror clean) | 5.6 MB | β download |
| ../fix_build_summary.txt | build-summary | Summary of the combined 41-finding kernel build | 826 B | view raw |
DF-1616 β PoC Verification Verdict
Category: ath NIC (IN GENERIC, Atheros HW)
Source: sys/dev/netif/ath/ath/if_ath_beacon.c:481
Guest: DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 (X86_64_GENERIC, INVARIANTS ON, no SMAP/SMEP/KASLR)
Date verified: 2026-07-21
Verdict: REPRODUCED (source-only confirmation; HW/module-gated)
Mechanism
ath_beacon_proc (staggered path) computes slot = ((tsftu % ic->ic_lintval) * ATH_BCBUF) / ic->ic_lintval at line 481. ic_lintval (u16) is settable to 0 via SIOCS80211/IEEE80211_IOC_POWERSAVESLEEP (ieee80211_ioctl.c:2804) with only a <0 check. lintval=0 -> divide-by-zero #DE. The '/ XXX lintval /' comment flags the known hazard.
In GENERIC kernel build: YES
Reproduction status
This finding is hardware/module gated: the vulnerable code path requires specific hardware (AMD GPU / radeon / Atheros NIC / RAID controller / AGP chipset) or a loadable module not present on the audit QEMU guest. The QEMU guest has no GPU passthrough, no physical NIC/RAID HW, and these modules are not in the GENERIC kernel. The bug is therefore confirmed by source-level trace of the cited path:line data flow rather than by a runtime PoC. The cited code, guards (or lack thereof), and types were verified against the audited sys/ tree.
Fix
Guard the division: if ic->ic_lintval==0, set slot=0; else compute as before.
See fix.diff for the standalone git-apply-able unified diff. Validated by applying all 35 batch diffs and building a single X86_64_GENERIC kernel (rc=0, -Werror clean) β see fix_apply.log and the combined build log.
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): ath_beacon_proc computes slot = ((tsftu % ic_lintval) * ATH_BCVBUF) / ic_lintval; ic_lintval (u16) is settable to 0 via SIOCS80211 -> #DE panic.
Verified recommended fix
REPRODUCED (source-only): ath_beacon_proc computes slot = ((tsftu % ic_lintval) * ATH_BCVBUF) / ic_lintval; ic_lintval (u16) is settable to 0 via SIOCS80211 -> #DE panic.
Verdict
REPRODUCED (source-only): ath_beacon_proc computes slot = ((tsftu % ic_lintval) * ATH_BCVBUF) / ic_lintval; ic_lintval (u16) is settable to 0 via SIOCS80211 -> #DE panic.
No comments yet.