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
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index 267b0f6..5a48fd9 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -2229,6 +2229,10 @@
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],