[BUG] wifi: mac80211: WARNING in __rate_control_send_low during scan
From: ZW Tang
Date: Mon Aug 31 2026 - 03:09:36 EST
Hi,
I am reporting a warning triggered by a syzkaller reproducer on
Linux 7.2.0-rc3. A similar issue appears to have been reported before, but
I can still reproduce it on Linux 7.2.0-rc3 with HEAD commit
1137d8b5df06137fb49513cc923b3b24d94cb809.
The reproducer uses nl80211 to trigger a scan on wlan1 with crafted scan
attributes and flags, including TX_NO_CCK_RATE. During scan work,
mac80211 builds and transmits a probe request. The transmit path reaches
ieee80211_tx_h_rate_ctrl(), rate_control_get_rate(), and then
__rate_control_send_low().
At that point mac80211 reports that there are no supported rates for the
station under the current rate mask and flags, and then triggers a warning
in net/mac80211/rate.c.
This looks like a mac80211 scan/rate-control robustness issue. A crafted
scan request can produce a combination of band, rate mask, station rates
and scan flags for which no usable rate remains. The kernel should avoid
triggering a warning in this case, for example by not applying the normal
rate mask to scan probe requests or by rejecting the scan parameters
cleanly, because panic_on_warn turns this into a kernel panic.
Reproducer:
syz reproducer:
r0 = socket$nl_generic(0x10, 0x3, 0x10)
r1 = syz_genetlink_get_family_id$nl80211(&(0x7f0000000200), r0)
ioctl$sock_SIOCGIFINDEX_80211(r0, 0x8933,
&(0x7f0000000700)={'wlan1\x00', <r2=>0x0})
sendmsg$NL80211_CMD_TRIGGER_SCAN(r0, &(0x7f0000000340)={0x0, 0x0,
&(0x7f0000000300)={&(0x7f0000000740)={0x84, r1, 0x5, 0x48000, 0x0,
{{}, {@val={0x8, 0x3, r2}, @void}}, [@NL80211_ATTR_BSSID={0xa, 0xf5,
@from_mac}, @NL80211_ATTR_SCAN_SSIDS={0x10, 0x2d, 0x0, 0x1, [{0xa,
0x0, @default_ap_ssid}]}, @NL80211_ATTR_SCAN_FLAGS={0x8, 0x9e, 0x202},
@NL80211_ATTR_IE={0x4}, @NL80211_ATTR_SCAN_FLAGS={0x8, 0x9e, 0x1000},
@NL80211_ATTR_MEASUREMENT_DURATION={0x6, 0xeb, 0x2},
@NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST={0x6, 0xf7, {0xf, 0xfe}},
@NL80211_ATTR_MEASUREMENT_DURATION={0x6, 0xeb, 0x2},
@NL80211_ATTR_SCAN_SSIDS={0x1c, 0x2d, 0x0, 0x1, [{0xa, 0x0,
@default_ibss_ssid}, {0xa, 0x0, @default_ap_ssid}]},
@NL80211_ATTR_TX_NO_CCK_RATE={0x4}]}, 0x84}}, 0x0)
r3 = socket$nl_generic(0x10, 0x3, 0x10)
r4 = syz_genetlink_get_family_id$nl80211(&(0x7f0000000080), 0xffffffffffffffff)
sendmsg$NL80211_CMD_REMAIN_ON_CHANNEL(r3, &(0x7f0000000480)={0x0,
0x60, &(0x7f0000000140)={&(0x7f00000002c0)={0x1c, r4,
0x9c3fa077fa966179, 0x0, 0x0, {{0x7e}, {@val={0x8}, @void}}}, 0x1c}},
0x0)
console output: https://pastebin.com/raw/Q3vbBYc1
kernel config: https://pastebin.com/raw/YWdYitkv
Kernel:
HEAD commit: 1137d8b5df06137fb49513cc923b3b24d94cb809
git tree: torvalds/linux
kernel version: 7.2.0-rc3 #1 PREEMPT(full) (QEMU Ubuntu 24.10)
Relevant log:
no supported rates for sta 08:02:11:00:00:00 (0xf, band 0) in
rate_mask 0xffffffff with flags 0x10
------------[ cut here ]------------
WARNING: net/mac80211/rate.c:399 at
__rate_control_send_low.isra.0+0x619/0x770, CPU#1: kworker/u8:3/53
CPU: 1 UID: 0 PID: 53 Comm: kworker/u8:3 Not tainted 7.2.0-rc3 #1 PREEMPT(full)
Hardware name: QEMU Ubuntu 24.10 PC (i440FX + PIIX, 1996)
Workqueue: events_unbound cfg80211_wiphy_work
RIP: 0010:__rate_control_send_low.isra.0+0x62b/0x770
Call Trace:
<TASK>
rate_control_send_low+0x12b/0x870
rate_control_get_rate+0x1bd/0x5b0
ieee80211_tx_h_rate_ctrl+0x7b6/0x19e0
invoke_tx_handlers_late+0x1000/0x2830
ieee80211_tx+0x2f3/0x460
ieee80211_xmit+0x308/0x3e0
__ieee80211_tx_skb_tid_band+0x2e2/0x7c0
ieee80211_scan_state_send_probe+0x36a/0xb10
ieee80211_scan_work+0x834/0x1d80
cfg80211_wiphy_work+0x31f/0x740
process_scheduled_works+0x5ed/0x1c90
worker_thread+0x5be/0xd20
kthread+0x404/0x530
ret_from_fork+0x7c5/0xde0
ret_from_fork_asm+0x1a/0x30
</TASK>
Kernel panic - not syncing: kernel: panic_on_warn set ...