diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-09-13 16:25:58 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-09-13 20:20:51 +0200 |
commit | b6b5555bc89f52e49244104ca4d7764c7b0f11cd (patch) | |
tree | 9d1f60df03f7ab85f2885af62ac63a22942c3437 /net/wireless/mlme.c | |
parent | mac80211: remove useless open_count check (diff) | |
download | linux-b6b5555bc89f52e49244104ca4d7764c7b0f11cd.tar.xz linux-b6b5555bc89f52e49244104ca4d7764c7b0f11cd.zip |
cfg80211: disallow shared key authentication with key index 4
Key index 4 can only be used for an IGTK, so the range checks
for shared key authentication should treat 4 as an error, fix
that in the code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index c284d883c349..d6abb0704db5 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -222,7 +222,7 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev, ASSERT_WDEV_LOCK(wdev); if (auth_type == NL80211_AUTHTYPE_SHARED_KEY) - if (!key || !key_len || key_idx < 0 || key_idx > 4) + if (!key || !key_len || key_idx < 0 || key_idx > 3) return -EINVAL; if (wdev->current_bss && |