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>
This commit is contained in:
parent
fafad85274
commit
9571f945c6
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
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,
|
wpa_msg(wpa_s, MSG_DEBUG,
|
||||||
"Mesh RSN: Invalid PMKID (Chosen PMK did not match calculated PMKID)");
|
"Mesh RSN: Invalid PMKID (Chosen PMK did not match calculated PMKID)");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue