diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-09-13 15:51:03 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-09-13 20:20:51 +0200 |
commit | 42ee231cd12c2e1eb015163d04a65950e895d4b7 (patch) | |
tree | d02c6a1474825a6d7bb0f035ae5b2cfffa393eb7 /net/wireless | |
parent | b6b5555bc89f52e49244104ca4d7764c7b0f11cd (diff) | |
download | blackbird-op-linux-42ee231cd12c2e1eb015163d04a65950e895d4b7.tar.gz blackbird-op-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')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
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) |