]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rsi: validate beacon length before fixed buffer copy
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Sun, 5 Jul 2026 08:48:24 +0000 (16:48 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 6 Jul 2026 12:11:09 +0000 (14:11 +0200)
commit8ecdeb8b8a33b22c597299043c0dcfce50beb9ea
treefd5ded0a61c28afc821f3e4d0d503050913203a0
parent74ed3669f26803b1761c1f55403062bea44c3466
wifi: rsi: validate beacon length before fixed buffer copy

rsi_prepare_beacon() copies the mac80211 beacon frame after
FRAME_DESC_SZ into a management skb whose usable tailroom may be smaller
than MAX_MGMT_PKT_SIZE after alignment.

Validate the beacon length against the actual tailroom before the copy
and skb_put(). Leave ownership of the management skb with the caller on
error, matching the existing rsi_send_beacon() cleanup path.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260705084824.68105-1-pengpeng@iscas.ac.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/rsi/rsi_91x_hal.c