From: Dan Carpenter <dan.carpenter@linaro.org>
To: Sriram R <quic_srirrama@quicinc.com>
Cc: Kalle Valo <kvalo@kernel.org>, Jeff Johnson <jjohnson@kernel.org>,
Rameshkumar Sundaram <quic_ramess@quicinc.com>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event()
Date: Fri, 6 Dec 2024 15:52:29 +0300 [thread overview]
Message-ID: <755becb1-819b-484d-8fac-9a2db53ced1b@stanley.mountain> (raw)
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
next reply other threads:[~2024-12-06 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 12:52 Dan Carpenter [this message]
2024-12-09 15:45 ` [PATCH next] wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event() Kalle Valo
2024-12-11 17:20 ` Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=755becb1-819b-484d-8fac-9a2db53ced1b@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=ath12k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_ramess@quicinc.com \
--cc=quic_srirrama@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox