Browse Source

qcacld-3.0: validate NLA attr in wlan_hdd_cfg80211_set_ext_roam_params

NLA attr QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PREFS
used without validation.

validate NLA attribute.

CRs-Fixed: 2025636
Change-Id: I810f6a15b425638330211919c606e52de562cf9c
SaidiReddy Yenuga 8 years ago
parent
commit
32fa740c85
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 4 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3398,6 +3398,10 @@ __wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy,
 			goto fail;
 		}
 		hdd_debug("Num of Preferred BSSID (%d)", count);
+		if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PREFS]) {
+			hdd_err("attr Preferred BSSID failed");
+			goto fail;
+		}
 		i = 0;
 		nla_for_each_nested(curr_attr,
 			tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PREFS],