aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2016-09-13 09:51:03 -0400
committerJohannes Berg <johannes.berg@intel.com>2016-09-13 14:20:51 -0400
commit42ee231cd12c2e1eb015163d04a65950e895d4b7 (patch)
treed02c6a1474825a6d7bb0f035ae5b2cfffa393eb7 /net/wireless
parentb6b5555bc89f52e49244104ca4d7764c7b0f11cd (diff)
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')
-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,
866 err = -EINVAL; 866 err = -EINVAL;
867 if (!parse.p.key) 867 if (!parse.p.key)
868 goto error; 868 goto error;
869 if (parse.idx < 0 || parse.idx > 4) 869 if (parse.idx < 0 || parse.idx > 3)
870 goto error; 870 goto error;
871 if (parse.def) { 871 if (parse.def) {
872 if (def) 872 if (def)