eapol: Further relax PMKID check

If we haven't sent a PMKID, and we're not running EAP, then ignore
whatever PMKID the AP sends us.  Frequently the APs send us garbage in
this field.  For PSK and related AKMs, if the PMK is wrong, then we
simply fail to generate a proper MIC and the handshake would fail at a
later stage anyway.
This commit is contained in:
Denis Kenzior 2018-11-28 19:06:33 -06:00
parent 0536a9bdd5
commit 52771de1a5
1 changed files with 2 additions and 5 deletions

View File

@ -996,15 +996,12 @@ static void eapol_handle_ptk_1_of_4(struct eapol_sm *sm,
/*
* Some APs are known to send a PMKID KDE with all
* zeros for the PMKID. Likely we can still
* zeros for the PMKID. Others just send seemingly
* random data. Likely we can still
* successfully negotiate a handshake, so ignore this
* for now and treat it as if the PMKID KDE was not
* included
*/
if (util_mem_is_zero(pmkid, 16))
l_debug("PMKID is all zero, ignoring");
else
goto error_unspecified;
}
}