aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-12-06 22:28:13 (GMT)
committerJouni Malinen <j@w1.fi>2019-12-06 22:28:13 (GMT)
commitc88e01e1b69eeeb6d609f61a4352ef16cf41b3dd (patch)
treec0723768555164d38c38fb5b7e7dc87f884fc3b6
parentb834e97003d5b851f0def5f5bffde79124a17b59 (diff)
downloadhostap-c88e01e1b69eeeb6d609f61a4352ef16cf41b3dd.zip
hostap-c88e01e1b69eeeb6d609f61a4352ef16cf41b3dd.tar.gz
hostap-c88e01e1b69eeeb6d609f61a4352ef16cf41b3dd.tar.bz2
SAE H2E: Fix validation of rejected groups list
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>
-rw-r--r--src/ap/ieee802_11.c2
-rw-r--r--wpa_supplicant/sme.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 6a638f0..c10ae12 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -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;
}
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index cfb5bb3..48fc8f2 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -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) {