Skip to content
/ linux Public

Commit 1f40fde

Browse files
jmberg-intelSasha Levin
authored andcommitted
wifi: cfg80211: wext: fix IGTK key ID off-by-one
[ Upstream commit c8d7f21 ] The IGTK key ID must be 4 or 5, but the code checks against key ID + 1, so must check against 5/6 rather than 4/5. Fix that. Reported-by: Jouni Malinen <j@w1.fi> Fixes: 0864512 ("cfg80211: implement wext key handling") Link: https://patch.msgid.link/20260209181220.362205-2-johannes@sipsolutions.net Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3224379 commit 1f40fde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/wireless/wext-compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev,
735735

736736
idx = erq->flags & IW_ENCODE_INDEX;
737737
if (cipher == WLAN_CIPHER_SUITE_AES_CMAC) {
738-
if (idx < 4 || idx > 5) {
738+
if (idx < 5 || idx > 6) {
739739
idx = wdev->wext.default_mgmt_key;
740740
if (idx < 0)
741741
return -EINVAL;

0 commit comments

Comments
 (0)