EAP-MD5: 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
4685482552
commit
a564d9ca36
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ static void eap_md5_process(struct eap_sm *sm, void *priv,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (os_memcmp(hash, pos, CHAP_MD5_LEN) == 0) {
|
if (os_memcmp_const(hash, pos, CHAP_MD5_LEN) == 0) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-MD5: Done - Success");
|
wpa_printf(MSG_DEBUG, "EAP-MD5: Done - Success");
|
||||||
data->state = SUCCESS;
|
data->state = SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue