]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Fix PMK-R0 derivation for FT-SAE-EXT-KEY with SHA512
authorJouni Malinen <j@w1.fi>
Sun, 6 Nov 2022 22:29:39 +0000 (00:29 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 6 Nov 2022 22:29:39 +0000 (00:29 +0200)
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 <j@w1.fi>
src/common/wpa_common.c

index 6e90689e1a8ec49a94909942aab805f2ef9f3f12..9f3ebd50aefc14a609aad3717f0d1a16e7051ebf 100644 (file)
@@ -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;