wifi: rtw89: check if sta's mac_id is valid under AP/TDLS
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtw89: check if sta's mac_id is valid under AP/TDLS
From: Zong-Zhe Yang <[email protected]>
Add boundary check of mac_id when adding sta under AP/TDLS. And, return -ENOSPC if the acquired mac_id is invalid.
Signed-off-by Zong-Zhe Yang <[email protected]>
Signed-off-by Ping-Ke Shih <[email protected]>
--- drivers/net/wireless/realtek/rtw89/core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/realtek/rtw89/core.c +2 -0
@@ -2413,6 +2413,8 @@ int rtw89_core_sta_add(struct rtw89_dev *rtwdev, }else if (vif->type ==NL80211_IFTYPE_AP || sta->tdls) { rtwsta->mac_id =rtw89_core_acquire_bit_map (rtwdev->mac_id_map,RTW89_MAX_MAC_ID_NUM ); +if (rtwsta->mac_id ==RTW89_MAX_MAC_ID_NUM ) +return -ENOSPC ; }return 0 ;
Signature · 1 line
2.25.1
Quoted 7 lines · Ping-Ke Shih
From: Zong-Zhe Yang <[email protected]>
Add boundary check of
mac_idwhen adding sta under AP/TDLS. And, return-ENOSPCif the acquiredmac_idis invalid.Signed-off-by Zong-Zhe Yang <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
Patch applied to wireless-next.git, thanks.
46245bc42aff wifi: rtw89: check if sta's mac_id is valid under AP/TDLS
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches