EAP-EKE: 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
dfb5608139
commit
dddf7bbd4e
3 changed files with 5 additions and 5 deletions
|
@ -692,7 +692,7 @@ int eap_eke_decrypt_prot(struct eap_eke_session *sess,
|
|||
if (eap_eke_mac(sess->mac, sess->ki, prot + block_size,
|
||||
prot_len - block_size - icv_len, icv) < 0)
|
||||
return -1;
|
||||
if (os_memcmp(icv, prot + prot_len - icv_len, icv_len) != 0) {
|
||||
if (os_memcmp_const(icv, prot + prot_len - icv_len, icv_len) != 0) {
|
||||
wpa_printf(MSG_INFO, "EAP-EKE: ICV mismatch in Prot() data");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue