3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-01 23:59:51 +01:00

eapol: Relax message 2 / 4 key_length check

Seems certain Apple implementations set the key length to 16, even
though it should be 0.
This commit is contained in:
Denis Kenzior 2019-02-07 09:54:51 -06:00
parent bc9e70f9cd
commit bd7f8bf613

View File

@ -430,8 +430,7 @@ bool eapol_verify_ptk_2_of_4(const struct eapol_key *ek)
return false; return false;
key_len = L_BE16_TO_CPU(ek->key_length); key_len = L_BE16_TO_CPU(ek->key_length);
if (key_len != 0) L_WARN_ON(key_len != 0);
return false;
VERIFY_IS_ZERO(ek->eapol_key_iv); VERIFY_IS_ZERO(ek->eapol_key_iv);
VERIFY_IS_ZERO(ek->key_rsc); VERIFY_IS_ZERO(ek->key_rsc);
@ -510,8 +509,7 @@ bool eapol_verify_ptk_4_of_4(const struct eapol_key *ek, bool is_wpa)
return false; return false;
key_len = L_BE16_TO_CPU(ek->key_length); key_len = L_BE16_TO_CPU(ek->key_length);
if (key_len != 0) L_WARN_ON(key_len != 0);
return false;
VERIFY_IS_ZERO(ek->key_nonce); VERIFY_IS_ZERO(ek->key_nonce);
VERIFY_IS_ZERO(ek->eapol_key_iv); VERIFY_IS_ZERO(ek->eapol_key_iv);