mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
eap_server: Avoid NULL pointer dereference in eap_fast_encrypt_phase2()
If TLS encryption fails, encr may be NULL and that would have resulted in NULL pointer dereference.. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
This commit is contained in:
parent
948d3a8731
commit
b760e64276
@ -819,6 +819,9 @@ static int eap_fast_encrypt_phase2(struct eap_sm *sm,
|
|||||||
encr = eap_server_tls_encrypt(sm, &data->ssl, plain);
|
encr = eap_server_tls_encrypt(sm, &data->ssl, plain);
|
||||||
wpabuf_free(plain);
|
wpabuf_free(plain);
|
||||||
|
|
||||||
|
if (!encr)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (data->ssl.tls_out && piggyback) {
|
if (data->ssl.tls_out && piggyback) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-FAST: Piggyback Phase 2 data "
|
wpa_printf(MSG_DEBUG, "EAP-FAST: Piggyback Phase 2 data "
|
||||||
"(len=%d) with last Phase 1 Message (len=%d "
|
"(len=%d) with last Phase 1 Message (len=%d "
|
||||||
|
Loading…
Reference in New Issue
Block a user