[PATCH v3 0/2] SME: Fall back from PMKSA caching on deauthentication
Louis Kotze
loukot at gmail.com
Tue Jul 28 04:45:59 PDT 2026
Some APs reject an association attempt that uses SAE PMKSA caching by
deauthenticating the STA with reason code 9 instead of responding to the
Association Request frame with an error status code. wpa_supplicant keeps
the PMKSA cache entry on that path, so every following attempt retries
PMKSA caching and is deauthenticated again, and the connection never falls
back to a full SAE authentication.
Patch 1 mirrors the PMKSA cache handling that sme_event_assoc_reject()
already does for the error-status-code case. Patch 2 adds hwsim coverage.
The deauthentication acted on here is necessarily unprotected, since it
arrives while the STA is still in WPA_ASSOCIATING and no PTK is in place.
A forged frame can therefore make the STA discard a PMKSA cache entry,
which costs the fast-reconnect optimization on the next attempt but does
not change what is negotiated; an attacker who can inject at that point
can already prevent the association outright. v3 narrows the exposure
further: the frame now has to carry reason code 9 and arrive in
WPA_ASSOCIATING, and only the entry for the AP that sent it is dropped
rather than every entry in the ESS.
I have one AP that behaves this way, so the reason code and the absent
Association Response frame are observations from a single vendor rather
than a survey. Reports from other hardware are welcome.
v2 crossed with the review of v1 and carried the same code. This version
applies that review.
v3:
- Match only reason code 9 (STA_REQ_ASSOC_WITHOUT_AUTH). Every one of the
26 AP-sent deauthentications of this kind in my captures used reason
code 9. The only other reason codes in those logs are locally generated
reason 3 and one reason 1 received in WPA_ASSOCIATED, neither of which
is this sequence.
- Drop WPA_AUTHENTICATING from the state check, so only a (Re)Association
Request frame rejected by a Deauthentication frame matches. All 26
events above were in WPA_ASSOCIATING.
- Do not flush anything when the AP address is not known, rather than
falling back to flushing the PMKSA cache entries of the whole ESS.
- Describe the observed frame exchange (no Association Response frame at
all) in the commit message.
- 2/2 is unchanged. It already drives the AP with reason code 9.
tests/hwsim, run in the UML VM: 2/2 passes with 1/2 applied and fails
without it ("MGMT RX wait timed out", i.e., no fallback to SAE
authentication).
Louis Kotze (2):
SME: Fall back from PMKSA caching if the AP deauthenticates
tests: SAE PMKSA caching attempt rejected with deauthentication
tests/hwsim/test_sae.py | 48 +++++++++++++++++++++++++++++++++++++++++
wpa_supplicant/events.c | 3 +++
wpa_supplicant/sme.c | 35 ++++++++++++++++++++++++++++++
wpa_supplicant/sme.h | 7 ++++++
4 files changed, 93 insertions(+)
base-commit: 6995485c75dc129e6f31eff6fa6a613a9a431524
--
2.55.0
More information about the Hostap
mailing list