diff options
author | Jouni Malinen <j@w1.fi> | 2014-06-29 17:21:59 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2014-07-02 09:38:47 (GMT) |
commit | 8f92826b1555bf492aa4a01128f8f31c40f89bdd (patch) | |
tree | ec3d551c7a50e99ddac0074def3734d6e927961f /src/eap_peer/eap_gpsk.c | |
parent | e1550d4be890e071cec586f8171377be1fc96de5 (diff) | |
download | hostap-8f92826b1555bf492aa4a01128f8f31c40f89bdd.zip hostap-8f92826b1555bf492aa4a01128f8f31c40f89bdd.tar.gz hostap-8f92826b1555bf492aa4a01128f8f31c40f89bdd.tar.bz2 |
EAP-GPSK: 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>
Diffstat (limited to 'src/eap_peer/eap_gpsk.c')
-rw-r--r-- | src/eap_peer/eap_gpsk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_peer/eap_gpsk.c b/src/eap_peer/eap_gpsk.c index 3c9cbf4..998ea06 100644 --- a/src/eap_peer/eap_gpsk.c +++ b/src/eap_peer/eap_gpsk.c @@ -565,7 +565,7 @@ static const u8 * eap_gpsk_validate_gpsk_3_mic(struct eap_gpsk_data *data, wpa_printf(MSG_DEBUG, "EAP-GPSK: Failed to compute MIC"); return NULL; } - if (os_memcmp(mic, pos, miclen) != 0) { + if (os_memcmp_const(mic, pos, miclen) != 0) { wpa_printf(MSG_INFO, "EAP-GPSK: Incorrect MIC in GPSK-3"); wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Received MIC", pos, miclen); wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Computed MIC", mic, miclen); |