[PATCH] SAE: Also treat UNSPECIFIED_FAILURE as a password mismatch

Vignesh Raman vignesh.raman at collabora.com
Mon Aug 24 03:05:46 PDT 2026


As per the IEEE 802.11 standard, status code 15
(WLAN_STATUS_CHALLENGE_FAIL), when returned in an Authentication frame
of an SAE exchange, is indicative of a password mismatch, and this is
what wpas_notify_sae_password_mismatch() currently checks for.

hostapd itself used WLAN_STATUS_UNSPECIFIED_FAILURE for this case until
commit c823197bdef4 ("SAE: Use Challenge Failure status code in confirm
message failure cases"). This has been observed on an AP (hostapd
v2.10-devel on ASUS RT-AX86U Pro) that, without this fix, returns
WLAN_STATUS_UNSPECIFIED_FAILURE for a wrong SAE password.

So to handle a wrong password with APs without the fix c823197bdef4,
also treat UNSPECIFIED_FAILURE as a password mismatch.

Signed-off-by: Vignesh Raman <vignesh.raman at collabora.com>
---
 wpa_supplicant/sme.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 459b0a8b3..d8db3b513 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -3967,8 +3967,10 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
 		if (res < 0) {
 			if (data->auth.auth_transaction ==
 			    WLAN_AUTH_TR_SEQ_SAE_CONFIRM &&
-			    data->auth.status_code ==
-			    WLAN_STATUS_CHALLENGE_FAIL)
+			    (data->auth.status_code ==
+			     WLAN_STATUS_CHALLENGE_FAIL ||
+			     data->auth.status_code ==
+			     WLAN_STATUS_UNSPECIFIED_FAILURE))
 				wpas_notify_sae_password_mismatch(wpa_s);
 			wpas_connection_failed(wpa_s, wpa_s->pending_bssid,
 					       NULL);
-- 
2.47.3




More information about the Hostap mailing list