]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE H2E: Fix validation of rejected groups list
authorJouni Malinen <jouni@codeaurora.org>
Fri, 6 Dec 2019 22:28:13 +0000 (00:28 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 6 Dec 2019 22:28:13 +0000 (00:28 +0200)
check_sae_rejected_groups() returns 1, not -1, in case an enabled group
is rejected. The previous check for < 0 could not have ever triggered.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/ieee802_11.c
wpa_supplicant/sme.c

index 6a638f09060b41ca041ec9f84b1783bbb2c4781d..c10ae12ee6bf38d4d3fda2427c47df487301d5b1 100644 (file)
@@ -1280,7 +1280,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 
                if (sta->sae->tmp &&
                    check_sae_rejected_groups(
-                           hapd, sta->sae->tmp->peer_rejected_groups) < 0) {
+                           hapd, sta->sae->tmp->peer_rejected_groups)) {
                        resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                        goto remove_sta;
                }
index cfb5bb33da41f14065d8471b3b9061d2d327d9c5..48fc8f245836e6bebf48871bd9c9b47c1993392a 100644 (file)
@@ -1263,7 +1263,7 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction,
                if (wpa_s->sme.sae.tmp &&
                    sme_check_sae_rejected_groups(
                            wpa_s,
-                           wpa_s->sme.sae.tmp->peer_rejected_groups) < 0)
+                           wpa_s->sme.sae.tmp->peer_rejected_groups))
                        return -1;
 
                if (sae_process_commit(&wpa_s->sme.sae) < 0) {