Browse Source

qcacld-3.0: Validate NLA attr in hdd_extscan_passpoint_fill_network_list

NLA attribute
QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NETWORK_ARRAY
used without validation.

validate NLA attribute.

CRs-Fixed: 2025685
Change-Id: I141d5e6b3872df70b18797a99c943fca1cc5d31e
SaidiReddy Yenuga 8 years ago
parent
commit
8c85acb5e8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      core/hdd/src/wlan_hdd_ext_scan.c

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

@@ -4032,6 +4032,11 @@ static int hdd_extscan_passpoint_fill_network_list(
 
 	expected_networks = req_msg->num_networks;
 	index = 0;
+
+	if (!tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NETWORK_ARRAY]) {
+		hdd_err("attr network array failed");
+		return -EINVAL;
+	}
 	nla_for_each_nested(networks,
 		tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NETWORK_ARRAY],
 		rem1) {