]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/ap/wpa_auth.c
Strip trailing zero data in EAPOL-Key msg 1/4 when no PMKID to send
authorMikael Kanstrup <mikael.kanstrup@sony.com>
Tue, 19 Nov 2019 09:51:05 +0000 (10:51 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 22 Dec 2019 22:26:07 +0000 (00:26 +0200)
commit307cfc32866885c8221e8c627c43429208adac7b
tree77e6ffdf652575644bc0ba3b61d4082d15d4683a
parent2c5ccfa60712005f739538c0ab7759698a7d0dc1
Strip trailing zero data in EAPOL-Key msg 1/4 when no PMKID to send

EAPOL-Key message 1/4 without PMKID KDE was sent with 22 bytes of stray
data following a zero length key data field. These 22 bytes happens to
be the exact size of an PMKID KDE. Strip these trailing bytes by
checking whether a PMKID is available and adjust pmkid_len to 0 if not.

This was seen for example in capture files created by hwsim test case
suite_b_192 but code modified to handle also the other cases without
PMKID (Suite B no-KCK, FILS without PMKID available, SAE without PMKID
available).

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sony.com>
src/ap/wpa_auth.c