linux/drivers/net/wireless/virtual
Yousef Alhouseen 23b493d9dc wifi: mac80211_hwsim: avoid treating MCS as legacy rate index
Injected HT and VHT rates store an MCS value in rates[0].idx rather
than an index into the legacy bitrate table. hwsim nevertheless passes
these rates to ieee80211_get_tx_rate() while generating monitor frames
and timestamps.

A crafted injected frame can therefore read beyond the bitrate table.
If the resulting bitrate is zero, mac80211_hwsim_write_tsf() also
divides by zero, as observed by syzbot.

Use ieee80211_get_tx_rate() only for legacy rates. The existing fallback
continues to supply a conservative bitrate where hwsim does not yet
calculate MCS rates.

Reported-by: syzbot+21629c14aa749636db9d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=21629c14aa749636db9d
Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
Link: https://patch.msgid.link/20260628002537.23550-1-alhouseenyousef@gmail.com
[drop wrong Fixes tag]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-07-06 14:11:07 +02:00
..
Kconfig
mac80211_hwsim_i.h wifi: mac80211_hwsim: implement NAN schedule callbacks 2026-05-06 11:41:50 +02:00
mac80211_hwsim_main.c wifi: mac80211_hwsim: avoid treating MCS as legacy rate index 2026-07-06 14:11:07 +02:00
mac80211_hwsim_nan.c wifi: mac80211_hwsim: Support Tx of multicast data on NAN 2026-05-06 11:42:12 +02:00
mac80211_hwsim_nan.h wifi: mac80211_hwsim: add NAN data path TX/RX support 2026-05-06 11:41:51 +02:00
mac80211_hwsim.h wifi: mac80211_hwsim: background CAC support 2026-03-02 09:10:28 +01:00
Makefile wifi: mac80211_hwsim: split NAN handling into separate file 2026-05-05 12:10:15 +02:00
virt_wifi.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-04-02 11:03:13 -07:00