mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 03:14:05 -05:00
mesh: Fix SAE reauthentication processing
ap_free_sta() frees the sta entry, so sta->addr cannot be used after
that call. Fix the sequence of these two calls to avoid use of freed
memory to determine which PMKSA cache entry to remove.
Fixes: 9f2cf23e2e
("mesh: Add support for PMKSA caching")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
2f68051395
commit
153d4c501a
@ -896,8 +896,8 @@ static int sae_sm_step(struct hostapd_data *hapd, struct sta_info *sta,
|
|||||||
wpa_printf(MSG_DEBUG, "SAE: remove the STA (" MACSTR
|
wpa_printf(MSG_DEBUG, "SAE: remove the STA (" MACSTR
|
||||||
") doing reauthentication",
|
") doing reauthentication",
|
||||||
MAC2STR(sta->addr));
|
MAC2STR(sta->addr));
|
||||||
ap_free_sta(hapd, sta);
|
|
||||||
wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr);
|
wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr);
|
||||||
|
ap_free_sta(hapd, sta);
|
||||||
} else if (auth_transaction == 1) {
|
} else if (auth_transaction == 1) {
|
||||||
wpa_printf(MSG_DEBUG, "SAE: Start reauthentication");
|
wpa_printf(MSG_DEBUG, "SAE: Start reauthentication");
|
||||||
ret = auth_sae_send_commit(hapd, sta, bssid, 1);
|
ret = auth_sae_send_commit(hapd, sta, bssid, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user