3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 06:02:37 +01:00

eap-wsc: clear out intermediate key data

This commit is contained in:
Denis Kenzior 2016-08-30 14:41:58 -05:00
parent 39d6acb07d
commit 046c7b8994

View File

@ -307,8 +307,12 @@ static void eap_wsc_handle_m2(struct eap_state *eap,
l_checksum_get_digest(sha256, dhkey, sizeof(dhkey)); l_checksum_get_digest(sha256, dhkey, sizeof(dhkey));
l_checksum_free(sha256); l_checksum_free(sha256);
memset(shared_secret, 0, shared_secret_len);
hmac_sha256 = l_checksum_new_hmac(L_CHECKSUM_SHA256, hmac_sha256 = l_checksum_new_hmac(L_CHECKSUM_SHA256,
dhkey, sizeof(dhkey)); dhkey, sizeof(dhkey));
memset(dhkey, 0, sizeof(dhkey));
if (!hmac_sha256) if (!hmac_sha256)
return; return;
@ -323,7 +327,9 @@ static void eap_wsc_handle_m2(struct eap_state *eap,
l_checksum_get_digest(hmac_sha256, kdk, sizeof(kdk)); l_checksum_get_digest(hmac_sha256, kdk, sizeof(kdk));
l_checksum_free(hmac_sha256); l_checksum_free(hmac_sha256);
if (!wsc_kdf(kdk, &keys, sizeof(keys))) r = wsc_kdf(kdk, &keys, sizeof(keys));
memset(kdk, 0, sizeof(kdk));
if (!r)
return; return;
wsc->hmac_auth_key = l_checksum_new_hmac(L_CHECKSUM_SHA256, wsc->hmac_auth_key = l_checksum_new_hmac(L_CHECKSUM_SHA256,