linux-stable/net/mac80211
Mikhail Lobanov 110821e5de wifi: mac80211: check basic rates validity in sta_link_apply_parameters
commit 16ee3ea8fa upstream.

When userspace sets supported rates for a new station via
NL80211_CMD_NEW_STATION, it might send a list that's empty
or contains only invalid values. Currently, we process these
values in sta_link_apply_parameters() without checking the result of
ieee80211_parse_bitrates(), which can lead to an empty rates bitmap.

A similar issue was addressed for NL80211_CMD_SET_BSS in commit
ce04abc3fc ("wifi: mac80211: check basic rates validity").
This patch applies the same approach in sta_link_apply_parameters()
for NL80211_CMD_NEW_STATION, ensuring there is at least one valid
rate by inspecting the result of ieee80211_parse_bitrates().

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: b95eb7f0ee ("wifi: cfg80211/mac80211: separate link params from station params")
Signed-off-by: Mikhail Lobanov <m.lobanov@rosa.ru>
Link: https://patch.msgid.link/20250317103139.17625-1-m.lobanov@rosa.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hanne-Lotta Mäenpää <hannelotta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-20 18:30:56 +02:00
..
tests
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c
aes_cmac.h
aes_gcm.h
aes_gmac.c
aes_gmac.h
agg-rx.c
agg-tx.c
airtime.c
cfg.c wifi: mac80211: check basic rates validity in sta_link_apply_parameters 2025-08-20 18:30:56 +02:00
chan.c wifi: mac80211: update radar_required in channel context after channel switch 2025-08-20 18:30:36 +02:00
debug.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c
debugfs_netdev.h
debugfs_sta.c Revert "mac80211: Dynamically set CoDel parameters per station" 2025-06-27 11:11:33 +01:00
debugfs_sta.h
debugfs.c wifi: mac80211: add strict mode disabling workarounds 2025-04-20 10:15:17 +02:00
debugfs.h
driver-ops.c wifi: mac80211: Fix sparse warning for monitor_sdata 2025-04-10 14:39:36 +02:00
driver-ops.h wifi: mac80211: set ieee80211_prep_tx_info::link_id upon Auth Rx 2025-05-29 11:02:56 +02:00
drop.h
eht.c
ethtool.c
fils_aead.c
fils_aead.h
he.c
ht.c
ibss.c
ieee80211_i.h wifi: mac80211: Create separate links for VLAN interfaces 2025-07-06 11:01:40 +02:00
iface.c wifi: mac80211: Create separate links for VLAN interfaces 2025-07-06 11:01:40 +02:00
Kconfig
key.c
key.h
led.c
led.h
link.c wifi: mac80211: avoid weird state in error path 2025-08-20 18:30:32 +02:00
main.c wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request 2025-05-22 14:29:43 +02:00
Makefile
mesh_hwmp.c wifi: mac80211: do not offer a mesh path if forwarding is disabled 2025-06-27 11:11:32 +01:00
mesh_pathtbl.c
mesh_plink.c
mesh_ps.c
mesh_sync.c
mesh.c
mesh.h
michael.c
michael.h
mlme.c wifi: mac80211: don't complete management TX on SAE commit 2025-08-20 18:30:32 +02:00
ocb.c
offchannel.c
parse.c wifi: mac80211: fix non-transmitted BSSID profile search 2025-07-17 18:37:17 +02:00
pm.c
rate.c Revert "mac80211: Dynamically set CoDel parameters per station" 2025-06-27 11:11:33 +01:00
rate.h
rc80211_minstrel_ht_debugfs.c
rc80211_minstrel_ht.c
rc80211_minstrel_ht.h
rx.c wifi: mac80211: fix rx link assignment for non-MLO stations 2025-08-20 18:30:33 +02:00
s1g.c
scan.c wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements 2025-06-19 15:32:19 +02:00
spectmgmt.c
sta_info.c Revert "mac80211: Dynamically set CoDel parameters per station" 2025-06-27 11:11:33 +01:00
sta_info.h Revert "mac80211: Dynamically set CoDel parameters per station" 2025-06-27 11:11:33 +01:00
status.c
tdls.c wifi: mac80211: reject TDLS operations when station is not associated 2025-08-15 12:13:44 +02:00
tkip.c
tkip.h
trace_msg.h
trace.c
trace.h
tx.c Reapply "wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()" 2025-08-15 12:13:45 +02:00
util.c wifi: mac80211: fix beacon interval calculation overflow 2025-07-06 11:01:40 +02:00
vht.c
wbrf.c
wep.c
wep.h
wme.c
wme.h
wpa.c
wpa.h