β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-2081

Missing privilege check on SIOCGATHSPECTRAL allows unprivileged radio reconfiguration and enables memory bugs

Summary

ath_ioctl_spectral (if_ath_spectral.c:181) no caps_priv_check; caller ath_ioctl (if_ath_ioctl.c:304) dispatches SIOCGATHSPECTRAL outside #ifdef ATH_DIAGAPI guard. if.c:2409 default ieee80211_ioctl.c:3516 default both forward with no priv gate -- unlike SIOCS80211 (SYSCAP_NONET_WIFI at ieee80211_ioctl.c:3472) and SIOCZATHSTATS (SYSCAP_NODRIVER at if_ath_ioctl.c:288). Any local user can: SET_PARAMS rewrite spectral PHY scan params; START/STOP spectral engine; ENABLE_AT_RESET set reset-time flag -- confused-deputy radio-jamming/regulatory mischief. Also enabler for DF-2079 heap overflow and DF-2080 heap leak. Fix: caps_priv_check_self(SYSCAP_NONET_WIFI) at entry matching SIOCS80211.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-2081 Β· 2 files
FileTypeDescriptionSize
fix.diff suggested-fix git-apply-able fix 451 B view raw
VERDICT.md verdict source-trace confirmation 692 B ↓ raw
VERDICT.md verdict source-trace confirmation
↓ download raw

DF-2081 β€” SIOCGATHSPECTRAL dispatched without privilege check

Verdict

REPRODUCED (source-only confirmation). Bug confirmed by source tracing.

Mechanism

if_ath_ioctl.c:304 dispatches SIOCGATHSPECTRAL to ath_ioctl_spectral() OUTSIDE the #ifdef ATH_DIAGAPI guard (which protects SIOCGATHDIAG/SIOCGATHPHYERR). No caps_priv_check_self is performed, unlike SIOCZATHSTATS at line 288. Combined with DF-2080 this leaks kernel heap to unprivileged users.

Fix

Add caps_priv_check_self(SYSCAP_NODRIVER) before dispatching SIOCGATHSPECTRAL, matching the SIOCZATHSTATS pattern.

Batch-build status

Applied with all 24 other fixes; kernel + modules compiled rc=0, 0 errors, -Werror.

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

Added caps_priv_check_self; batch build rc=0.

Added caps_priv_check_self; batch build rc=0.
↓ fix.diffcombined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none

Evidence (decisive lines)

SIOCGATHSPECTRAL no caps_priv_check.

Verified recommended fix

SIOCGATHSPECTRAL no caps_priv_check.

Verdict

SIOCGATHSPECTRAL no caps_priv_check.