From c533202e260764c287f6178085c7e875695ee6fc Mon Sep 17 00:00:00 2001 From: SaidiReddy Yenuga Date: Tue, 28 Mar 2017 17:16:48 +0530 Subject: [PATCH] qcacld-3.0: Validate NLA attr in hdd_extscan_epno_fill_network_list NLA attribute QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORKS_LIST used without validation. validate NLA attribute. CRs-Fixed: 2025680 Change-Id: I4da7dbe44325b0ed6346b363b71b558250996f8c --- core/hdd/src/wlan_hdd_ext_scan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c index e71a3f658bd5..e69818655ef4 100644 --- a/core/hdd/src/wlan_hdd_ext_scan.c +++ b/core/hdd/src/wlan_hdd_ext_scan.c @@ -3728,6 +3728,11 @@ static int hdd_extscan_epno_fill_network_list( expected_networks = req_msg->num_networks; index = 0; + + if (!tb[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORKS_LIST]) { + hdd_err("attr networks list failed"); + return -EINVAL; + } nla_for_each_nested(networks, tb[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORKS_LIST], rem1) {