From 7842cc70fb28ef9132c88922b9a1653cd59f72be Mon Sep 17 00:00:00 2001 From: sheenam monga Date: Wed, 14 Apr 2021 17:46:01 +0530 Subject: [PATCH] qcacld-3.0: Validate channel list count before updting acs channel range Currently, do_acs may invoke wlan_hdd_set_acs_ch_range with channel list count is 0. In case of SAP+SAP turned on non-dbs hardware, Intersection of supported frequencies may become zero and channel list count will become zero. while handling 0 channel list count in wlan_hdd_handle_zero_acs_list, if sta count is 0 then channel list will not be updated to 1 which may cause OOB issue while updating acs channel range. Fix is to validate channel list count before populating acs channel list. Change-Id: Iffbe139748e76cd692e774e5f9db2c1c3d086332 CRs-Fixed: 2922790 --- core/hdd/src/wlan_hdd_cfg80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 7e245482cad2..8002f7401157 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -3286,6 +3286,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, sap_config); ret = 0; goto out; + } else if (!sap_config->acs_cfg.ch_list_count) { + hdd_err("channel list count 0"); + ret = -EINVAL; + goto out; } }