From 628d3ef6902d94cd09a437e752a5a1961bd570c9 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Fri, 27 Dec 2019 15:16:25 +0530 Subject: [PATCH] qcacld-3.0: Check for zero/broadcast BSSID in BLM Currently the BLM does not check the BSSID of the entry for 0 or broadcast BSSID, and thus can lead to addition of many entries with such property. This would also result in removal of old valid BSSID entry data, which is essentially required. Fix is to check the BSSID of the entry for 0 or broadcast, and reject them if not valid. Change-Id: I2939673a1c4efb1a22e03ffe82121513c071fa4b CRs-Fixed: 2595331 --- components/blacklist_mgr/core/src/wlan_blm_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/blacklist_mgr/core/src/wlan_blm_core.c b/components/blacklist_mgr/core/src/wlan_blm_core.c index 228164540771..87d3d8cae6c5 100644 --- a/components/blacklist_mgr/core/src/wlan_blm_core.c +++ b/components/blacklist_mgr/core/src/wlan_blm_core.c @@ -719,6 +719,12 @@ blm_add_bssid_to_reject_list(struct wlan_objmgr_pdev *pdev, return QDF_STATUS_E_INVAL; } + if (qdf_is_macaddr_zero(&ap_info->bssid) || + qdf_is_macaddr_group(&ap_info->bssid)) { + blm_err("Zero/Broadcast BSSID received, entry not added"); + return QDF_STATUS_E_INVAL; + } + status = qdf_mutex_acquire(&blm_ctx->reject_ap_list_lock); if (QDF_IS_STATUS_ERROR(status)) { blm_err("failed to acquire reject_ap_list_lock");