aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-06-23 19:30:15 (GMT)
committerJouni Malinen <j@w1.fi>2015-06-23 20:10:36 (GMT)
commit6a58444d27fdb475ca2fa2f5cea0806b077fc31d (patch)
treeec95375aa01bf3a853274eb9f0540dfc37cb821a /src/ap/ieee802_11.c
parent4e7e68890a1a1eac34b70adf0c0c034b0e27810b (diff)
downloadhostap-6a58444d27fdb475ca2fa2f5cea0806b077fc31d.zip
hostap-6a58444d27fdb475ca2fa2f5cea0806b077fc31d.tar.gz
hostap-6a58444d27fdb475ca2fa2f5cea0806b077fc31d.tar.bz2
SAE: Verify that own/peer commit-scalar and COMMIT-ELEMENT are different
This check explicitly for reflection attack and stops authentication immediately if that is detected instead of continuing to the following 4-way handshake that would fail due to the attacker not knowing the key from the SAE exchange. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ieee802_11.c')
-rw-r--r--src/ap/ieee802_11.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 8d2a066..db20c86 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -769,6 +769,12 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
((const u8 *) mgmt) + len -
mgmt->u.auth.variable, &token,
&token_len, hapd->conf->sae_groups);
+ if (resp == SAE_SILENTLY_DISCARD) {
+ wpa_printf(MSG_DEBUG,
+ "SAE: Drop commit message from " MACSTR " due to reflection attack",
+ MAC2STR(sta->addr));
+ return;
+ }
if (token && check_sae_token(hapd, sta->addr, token, token_len)
< 0) {
wpa_printf(MSG_DEBUG, "SAE: Drop commit message with "