385-cfg80211-nl80211_update_ft_ies-to-validate-NL80211_A.patch 1.0 KB

123456789101112131415161718192021222324252627
  1. From: Arunk Khandavalli <[email protected]>
  2. Date: Thu, 30 Aug 2018 00:40:16 +0300
  3. Subject: [PATCH] cfg80211: nl80211_update_ft_ies() to validate
  4. NL80211_ATTR_IE
  5. nl80211_update_ft_ies() tried to validate NL80211_ATTR_IE with
  6. is_valid_ie_attr() before dereferencing it, but that helper function
  7. returns true in case of NULL pointer (i.e., attribute not included).
  8. This can result to dereferencing a NULL pointer. Fix that by explicitly
  9. checking that NL80211_ATTR_IE is included.
  10. Fixes: 355199e02b83 ("cfg80211: Extend support for IEEE 802.11r Fast BSS Transition")
  11. Signed-off-by: Arunk Khandavalli <[email protected]>
  12. Signed-off-by: Jouni Malinen <[email protected]>
  13. Signed-off-by: Johannes Berg <[email protected]>
  14. ---
  15. --- a/net/wireless/nl80211.c
  16. +++ b/net/wireless/nl80211.c
  17. @@ -11763,6 +11763,7 @@ static int nl80211_update_ft_ies(struct
  18. return -EOPNOTSUPP;
  19. if (!info->attrs[NL80211_ATTR_MDID] ||
  20. + !info->attrs[NL80211_ATTR_IE] ||
  21. !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
  22. return -EINVAL;