Additional consistentcy checks for PTK component lengths
Verify that TK, KCK, and KEK lengths are set to consistent values within struct wpa_ptk before using them in supplicant. This is an additional layer of protection against unexpected states. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ec765bc797
commit
a6ea665300
2 changed files with 26 additions and 6 deletions
|
@ -106,6 +106,12 @@ int wpa_eapol_key_mic(const u8 *key, size_t key_len, int akmp, int ver,
|
|||
{
|
||||
u8 hash[SHA512_MAC_LEN];
|
||||
|
||||
if (key_len == 0) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"WPA: KCK not set - cannot calculate MIC");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (ver) {
|
||||
#ifndef CONFIG_FIPS
|
||||
case WPA_KEY_INFO_TYPE_HMAC_MD5_RC4:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue