[PATCH v2 0/2] SME: Fall back from PMKSA caching on deauthentication

Louis Kotze loukot at gmail.com
Tue Jul 28 02:25:19 PDT 2026


Some APs reject an association attempt that uses SAE PMKSA caching by
deauthenticating the STA 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. Observed with a TP-Link Deco BE65
AP MLD deauthenticating with reason code 9.

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_AUTHENTICATING or WPA_ASSOCIATING
and no PTK is in place. A forged frame can therefore make the STA
discard a valid 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.

Changes in v2:
- Rebased on current main. No functional change: patch 1 is unchanged
  and patch 2 only moves to the new end of tests/hwsim/test_sae.py
  after commit b57ee6cfc added a test there.
- Shortened patch 1's subject and noted in its commit message why the
  new handler does not repeat the reconnection that
  sme_event_assoc_reject() performs.

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    | 33 ++++++++++++++++++++++++++++
 wpa_supplicant/sme.h    |  7 ++++++
 4 files changed, 91 insertions(+)


base-commit: dcfb7053840087a943873e9a034b69cd79abaac2
-- 
2.55.0




More information about the Hostap mailing list