Skip to content

Commit c8d7f21

Browse files
committed
wifi: cfg80211: wext: fix IGTK key ID off-by-one
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>
1 parent 8bf22c3 commit c8d7f21

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/wireless/wext-compat.c

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

685685
idx = erq->flags & IW_ENCODE_INDEX;
686686
if (cipher == WLAN_CIPHER_SUITE_AES_CMAC) {
687-
if (idx < 4 || idx > 5) {
687+
if (idx < 5 || idx > 6) {
688688
idx = wdev->wext.default_mgmt_key;
689689
if (idx < 0)
690690
return -EINVAL;

0 commit comments

Comments
 (0)