From 271ce71c7af768346bf51ec1ff87e2824bd50187 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 7 Nov 2022 00:29:39 +0200 Subject: [PATCH] FT: Fix PMK-R0 derivation for FT-SAE-EXT-KEY with SHA512 Not only the hash[] array, but also the r0_key_data[] array needs to be extended in size to fit the longer key and salt. Fixes: a76a314c1535 ("FT: Extend PMK-R0 derivation for FT-SAE-EXT-KEY") Signed-off-by: Jouni Malinen --- src/common/wpa_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 6e90689e1..9f3ebd50a 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -2063,7 +2063,7 @@ int wpa_derive_pmk_r0(const u8 *xxkey, size_t xxkey_len, { u8 buf[1 + SSID_MAX_LEN + MOBILITY_DOMAIN_ID_LEN + 1 + FT_R0KH_ID_MAX_LEN + ETH_ALEN]; - u8 *pos, r0_key_data[64], hash[64]; + u8 *pos, r0_key_data[64 + 16], hash[64]; const u8 *addr[2]; size_t len[2]; size_t q, r0_key_data_len; -- 2.47.2