mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 02:44:03 -05:00
EAP-LEAP: Use os_memcmp_const() for hash/password comparisons
This makes the implementation less likely to provide useful timing information to potential attackers from comparisons of information received from a remote device and private material known only by the authorized devices. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8f92826b15
commit
7b1e745870
@ -244,7 +244,7 @@ static struct wpabuf * eap_leap_process_response(struct eap_sm *sm, void *priv,
|
|||||||
ret->methodState = METHOD_DONE;
|
ret->methodState = METHOD_DONE;
|
||||||
ret->allowNotifications = FALSE;
|
ret->allowNotifications = FALSE;
|
||||||
|
|
||||||
if (os_memcmp(pos, expected, LEAP_RESPONSE_LEN) != 0) {
|
if (os_memcmp_const(pos, expected, LEAP_RESPONSE_LEN) != 0) {
|
||||||
wpa_printf(MSG_WARNING, "EAP-LEAP: AP sent an invalid "
|
wpa_printf(MSG_WARNING, "EAP-LEAP: AP sent an invalid "
|
||||||
"response - authentication failed");
|
"response - authentication failed");
|
||||||
wpa_hexdump(MSG_DEBUG, "EAP-LEAP: Expected response from AP",
|
wpa_hexdump(MSG_DEBUG, "EAP-LEAP: Expected response from AP",
|
||||||
|
Loading…
Reference in New Issue
Block a user