linux-yocto/net/mac80211
Mikhail Lobanov e442a966e2 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>
[ Summary of conflict resolutions:
  - Function ieee80211_parse_bitrates() takes channel width as its
    first parameter in mainline kernel version. In v5.15 the function
    takes the whole chandef struct as its first parameter.
  - The same function takes link station parameters as its last
    parameter, and in v5.15 they are in a struct called sta,
    instead of a struct called link_sta. ]
Signed-off-by: Hanne-Lotta Mäenpää <hannelotta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:24:39 +02:00
..
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 mac80211: fix memory leaks with element parsing 2022-10-15 07:59:05 +02:00
agg-tx.c wifi: mac80211: fix BA session teardown race 2024-09-04 13:23:20 +02:00
airtime.c wifi: mac8021: fix possible oob access in ieee80211_get_rate_duration 2022-12-08 11:28:40 +01:00
cfg.c wifi: mac80211: check basic rates validity in sta_link_apply_parameters 2025-08-28 16:24:39 +02:00
chan.c wifi: mac80211: simplify chanctx allocation 2023-06-09 10:32:25 +02:00
debug.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
debugfs.c
debugfs.h
driver-ops.c wifi: mac80211: fix BA session teardown race 2024-09-04 13:23:20 +02:00
driver-ops.h
ethtool.c
fils_aead.c
fils_aead.h
he.c wifi: mac80211: correctly parse Spatial Reuse Parameter Set element 2024-07-05 09:14:05 +02:00
ht.c
ibss.c mac80211: fix memory leaks with element parsing 2022-10-15 07:59:05 +02:00
ieee80211_i.h mac80211: Add support to trigger sta disconnect on hardware restart 2024-11-08 16:25:52 +01:00
iface.c wifi: mac80211: Purge vif txq in ieee80211_do_stop() 2025-05-02 07:44:08 +02:00
Kconfig mac80211: MAC80211_MESSAGE_TRACING should depend on TRACING 2024-11-08 16:25:51 +01:00
key.c wifi: mac80211: skip non-uploaded keys in ieee80211_iter_keys 2024-11-08 16:25:52 +01:00
key.h
led.c
led.h
main.c mac80211: fix user-power when emulating chanctx 2024-12-14 19:50:39 +01:00
Makefile
mesh_hwmp.c wifi: mac80211: do not offer a mesh path if forwarding is disabled 2025-06-27 11:05:32 +01:00
mesh_pathtbl.c wifi: mac80211: mesh: Fix leak of mesh_preq_queue objects 2024-07-05 09:14:04 +02:00
mesh_plink.c wifi: mac80211: mesh_plink: fix matches_local logic 2024-01-05 15:13:28 +01:00
mesh_ps.c
mesh_sync.c mac80211: mesh: clean up rx_bcn_presp API 2022-10-15 07:59:04 +02:00
mesh.c wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata 2024-07-27 10:46:08 +02:00
mesh.h
michael.c
michael.h
mlme.c wifi: mac80211: don't complete management TX on SAE commit 2025-08-28 16:24:21 +02:00
ocb.c
offchannel.c
pm.c
rate.c
rate.h
rc80211_minstrel_ht_debugfs.c
rc80211_minstrel_ht.c mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output) 2022-06-09 10:22:31 +02:00
rc80211_minstrel_ht.h
rx.c wifi: mac80211: drop invalid source address OCB frames 2025-07-10 15:57:47 +02:00
s1g.c wifi: mac80211: Set TWT Information Frame Disabled bit as 1 2022-11-16 09:58:14 +01:00
scan.c wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan() 2024-07-27 10:46:08 +02:00
spectmgmt.c
sta_info.c wifi: mac80211: fix BA session teardown race 2024-09-04 13:23:20 +02:00
sta_info.h
status.c
tdls.c mac80211: always allocate struct ieee802_11_elems 2022-10-15 07:59:05 +02:00
tkip.c
tkip.h
trace_msg.h
trace.c
trace.h wifi: mac80211: fix min center freq offset tracing 2023-05-24 17:36:51 +01:00
tx.c Reapply "wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()" 2025-08-28 16:24:08 +02:00
util.c wifi: mac80211: fix beacon interval calculation overflow 2025-07-10 15:57:38 +02:00
vht.c
wep.c
wep.h
wme.c wifi: mac80211: fix qos on mesh interfaces 2023-03-30 12:47:58 +02:00
wme.h
wpa.c
wpa.h