diff --git a/components/wpa_supplicant/src/ap/wpa_auth.c b/components/wpa_supplicant/src/ap/wpa_auth.c index d5a179c4c6..57af43b250 100644 --- a/components/wpa_supplicant/src/ap/wpa_auth.c +++ b/components/wpa_supplicant/src/ap/wpa_auth.c @@ -1060,6 +1060,7 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth, os_free(hdr); return; } + os_free(buf); } if (key_info & WPA_KEY_INFO_MIC) { diff --git a/components/wpa_supplicant/src/common/sae.c b/components/wpa_supplicant/src/common/sae.c index af1da9d506..a075592f8b 100644 --- a/components/wpa_supplicant/src/common/sae.c +++ b/components/wpa_supplicant/src/common/sae.c @@ -815,8 +815,10 @@ static int sae_derive_keys(struct sae_data *sae, const u8 *k) */ os_memset(null_key, 0, sizeof(null_key)); - hmac_sha256(null_key, sizeof(null_key), k, sae->tmp->prime_len, - keyseed); + if (hmac_sha256(null_key, sizeof(null_key), k, sae->tmp->prime_len, + keyseed) < 0) + goto fail; + wpa_hexdump_key(MSG_DEBUG, "SAE: keyseed", keyseed, sizeof(keyseed)); crypto_bignum_add(sae->tmp->own_commit_scalar, sae->peer_commit_scalar,