Kaynağa Gözat

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

NLA attribute QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM
used without validation.

validate NLA attribute.

CRs-Fixed: 2025669
Change-Id: I71f7452f0c7a1947326aefc2348b8f72b48f2895
SaidiReddy Yenuga 8 yıl önce
ebeveyn
işleme
a191738196
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      core/hdd/src/wlan_hdd_ext_scan.c

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

@@ -1988,6 +1988,10 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
 	hdd_debug("Lost ap sample size %d",
 			pReqMsg->lost_ap_sample_size);
 
+	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],