[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e91fb43fcedc4893b604dfb973131661510901a7.1756456951.git.dan.carpenter@linaro.org>
Date: Fri, 29 Aug 2025 15:48:28 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Solomon Peachy <pizza@...ftnet.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...nel.org>,
Johannes Berg <johannes.berg@...el.com>,
Roopni Devanathan <quic_rdevanat@...cinc.com>,
"John W. Linville" <linville@...driver.com>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] wifi: cw1200: cap SSID length in cw1200_do_join()
If the ssidie[1] length is more that 32 it leads to memory corruption.
Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
drivers/net/wireless/st/cw1200/sta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c
index b1dd76e8aecb..5d8eaa700779 100644
--- a/drivers/net/wireless/st/cw1200/sta.c
+++ b/drivers/net/wireless/st/cw1200/sta.c
@@ -1291,7 +1291,7 @@ static void cw1200_do_join(struct cw1200_common *priv)
rcu_read_lock();
ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID);
if (ssidie) {
- join.ssid_len = ssidie[1];
+ join.ssid_len = min(ssidie[1], IEEE80211_MAX_SSID_LEN);
memcpy(join.ssid, &ssidie[2], join.ssid_len);
}
rcu_read_unlock();
--
2.47.2
Powered by blists - more mailing lists