mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
FST: Remove WPA_ASSERT from wpas_fst_send_action_cb()
It was possible to hit this WPA_ASSERT when FST-MANAGER SESSION_REMOVE command is exececuted when in not-associated state. In CONFIG_EAPOL_TEST=y builds, this would result in the wpa_supplicant process being terminated. Convert this WPA_ASSERT to a check that does not terminate the process, but only rejects the command if wpa_s->bssid does not match the da argument. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
968dce9b13
commit
0da355235e
@ -4162,10 +4162,14 @@ static int wpas_fst_send_action_cb(void *ctx, const u8 *da, struct wpabuf *data)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
|
||||
WPA_ASSERT(os_memcmp(wpa_s->bssid, da, ETH_ALEN) == 0);
|
||||
if (os_memcmp(wpa_s->bssid, da, ETH_ALEN) != 0) {
|
||||
wpa_printf(MSG_INFO, "FST:%s:bssid=" MACSTR " != da=" MACSTR,
|
||||
__func__, MAC2STR(wpa_s->bssid), MAC2STR(da));
|
||||
return -1;
|
||||
}
|
||||
return wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
|
||||
wpa_s->own_addr, wpa_s->bssid,
|
||||
wpabuf_head(data), wpabuf_len(data),
|
||||
wpa_s->own_addr, wpa_s->bssid,
|
||||
wpabuf_head(data), wpabuf_len(data),
|
||||
0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user