eap-wsc: Validate enrollee_nonce (N1) in M{2,4,6,8}
This commit is contained in:
parent
c826dd0052
commit
45d74ac1ed
|
@ -479,6 +479,10 @@ static void eap_wsc_handle_m8(struct eap_state *eap,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (memcmp(m8.enrollee_nonce, wsc->m1->enrollee_nonce,
|
||||||
|
sizeof(m8.enrollee_nonce)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!authenticator_check(wsc, pdu, len))
|
if (!authenticator_check(wsc, pdu, len))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -580,6 +584,10 @@ static void eap_wsc_handle_m6(struct eap_state *eap,
|
||||||
if (wsc_parse_m6(pdu, len, &m6, &encrypted) != 0)
|
if (wsc_parse_m6(pdu, len, &m6, &encrypted) != 0)
|
||||||
goto send_nack;
|
goto send_nack;
|
||||||
|
|
||||||
|
if (memcmp(m6.enrollee_nonce, wsc->m1->enrollee_nonce,
|
||||||
|
sizeof(m6.enrollee_nonce)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!authenticator_check(wsc, pdu, len))
|
if (!authenticator_check(wsc, pdu, len))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -677,6 +685,10 @@ static void eap_wsc_handle_m4(struct eap_state *eap,
|
||||||
if (wsc_parse_m4(pdu, len, &m4, &encrypted) != 0)
|
if (wsc_parse_m4(pdu, len, &m4, &encrypted) != 0)
|
||||||
goto send_nack;
|
goto send_nack;
|
||||||
|
|
||||||
|
if (memcmp(m4.enrollee_nonce, wsc->m1->enrollee_nonce,
|
||||||
|
sizeof(m4.enrollee_nonce)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!authenticator_check(wsc, pdu, len))
|
if (!authenticator_check(wsc, pdu, len))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -815,6 +827,10 @@ static void eap_wsc_handle_m2(struct eap_state *eap,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (memcmp(wsc->m2->enrollee_nonce, wsc->m1->enrollee_nonce,
|
||||||
|
sizeof(wsc->m2->enrollee_nonce)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!l_key_validate_dh_payload(wsc->m2->public_key,
|
if (!l_key_validate_dh_payload(wsc->m2->public_key,
|
||||||
sizeof(wsc->m2->public_key),
|
sizeof(wsc->m2->public_key),
|
||||||
crypto_dh5_prime,
|
crypto_dh5_prime,
|
||||||
|
|
Loading…
Reference in New Issue