]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 29 Aug 2025 12:48:45 +0000 (15:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:56:24 +0000 (18:56 +0200)
commite472f59d02c82b511bc43a3f96d62ed08bf4537f
tree7dcb190cd95bf09ad6a3bb8fb05fa873946295e5
parent609f6debdff3f922cbf7ea146b1d1994e12f928b
wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()

[ Upstream commit 62b635dcd69c4fde7ce1de4992d71420a37e51e3 ]

If the ssid->datalen is more than IEEE80211_MAX_SSID_LEN (32) it would
lead to memory corruption so add some bounds checking.

Fixes: c38c70185101 ("wifi: cfg80211: Set SSID if it is not already set")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/0aaaae4a3ed37c6252363c34ae4904b1604e8e32.1756456951.git.dan.carpenter@linaro.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/sme.c