EAP-IKEv2: 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
2049a3c874
commit
675ddad1c2
4 changed files with 4 additions and 4 deletions
|
@ -633,7 +633,7 @@ static int ikev2_process_auth_secret(struct ikev2_initiator_data *data,
|
|||
return -1;
|
||||
|
||||
if (auth_len != prf->hash_len ||
|
||||
os_memcmp(auth, auth_data, auth_len) != 0) {
|
||||
os_memcmp_const(auth, auth_data, auth_len) != 0) {
|
||||
wpa_printf(MSG_INFO, "IKEV2: Invalid Authentication Data");
|
||||
wpa_hexdump(MSG_DEBUG, "IKEV2: Received Authentication Data",
|
||||
auth, auth_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue