mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-18 14:11:07 +00:00
wifi: cfg80211: wext: fix IGTK key ID off-by-one
[ Upstream commit c8d7f21ead727485ebf965e2b4d42d4a4f0840f6 ]
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: 08645126dd ("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>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
committed by
Ulrich Hecht
parent
148a6fa9c4
commit
f046dadb4d
@ -677,7 +677,7 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev,
|
||||
|
||||
idx = erq->flags & IW_ENCODE_INDEX;
|
||||
if (cipher == WLAN_CIPHER_SUITE_AES_CMAC) {
|
||||
if (idx < 4 || idx > 5) {
|
||||
if (idx < 5 || idx > 6) {
|
||||
idx = wdev->wext.default_mgmt_key;
|
||||
if (idx < 0)
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user