mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-14 12:55:53 -04:00
wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
The ahvif->vif->link_conf[] array has IEEE80211_MLD_MAX_NUM_LINKS elements
so this should be >= instead of > to avoid an out of bounds access.
Fixes: 3952657848 ("wifi: ath12k: Use mac80211 vif's link_conf instead of bss_conf")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/755becb1-819b-484d-8fac-9a2db53ced1b@stanley.mountain
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
02f41c8aa6
commit
58fa8109fa
@@ -6873,7 +6873,7 @@ ath12k_wmi_process_csa_switch_count_event(struct ath12k_base *ab,
|
||||
}
|
||||
ahvif = arvif->ahvif;
|
||||
|
||||
if (arvif->link_id > IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
if (arvif->link_id >= IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
ath12k_warn(ab, "Invalid CSA switch count even link id: %d\n",
|
||||
arvif->link_id);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user