mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-31 09:14:03 -05:00
FT: Allow 4-way handshake for PTK rekeying to continue without PMK/PMKID
There is no PMK/PMKID when going through 4-way handshake during an association started with FT protocol, so need to allow the operation to proceed even if there is no selected PMKSA cache entry in place. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
6480e5a9a0
commit
0a1a82db92
@ -384,6 +384,11 @@ static int wpa_supplicant_get_pmk(struct wpa_sm *sm,
|
|||||||
|
|
||||||
if (!sm->cur_pmksa)
|
if (!sm->cur_pmksa)
|
||||||
sm->cur_pmksa = sa;
|
sm->cur_pmksa = sa;
|
||||||
|
#ifdef CONFIG_IEEE80211R
|
||||||
|
} else if (wpa_key_mgmt_ft(sm->key_mgmt) && sm->ft_protocol) {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"FT: Continue 4-way handshake without PMK/PMKID for association using FT protocol");
|
||||||
|
#endif /* CONFIG_IEEE80211R */
|
||||||
} else {
|
} else {
|
||||||
wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
||||||
"WPA: Failed to get master session key from "
|
"WPA: Failed to get master session key from "
|
||||||
@ -2714,6 +2719,9 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
|
|||||||
wpa_ft_prepare_auth_request(sm, NULL);
|
wpa_ft_prepare_auth_request(sm, NULL);
|
||||||
|
|
||||||
clear_keys = 0;
|
clear_keys = 0;
|
||||||
|
sm->ft_protocol = 1;
|
||||||
|
} else {
|
||||||
|
sm->ft_protocol = 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
#ifdef CONFIG_FILS
|
#ifdef CONFIG_FILS
|
||||||
@ -2778,6 +2786,7 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm)
|
|||||||
#endif /* CONFIG_FILS */
|
#endif /* CONFIG_FILS */
|
||||||
#ifdef CONFIG_IEEE80211R
|
#ifdef CONFIG_IEEE80211R
|
||||||
sm->ft_reassoc_completed = 0;
|
sm->ft_reassoc_completed = 0;
|
||||||
|
sm->ft_protocol = 0;
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
|
|
||||||
/* Keys are not needed in the WPA state machine anymore */
|
/* Keys are not needed in the WPA state machine anymore */
|
||||||
|
@ -126,8 +126,9 @@ struct wpa_sm {
|
|||||||
u8 r0kh_id[FT_R0KH_ID_MAX_LEN];
|
u8 r0kh_id[FT_R0KH_ID_MAX_LEN];
|
||||||
size_t r0kh_id_len;
|
size_t r0kh_id_len;
|
||||||
u8 r1kh_id[FT_R1KH_ID_LEN];
|
u8 r1kh_id[FT_R1KH_ID_LEN];
|
||||||
int ft_completed;
|
unsigned int ft_completed:1;
|
||||||
int ft_reassoc_completed;
|
unsigned int ft_reassoc_completed:1;
|
||||||
|
unsigned int ft_protocol:1;
|
||||||
int over_the_ds_in_progress;
|
int over_the_ds_in_progress;
|
||||||
u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
|
u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
|
||||||
int set_ptk_after_assoc;
|
int set_ptk_after_assoc;
|
||||||
|
Loading…
Reference in New Issue
Block a user