mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-10 17:52:36 +01:00
eapol: Verify key_descriptor_version
This commit is contained in:
parent
c1b3858a07
commit
da8e10cc5f
@ -55,6 +55,15 @@ bool eapol_verify(const uint8_t *data, size_t len)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (ek->key_descriptor_version) {
|
||||||
|
case EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_MD5_ARC4:
|
||||||
|
case EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_SHA1_AES:
|
||||||
|
case EAPOL_KEY_DESCRIPTOR_VERSION_AES_128_CMAC_AES:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
key_data_len = L_BE16_TO_CPU(ek->key_data_len);
|
key_data_len = L_BE16_TO_CPU(ek->key_data_len);
|
||||||
if (len < sizeof(struct eapol_key) + key_data_len)
|
if (len < sizeof(struct eapol_key) + key_data_len)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user