hostapd/src
Andrzej Ostruszka 98e9d553f2 nl80211: Check previous MAC address for locally-generated-deauth
When using MAC randomization wpa_supplicant can change the local MAC
address during roaming scenario:

1. We attach to AP1 (with MAC1/SSID1).
2. Roaming to AP2 (with MAC2/SSID2) is started:
  a) we send DEAUTH(for AP1, with MAC1)
  b) we change MAC to MAC2 due to randomization
  c) we start authentication for AP2
  d) we get notification about DEAUTH for AP1 (which we ignore)
  e) we complete association with AP2

In point 2d we completely ignore the notification which later causes
problems. This happens if the deauthentication event is generated by the
local driver (e.g., due to beacon loss) instead of AP2 sending an
explicit Deauthentication frame.

The intended behavior is as follows: during roaming we generate DEAUTH
(2a) and signal this event right away. To protect from handling of our
own DEAUTH for the 2nd time supplicant marks 'ignore_next_local_deauth'
variable.  In point 2d we should receive this notification and clear the
flag but this does not happen because MAC1 in the notification is not
the current MAC address (it has been changed in 2b) so this notification
is ignored as a one with a "foreign" address.

So we end up successfully at AP2 but with 'ignore_next_local_deauth'
still set which causes problems.  For example if AP2 shuts down it has
been observed on some drivers that the DEAUTH notification is generated
as a local one and since we have flag to ignore it nothing is reported
over D-Bus.

To address the problem let's store the previously used MAC address and
use it for checking for foreign address (in combination with the current
one).

Signed-off-by: Andrzej Ostruszka <amo@semihalf.com>
2022-11-27 14:18:53 +02:00
..
ap RSN: Do not include RC4 use in FIPS builds 2022-11-26 11:34:30 +02:00
common FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) 2022-11-25 09:37:17 +02:00
crypto OpenSSL: Load OpenSSL 3.0 legacy provider but let default be loaded 2022-11-26 12:29:14 +02:00
drivers nl80211: Check previous MAC address for locally-generated-deauth 2022-11-27 14:18:53 +02:00
eap_common EAP-SAKA: Simplify attribute parser for static analyzers 2022-05-08 16:53:38 +03:00
eap_peer EAP-SIM/AKA peer: IMSI privacy attribute 2022-05-25 20:18:40 +03:00
eap_server EAP-PEAP server: Fix TLS 1.3 move to Phase 2 without a new session ticket 2022-05-02 18:07:50 +03:00
eapol_auth EAP-TLS: Testing functionality to skip protected success indication 2022-04-07 00:43:12 +03:00
eapol_supp Discard unencrypted EAPOL-EAP when TK is set and PMF is enabled 2022-05-07 21:37:08 +03:00
fst FST: More robust bounds checking of local data in fst_dump_mb_ies() 2022-05-08 17:18:58 +03:00
l2_packet Replace "dummy" with "stub" in comments/documentation 2021-10-11 20:52:50 +03:00
p2p P2P: Check dev pointer consistently when building PD Response 2022-11-20 15:15:58 +02:00
pae MACsec: Support GCM-AES-256 cipher suite 2022-02-16 22:54:49 +02:00
pasn PASN: Fix is_pasn_auth_frame() for mgmt tx status frames 2022-11-23 18:45:51 +02:00
radius RADIUS: Add Filter-Id attribute 2022-10-31 11:56:57 +02:00
rsn_supp RSN: Split EAPOL-Key msg 3/4 processing for WPA(v1) 2022-11-27 14:18:53 +02:00
tls TLS: Fix unsigned int underflow in internal TLS 1.0/1.1 implementation 2022-11-20 19:11:01 +02:00
utils Add hostapd control interface command to stop logging to file 2022-11-23 18:24:56 +02:00
wps WPS: Check NDEF record length fields separately 2022-11-20 15:15:58 +02:00
build.rules build: Rebuild libs all the time 2020-10-12 20:18:02 +03:00
lib.rules build: lib.rules: Add common-clean 2020-10-16 12:51:12 +03:00
Makefile PASN: Move initiator changes into a separate file 2022-11-04 00:52:17 +02:00
objs.mk build: Fix dependency file inclusion 2020-10-12 11:05:16 +03:00