mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-20 12:39:25 +01:00
eapol: Add sanity checking of the install bit
This commit is contained in:
parent
30c277f8d6
commit
bb17f5df94
15
src/eapol.c
15
src/eapol.c
@ -312,6 +312,15 @@ bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa)
|
||||
/* Verify according to 802.11, Section 11.6.6.4 */
|
||||
VERIFY_PTK_COMMON(ek);
|
||||
|
||||
/*
|
||||
* TODO: Handle cases where install might be 0:
|
||||
* For PTK generation, 0 only if the AP does not support key mapping
|
||||
* keys, or if the STA has the No Pairwise bit (in the RSN Capabilities
|
||||
* field) equal to 1 and only the group key is used.
|
||||
*/
|
||||
if (!ek->install)
|
||||
return false;
|
||||
|
||||
if (!ek->key_ack)
|
||||
return false;
|
||||
|
||||
@ -346,6 +355,9 @@ bool eapol_verify_ptk_4_of_4(const struct eapol_key *ek, bool is_wpa)
|
||||
/* Verify according to 802.11, Section 11.6.6.5 */
|
||||
VERIFY_PTK_COMMON(ek);
|
||||
|
||||
if (ek->install)
|
||||
return false;
|
||||
|
||||
if (ek->key_ack)
|
||||
return false;
|
||||
|
||||
@ -383,6 +395,9 @@ bool eapol_verify_gtk_1_of_2(const struct eapol_key *ek, bool is_wpa)
|
||||
if (ek->error)
|
||||
return false;
|
||||
|
||||
if (ek->install)
|
||||
return false;
|
||||
|
||||
if (!ek->key_ack)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user