From: Jouni Malinen Date: Sun, 6 Nov 2022 22:29:39 +0000 (+0200) Subject: FT: Fix PMK-R0 derivation for FT-SAE-EXT-KEY with SHA512 X-Git-Tag: hostap_2_11~1551 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=271ce71c7af768346bf51ec1ff87e2824bd50187;p=thirdparty%2Fhostap.git 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 --- 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;