Ver código fonte

qcacld-3.0: Fix NULL pointer dereferencing error in HDD

Issue has been identified in wlan_hdd_cfg80211_start_bss API where it is
trying to access ssid pointer before validating against NULL
which may result in system crash.

CRs-Fixed: 1110969
Change-Id: Ib70b9ed3bf7745aecfc9b2b2030a5fcc11c113b6
Krunal Soni 8 anos atrás
pai
commit
4f585b8873
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      core/hdd/src/wlan_hdd_hostapd.c

+ 1 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -7525,7 +7525,7 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
 		}
 	}
 	if (!pHddCtx->config->force_sap_acs &&
-	    (0 != qdf_mem_cmp(ssid, PRE_CAC_SSID, ssid_len))) {
+	    !(ssid && (0 == qdf_mem_cmp(ssid, PRE_CAC_SSID, ssid_len)))) {
 		pIe = wlan_hdd_cfg80211_get_ie_ptr(
 				&pMgmt_frame->u.beacon.variable[0],
 				pBeacon->head_len, WLAN_EID_SUPP_RATES);