EAP-FAST: 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
dddf7bbd4e
commit
c434503f5e
2 changed files with 3 additions and 3 deletions
|
@ -767,7 +767,7 @@ static struct wpabuf * eap_fast_process_crypto_binding(
|
|||
"MAC calculation", (u8 *) _bind, bind_len);
|
||||
hmac_sha1(cmk, EAP_FAST_CMK_LEN, (u8 *) _bind, bind_len,
|
||||
_bind->compound_mac);
|
||||
res = os_memcmp(cmac, _bind->compound_mac, sizeof(cmac));
|
||||
res = os_memcmp_const(cmac, _bind->compound_mac, sizeof(cmac));
|
||||
wpa_hexdump(MSG_MSGDUMP, "EAP-FAST: Received Compound MAC",
|
||||
cmac, sizeof(cmac));
|
||||
wpa_hexdump(MSG_MSGDUMP, "EAP-FAST: Calculated Compound MAC",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue