]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Reject request with mismatching PMKID (no PMKSA cache entry)
authorAshok Ponnaiah <aponnaia@codeaurora.org>
Wed, 7 Feb 2018 10:16:20 +0000 (12:16 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 7 Feb 2018 10:24:36 +0000 (12:24 +0200)
Reject SAE association request when PMKID is included in the RSNE, but
the corresponding PMKSA is not available in the AP.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
src/ap/wpa_auth_ie.c

index c394293e8eb7b47960350b53d58e1d4b8c28e602..b80c19c2f8311d29822621a56e1cc20651b12144 100644 (file)
@@ -827,6 +827,15 @@ int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
                os_memcpy(wpa_auth->dot11RSNAPMKIDUsed, pmkid, PMKID_LEN);
        }
 
+#ifdef CONFIG_SAE
+       if (sm->wpa_key_mgmt == WPA_KEY_MGMT_SAE && data.num_pmkid &&
+           !sm->pmksa) {
+               wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG,
+                                "No PMKSA cache entry found for SAE");
+               return WPA_INVALID_PMKID;
+       }
+#endif /* CONFIG_SAE */
+
 #ifdef CONFIG_DPP
        if (sm->wpa_key_mgmt == WPA_KEY_MGMT_DPP && !sm->pmksa) {
                wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG,