3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 18:59:22 +01:00

eapol: Relax key_iv checks

Many APs don't send properly zerod key_iv elements in EAPoL-Key frames.
In the past iwd has complained, but this broken behavior is so
prevalent, that it is likely a lost cause.

This patch takes out these warnings
This commit is contained in:
Denis Kenzior 2018-07-01 20:55:30 -05:00
parent 1c9a1ea46d
commit 7f844a2520

View File

@ -322,7 +322,6 @@ bool eapol_verify_ptk_1_of_4(const struct eapol_key *ek)
if (ek->wpa_key_id) if (ek->wpa_key_id)
return false; return false;
VERIFY_IS_ZERO(ek->eapol_key_iv);
VERIFY_IS_ZERO(ek->key_rsc); VERIFY_IS_ZERO(ek->key_rsc);
VERIFY_IS_ZERO(ek->reserved); VERIFY_IS_ZERO(ek->reserved);
VERIFY_IS_ZERO(ek->key_mic_data); VERIFY_IS_ZERO(ek->key_mic_data);
@ -407,12 +406,6 @@ bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa)
VERIFY_IS_ZERO(ek->reserved); VERIFY_IS_ZERO(ek->reserved);
/* 0 (Version 2) or random (Version 1) */
if (ek->key_descriptor_version ==
EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_SHA1_AES)
L_WARN_ON(!util_mem_is_zero(ek->eapol_key_iv,
sizeof(ek->eapol_key_iv)));
return true; return true;
} }
@ -500,11 +493,6 @@ bool eapol_verify_gtk_1_of_2(const struct eapol_key *ek, bool is_wpa)
VERIFY_IS_ZERO(ek->reserved); VERIFY_IS_ZERO(ek->reserved);
/* 0 (Version 2) or random (Version 1) */
if (ek->key_descriptor_version ==
EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_SHA1_AES)
VERIFY_IS_ZERO(ek->eapol_key_iv);
/* /*
* WPA_80211_v3_1, Section 2.2.4: * WPA_80211_v3_1, Section 2.2.4:
* "Key Index (bits 4 and 5): specifies the key id of the temporal * "Key Index (bits 4 and 5): specifies the key id of the temporal