Kaynağa Gözat

qcacld-3.0: Fix incorrect length of encrypted auth frame

Change id “I684dbc89945ba3aef3186c872e5e1f7564d7e44c”
and  “I5ba5748c9ae00b61743883862ca884ac1134da15”
fixes merged in reverse order, there by reverting second fix.

Correcting the same.

Change-Id: I6b4912bf3717a0cc68b4184e4e2a8482766d4ad8
CRs-Fixed: 2128343
Arif Hussain 7 yıl önce
ebeveyn
işleme
dbea6e1204
1 değiştirilmiş dosya ile 2 ekleme ve 24 silme
  1. 2 24
      core/mac/src/pe/lim/lim_security_utils.c

+ 2 - 24
core/mac/src/pe/lim/lim_security_utils.c

@@ -487,29 +487,6 @@ lim_restore_from_auth_state(tpAniSirGlobal pMac, tSirResultCodes resultCode,
 	lim_post_sme_message(pMac, LIM_MLM_AUTH_CNF, (uint32_t *) &mlmAuthCnf);
 } /*** end lim_restore_from_auth_state() ***/
 
-#ifdef WLAN_FEATURE_FILS_SK
-/*
- * lim_get_fils_auth_data_len: This API will return
- * extra auth data len in case of fils session
- *
- * Return: fils data len in auth packet
- */
-static int lim_get_fils_auth_data_len(void)
-{
-	int len = sizeof(tSirMacRsnInfo) +
-			sizeof(uint8_t) + /* assoc_delay_info */
-			SIR_FILS_SESSION_LENGTH +
-			sizeof(uint8_t) + /* wrapped_data_len */
-			SIR_FILS_WRAPPED_DATA_MAX_SIZE + SIR_FILS_NONCE_LENGTH;
-	return len;
-}
-#else
-static inline int lim_get_fils_auth_data_len(void)
-{
-	return 0;
-}
-#endif
-
 /**
  * lim_encrypt_auth_frame()
  *
@@ -542,7 +519,8 @@ lim_encrypt_auth_frame(tpAniSirGlobal pMac, uint8_t keyId, uint8_t *pKey,
 	uint8_t seed[LIM_SEED_LENGTH], icv[SIR_MAC_WEP_ICV_LENGTH];
 	uint16_t frame_len;
 
-	frame_len = sizeof(tSirMacAuthFrameBody) - lim_get_fils_auth_data_len();
+	frame_len = ((tpSirMacAuthFrameBody)pPlainText)->length +
+			SIR_MAC_AUTH_FRAME_INFO_LEN + SIR_MAC_CHALLENGE_ID_LEN;
 	keyLength += 3;
 
 	/* Bytes 3-7 of seed is key */