commit 349acf292f3791414c676caedf31eb22fcafd5fa
parent e940fc9282bf164f5265c13b9b724f46a760bd47
Author: James Prestwood <james.prestwood@linux.intel.com>
Date: Wed, 17 Apr 2019 17:02:07 -0700
eapol: fix kek length for FILS rekeys (SHA384)
FILS-SHA384 got overlooked and the kek length was being hard coded
to 32 bytes when encrypting the key data. There was also one occurence
where the kek_len was just being set incorrectly.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/eapol.c b/src/eapol.c
@@ -313,7 +313,7 @@ uint8_t *eapol_decrypt_key_data(enum ie_rsn_akm_suite akm, const uint8_t *kek,
if (akm == IE_RSN_AKM_SUITE_FILS_SHA256)
kek_len = 32;
else
- kek_len = 48;
+ kek_len = 64;
if (!aes_siv_decrypt(kek, kek_len, key_data,
key_data_len, ad, 1, buf))
@@ -1805,7 +1805,8 @@ static void eapol_handle_gtk_1_of_2(struct eapol_sm *sm,
ad[0].iov_base = step2;
ad[0].iov_len = EAPOL_KEY_DATA(step2, 0) - (uint8_t *)step2;
- if (!aes_siv_encrypt(handshake_state_get_kek(sm->handshake), 32,
+ if (!aes_siv_encrypt(handshake_state_get_kek(sm->handshake),
+ handshake_state_get_kek_len(sm->handshake),
EAPOL_KEY_DATA(step2, 0), 0, ad, 1, encr)) {
l_debug("AES-SIV encryption failed");
l_free(step2);