소스 검색

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,
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_ROAM_AUTH_START_EVENT,
 			pMac->lim.pSessionEntry, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
 			pMac->lim.pSessionEntry, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
 #endif
 #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;
 	return;