linux-yocto/net
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
..
6lowpan
9p 9p/xen: fix release of IRQ 2024-12-14 19:51:21 +01:00
802 net: 802: LLC+SNAP OID:PID lookup on start of skb data 2025-01-23 17:15:49 +01:00
8021q net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime 2025-08-28 16:24:02 +02:00
appletalk net: appletalk: Fix use-after-free in AARP proxy probe 2025-08-28 16:24:04 +02:00
atm atm: clip: Fix NULL pointer dereference in vcc_sendmsg() 2025-07-17 18:30:47 +02:00
ax25
batman-adv batman-adv: Ignore own maximum aggregation size during RX 2025-04-10 14:31:55 +02:00
bluetooth Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU 2025-08-28 16:24:02 +02:00
bpf
bpfilter
bridge net: bridge: fix soft lockup in br_multicast_query_expired() 2025-08-28 16:24:37 +02:00
caif caif: reduce stack size, again 2025-08-28 16:24:07 +02:00
can can: bcm: add missing rcu read protection for procfs content 2025-06-04 14:38:06 +02:00
ceph
core netpoll: prevent hanging NAPI when netcons gets enabled 2025-08-28 16:24:13 +02:00
dcb
dccp net: fix data-races around sk->sk_forward_alloc 2025-01-23 17:16:04 +01:00
dns_resolver
dsa net: dsa: tag_brcm: legacy: fix pskb_may_pull length 2025-06-27 11:05:17 +01:00
ethernet gro: remove rcu_read_lock/rcu_read_unlock from gro_complete handlers 2024-09-12 11:07:47 +02:00
ethtool net: ethtool: Don't call .cleanup_data when prepare_data fails 2025-05-02 07:43:52 +02:00
hsr net, hsr: reject HSR frame if skb can't hold tag 2025-08-28 16:24:30 +02:00
ieee802154 net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() 2024-12-14 19:51:37 +01:00
ife
ipv4 netfilter: nf_reject: don't leak dst refcount for loopback packets 2025-08-28 16:24:39 +02:00
ipv6 netfilter: nf_reject: don't leak dst refcount for loopback packets 2025-08-28 16:24:39 +02:00
iucv
kcm
key
l2tp genetlink: hold RCU in genlmsg_mcast() 2024-11-01 01:52:34 +01:00
l3mdev net: Add l3mdev index to flow struct and avoid oif reset for port devices 2024-10-17 15:11:57 +02:00
lapb
llc llc: fix data loss when reading from a socket in llc_ui_recvmsg() 2025-06-04 14:38:06 +02:00
mac80211 wifi: mac80211: check basic rates validity in sta_link_apply_parameters 2025-08-28 16:24:39 +02:00
mac802154 mac802154: check local interfaces before deleting sdata list 2025-01-23 17:16:00 +01:00
mctp net: mctp: Prevent duplicate binds 2025-08-28 16:24:20 +02:00
mpls mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu(). 2025-06-27 11:05:36 +01:00
mptcp mptcp: disable add_addr retransmission when timeout is 0 2025-08-28 16:24:35 +02:00
ncsi net: ncsi: Fix buffer overflow in fetching version id 2025-08-28 16:24:22 +02:00
netfilter netfilter: ctnetlink: fix refcount leak on table dump 2025-08-28 16:24:16 +02:00
netlabel calipso: unlock rcu before returning -EAFNOSUPPORT 2025-06-27 11:05:22 +01:00
netlink netlink: avoid infinite retry looping in netlink_unicast() 2025-08-28 16:24:15 +02:00
netrom netrom: check buffer length before accessing it 2025-01-09 13:28:46 +01:00
nfc NFC: nci: uart: Set tty->disc_data only in success path 2025-06-27 11:05:25 +01:00
nsh
openvswitch net: openvswitch: Fix the dead loop of MPLS parse 2025-06-27 11:05:14 +01:00
packet net/packet: fix a race in packet_set_ring() and packet_notifier() 2025-08-28 16:24:14 +02:00
phonet phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept() 2025-08-28 16:23:59 +02:00
psample
qrtr net: qrtr: Update packets cloning when broadcasting 2024-10-17 15:11:08 +02:00
rds net:rds: Fix possible deadlock in rds_message_put 2024-09-04 13:23:39 +02:00
rfkill net: rfkill: gpio: Add check for clk_enable() 2024-12-14 19:50:58 +01:00
rose rose: fix dangling neighbour pointers in rose_rt_device_down() 2025-07-10 15:57:46 +02:00
rxrpc rxrpc: Fix oops due to non-existence of prealloc backlog struct 2025-07-17 18:30:48 +02:00
sched net/sched: Remove unnecessary WARNING condition for empty child qdisc in htb_activate 2025-08-28 16:24:38 +02:00
sctp sctp: linearize cloned gso packets in sctp_rcv 2025-08-28 16:24:16 +02:00
smc net/smc: fix data error when recvmsg with MSG_PEEK flag 2025-03-13 12:49:57 +01:00
strparser
sunrpc sunrpc: fix race in cache cleanup causing stale nextcheck time 2025-06-27 11:05:29 +01:00
switchdev
tipc tipc: Fix use-after-free in tipc_conn_close(). 2025-07-17 18:30:46 +02:00
tls bpf, ktls: Fix data corruption when using bpf_msg_pop_data() in ktls 2025-08-28 16:24:07 +02:00
unix af_unix: Don't set -ECONNRESET for consumed OOB skb. 2025-07-10 15:57:38 +02:00
vmw_vsock vsock: Do not allow binding to VMADDR_PORT_ANY 2025-08-28 16:24:14 +02:00
wireless wifi: cfg80211: reject HTC bit for management frames 2025-08-28 16:24:20 +02:00
x25
xdp xsk: fix OOB map writes when deleting elements 2024-12-14 19:51:33 +01:00
xfrm xfrm: Sanitize marks before insert 2025-06-04 14:38:05 +02:00
compat.c
devres.c
Kconfig
Makefile
socket.c net: explicitly clear the sk pointer, when pf->create fails 2024-10-17 15:12:00 +02:00
sysctl_net.c