summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-10-08 22:18:34 +0300
committerJakub Kicinski <kuba@kernel.org>2020-10-08 22:18:34 +0300
commita9e54cb3d5eba9d7728f8efda98d7cca85ee3387 (patch)
tree2101ca57be614c9e2f7b8295cb1f7b121a120709 /net
parentcfe90f4980ee27ebfa24e4c4b3cd56dc9b67ef42 (diff)
parent3dc289f8f139997f4e9d3cfccf8738f20d23e47b (diff)
downloadlinux-a9e54cb3d5eba9d7728f8efda98d7cca85ee3387.tar.xz
Merge tag 'mac80211-for-net-2020-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== pull-request: mac80211 2020-10-08 A single fix for missing input validation in nl80211. ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2c9e9a2d1688..7fd45f6ddb05 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4172,6 +4172,9 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)
if (err)
return err;
+ if (key.idx < 0)
+ return -EINVAL;
+
if (info->attrs[NL80211_ATTR_MAC])
mac_addr = nla_data(info->attrs[NL80211_ATTR_MAC]);