wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
Subsystems (2)
PATCH 1/1 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 3952657848c0 ("wifi: ath12k: Use mac80211 vif's link_conf instead of bss_conf")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/wireless/ath/ath12k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath12k/wmi.c +1 -1
@@ -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 ;
Signature · 1 line
2.45.2
Quoted 5 lines · Dan Carpenter
The ahvif->vif->link_conf[] array has
IEEE80211_MLD_MAX_NUM_LINKSelements so this should be >= instead of > to avoid an out of bounds access.Fixes 3952657848c0 ("wifi: ath12k: Use mac80211 vif's link_conf instead of bss_conf")Signed-off-by Dan Carpenter <[email protected]>
Acked-by Kalle Valo <[email protected]>
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Jeff Johnson
AppliedQuoted 4 lines · Dan Carpenter
The ahvif->vif->link_conf[] array has
IEEE80211_MLD_MAX_NUM_LINKSelements so this should be >= instead of > to avoid an out of bounds access.
Applied, thanks!
[1/1] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
commit: 58fa8109fa8dae2947567e8f56dbd55ad81bc35c
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>