qcacld-2.0: Validate NLA attr in bssid extscan hotlist API

qcacld-3.0 to qcacld-2.0 Propagation.

NLA attribute QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM
used without validation.

validate NLA attribute.

CRs-Fixed: 2056296
Change-Id: I71f7452f0c7a1947326aefc2348b8f72b48f2895
This commit is contained in:
SaidiReddy Yenuga 2017-06-05 17:26:11 +05:30 committed by syphyr
parent 8cb700c232
commit f70030993f
1 changed files with 4 additions and 0 deletions

View File

@ -2856,6 +2856,10 @@ static int __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
pReqMsg->sessionId = pAdapter->sessionId;
hddLog(LOG1, FL("Session Id %d"), pReqMsg->sessionId);
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM]) {
hddLog(LOGE, FL("attr ap threshold failed"));
goto fail;
}
i = 0;
nla_for_each_nested(apTh,
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM], rem) {