summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorArunk Khandavalli <akhandav@codeaurora.org>2018-08-30 00:40:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-13 10:09:29 +0300
commit5f2da71a181a142bd6d94988b7de53afb5fddf2d (patch)
tree46ada7fb4ecadd6f118154f9067bec36a409db71 /net/wireless
parent9f91fbeeceec8d92bedd6e3e227f96753dbff092 (diff)
downloadlinux-5f2da71a181a142bd6d94988b7de53afb5fddf2d.tar.xz
cfg80211: nl80211_update_ft_ies() to validate NL80211_ATTR_IE
[ Upstream commit 4f0223bfe9c3e62d8f45a85f1ef1b18a8a263ef9 ] nl80211_update_ft_ies() tried to validate NL80211_ATTR_IE with is_valid_ie_attr() before dereferencing it, but that helper function returns true in case of NULL pointer (i.e., attribute not included). This can result to dereferencing a NULL pointer. Fix that by explicitly checking that NL80211_ATTR_IE is included. Fixes: 355199e02b83 ("cfg80211: Extend support for IEEE 802.11r Fast BSS Transition") Signed-off-by: Arunk Khandavalli <akhandav@codeaurora.org> Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fefc9a4d3592..2e1633ac93f7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9223,6 +9223,7 @@ static int nl80211_update_ft_ies(struct sk_buff *skb, struct genl_info *info)
return -EOPNOTSUPP;
if (!info->attrs[NL80211_ATTR_MDID] ||
+ !info->attrs[NL80211_ATTR_IE] ||
!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
return -EINVAL;