aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-03-09 16:55:58 (GMT)
committerJouni Malinen <j@w1.fi>2019-03-09 16:55:58 (GMT)
commit9571f945c6663e8e69114f4b1116a744d4fd1308 (patch)
tree9cb0b107c75809eadf923e3d26801c583e0ec9f5 /wpa_supplicant
parentfafad8527448333987e08b4259b31146caabba43 (diff)
downloadhostap-9571f945c6663e8e69114f4b1116a744d4fd1308.zip
hostap-9571f945c6663e8e69114f4b1116a744d4fd1308.tar.gz
hostap-9571f945c6663e8e69114f4b1116a744d4fd1308.tar.bz2
mesh: Check that SAE state initialization succeeded for PMKID check
mesh_rsn_auth_sae_sta() might fail, so verify that sta->sae got allocated before dereferencing it for a PMKID check. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/mesh_rsn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/mesh_rsn.c b/wpa_supplicant/mesh_rsn.c
index 174011b..4b8d6c4 100644
--- a/wpa_supplicant/mesh_rsn.c
+++ b/wpa_supplicant/mesh_rsn.c
@@ -657,7 +657,9 @@ int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta,
mesh_rsn_auth_sae_sta(wpa_s, sta);
}
- if (chosen_pmk && os_memcmp(chosen_pmk, sta->sae->pmkid, PMKID_LEN)) {
+ if (chosen_pmk &&
+ (!sta->sae ||
+ os_memcmp(chosen_pmk, sta->sae->pmkid, PMKID_LEN) != 0)) {
wpa_msg(wpa_s, MSG_DEBUG,
"Mesh RSN: Invalid PMKID (Chosen PMK did not match calculated PMKID)");
return -1;