瀏覽代碼

qcacld-3.0: Fix pointer dereference condition

In the API lim_perform_ft_pre_auth, the driver sends
a auth frame to a peer whose MAC address is extracted
from the session entry, and it may happen that the
pointer tpftPEContext is NULL, which results in
pointer dereference.

Fix is to send an auth frame only if the sFTPEContext
is valid.

Change-Id: I5544739a0b438efcc0216bbccdcff113946b330b
CRs-Fixed: 2259250
gaurank kathpalia 6 年之前
父節點
當前提交
65086f32e4
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      core/mac/src/pe/lim/lim_ft_preauth.c

+ 4 - 4
core/mac/src/pe/lim/lim_ft_preauth.c

@@ -292,10 +292,10 @@ void lim_perform_ft_pre_auth(tpAniSirGlobal pMac, QDF_STATUS status,
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_ROAM_AUTH_START_EVENT,
 			pMac->lim.pSessionEntry, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
 #endif
-
-	lim_send_auth_mgmt_frame(pMac, &authFrame,
-		 psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId,
-		 LIM_NO_WEP_IN_FC, psessionEntry);
+	if (psessionEntry->ftPEContext.pFTPreAuthReq)
+		lim_send_auth_mgmt_frame(pMac, &authFrame,
+			 psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId,
+			 LIM_NO_WEP_IN_FC, psessionEntry);
 
 	return;