* [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
@ 2024-12-06 12:52 Dan Carpenter
2024-12-09 15:45 ` Kalle Valo
2024-12-11 17:20 ` Jeff Johnson
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-12-06 12:52 UTC (permalink / raw)
To: Sriram R
Cc: Kalle Valo, Jeff Johnson, Rameshkumar Sundaram, linux-wireless,
ath12k, linux-kernel, kernel-janitors
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 <dan.carpenter@linaro.org>
---
drivers/net/wireless/ath/ath12k/wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
2024-12-06 12:52 [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event() Dan Carpenter
@ 2024-12-09 15:45 ` Kalle Valo
2024-12-11 17:20 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-12-09 15:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sriram R, Jeff Johnson, Rameshkumar Sundaram, linux-wireless,
ath12k, linux-kernel, kernel-janitors
Dan Carpenter <dan.carpenter@linaro.org> writes:
> 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 <dan.carpenter@linaro.org>
Acked-by: Kalle Valo <kvalo@kernel.org>
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
2024-12-06 12:52 [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event() Dan Carpenter
2024-12-09 15:45 ` Kalle Valo
@ 2024-12-11 17:20 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2024-12-11 17:20 UTC (permalink / raw)
To: Sriram R, Dan Carpenter
Cc: Kalle Valo, Jeff Johnson, Rameshkumar Sundaram, linux-wireless,
ath12k, linux-kernel, kernel-janitors
On Fri, 06 Dec 2024 15:52:29 +0300, Dan Carpenter wrote:
> 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.
>
>
Applied, thanks!
[1/1] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
commit: 58fa8109fa8dae2947567e8f56dbd55ad81bc35c
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-11 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 12:52 [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event() Dan Carpenter
2024-12-09 15:45 ` Kalle Valo
2024-12-11 17:20 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).