While the Authenticator state machine conditions are already checking
for sm->EAPOLKeyRequest, it seems clearer to explicitly discard any
EAPOL-Key Request frame that is received unexpectedly during a 4-way
handshake.
Signed-off-by: Jouni Malinen <j@w1.fi>
}
break;
case REQUEST:
+ if (sm->wpa_ptk_state == WPA_PTK_PTKSTART ||
+ sm->wpa_ptk_state == WPA_PTK_PTKCALCNEGOTIATING ||
+ sm->wpa_ptk_state == WPA_PTK_PTKCALCNEGOTIATING2 ||
+ sm->wpa_ptk_state == WPA_PTK_PTKINITNEGOTIATING) {
+ wpa_auth_vlogger(wpa_auth, wpa_auth_get_spa(sm),
+ LOGGER_INFO,
+ "received EAPOL-Key Request in invalid state (%d) - dropped",
+ sm->wpa_ptk_state);
+ goto out;
+ }
break;
}