mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
EAP-EKE peer: Fix memory leak on error path
If DHComponent_P derivation fails (local crypto operation failure), the message buffer was not freed. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
34b164dd25
commit
9ea91cd67c
@ -452,6 +452,7 @@ static struct wpabuf * eap_eke_process_commit(struct eap_sm *sm,
|
|||||||
/* DHComponent_P = Encr(key, y_p) */
|
/* DHComponent_P = Encr(key, y_p) */
|
||||||
rpos = wpabuf_put(resp, data->sess.dhcomp_len);
|
rpos = wpabuf_put(resp, data->sess.dhcomp_len);
|
||||||
if (eap_eke_dhcomp(&data->sess, key, pub, rpos) < 0) {
|
if (eap_eke_dhcomp(&data->sess, key, pub, rpos) < 0) {
|
||||||
|
wpabuf_free(resp);
|
||||||
wpa_printf(MSG_INFO, "EAP-EKE: Failed to build DHComponent_P");
|
wpa_printf(MSG_INFO, "EAP-EKE: Failed to build DHComponent_P");
|
||||||
os_memset(key, 0, sizeof(key));
|
os_memset(key, 0, sizeof(key));
|
||||||
return eap_eke_build_fail(data, ret, id,
|
return eap_eke_build_fail(data, ret, id,
|
||||||
|
Loading…
Reference in New Issue
Block a user