qcacld-3.0: validate NLA attr in wlan_hdd_cfg80211_extscan_set_significant_change

NLA attr QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM
used without validation.

validate NLA attribute.

CRs-Fixed: 2025678
Change-Id: Iee9a8f91cc1b5a6c76c5abaef48c0fa29110062e
This commit is contained in:
SaidiReddy Yenuga 2017-03-28 17:09:56 +05:30 • committed by snandini
commit 6f4763de68

View file

@ -2229,6 +2229,10 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
hdd_debug("Number of AP %d Session Id %d",
pReqMsg->numAp, pReqMsg->sessionId);
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM]) {
hdd_err("attr ap threshold failed");
goto fail;
}
i = 0;
nla_for_each_nested(apTh,
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM],