summaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2016-09-13 15:51:03 +0200
committerJohannes Berg <johannes.berg@intel.com>2016-09-13 20:20:51 +0200
commit42ee231cd12c2e1eb015163d04a65950e895d4b7 (patch)
treed02c6a1474825a6d7bb0f035ae5b2cfffa393eb7 /net/wireless/nl80211.c
parentcfg80211: disallow shared key authentication with key index 4 (diff)
downloadlinux-42ee231cd12c2e1eb015163d04a65950e895d4b7.tar.xz
linux-42ee231cd12c2e1eb015163d04a65950e895d4b7.zip
nl80211: fix connect keys range check
Only key index 0-3 should be accepted, 4/5 are for IGTKs and cannot be used as connect keys. Fix the range checking to not allow such erroneous configurations. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c11c1ef6daa7..524f5d238c14 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -866,7 +866,7 @@ nl80211_parse_connkeys(struct cfg80211_registered_device *rdev,
err = -EINVAL;
if (!parse.p.key)
goto error;
- if (parse.idx < 0 || parse.idx > 4)
+ if (parse.idx < 0 || parse.idx > 3)
goto error;
if (parse.def) {
if (def)