diff options
| author | Dan Carpenter <[email protected]> | 2024-12-06 12:52:29 +0000 |
|---|---|---|
| committer | Jeff Johnson <[email protected]> | 2024-12-11 17:18:54 +0000 |
| commit | 58fa8109fa8dae2947567e8f56dbd55ad81bc35c (patch) | |
| tree | de6368f684aa7e16f47c99c8f9fc43fbabc24196 /drivers/net/wireless/ath/ath12k/wmi.c | |
| parent | wifi: ath12k: fix leaking michael_mic for non-primary links (diff) | |
| download | kernel-58fa8109fa8dae2947567e8f56dbd55ad81bc35c.tar.gz kernel-58fa8109fa8dae2947567e8f56dbd55ad81bc35c.zip | |
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]>
Acked-by: Kalle Valo <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jeff Johnson <[email protected]>
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/wmi.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath12k/wmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 402ae477da61..46c5027e4f1c 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -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; |
