Skip to content

Commit a9e54cb

Browse files
committed
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>
2 parents cfe90f4 + 3dc289f commit a9e54cb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

net/wireless/nl80211.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4172,6 +4172,9 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)
41724172
if (err)
41734173
return err;
41744174

4175+
if (key.idx < 0)
4176+
return -EINVAL;
4177+
41754178
if (info->attrs[NL80211_ATTR_MAC])
41764179
mac_addr = nla_data(info->attrs[NL80211_ATTR_MAC]);
41774180

0 commit comments

Comments
 (0)