summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2019-06-19 21:04:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-30 22:34:23 +0100
commitee0e9eaafed96587b6f1c6b995cd7d5927170c21 (patch)
treec3e3b3602923c23aa0614a44b3b4049e6f340dea /meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch
parent76c220e5fe43aef1014e6eec7f0136c2b34be308 (diff)
downloadpoky-ee0e9eaafed96587b6f1c6b995cd7d5927170c21.tar.gz
wpa-supplicant: Fix CVE-2019-9494 CVE-2019-9495 CVE-2019-9496 CVE-2019-9497 CVE-2019-9498 CVE-2019-9499 CVE-2019-11555
(From OE-Core rev: ae8e0440fc1177bf44e46804e1f5927cb86f8324) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch')
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch
new file mode 100644
index 0000000000..32d134db41
--- /dev/null
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0012-EAP-pwd-server-Detect-reflection-attacks.patch
@@ -0,0 +1,48 @@
1From d63edfa90243e9a7de6ae5c275032f2cc79fef95 Mon Sep 17 00:00:00 2001
2From: Mathy Vanhoef <mathy.vanhoef@nyu.edu>
3Date: Sun, 31 Mar 2019 17:26:01 +0200
4Subject: [PATCH 12/14] EAP-pwd server: Detect reflection attacks
5
6When processing an EAP-pwd Commit frame, verify that the peer's scalar
7and elliptic curve element differ from the one sent by the server. This
8prevents reflection attacks where the adversary reflects the scalar and
9element sent by the server. (CVE-2019-9497)
10
11The vulnerability allows an adversary to complete the EAP-pwd handshake
12as any user. However, the adversary does not learn the negotiated
13session key, meaning the subsequent 4-way handshake would fail. As a
14result, this cannot be abused to bypass authentication unless EAP-pwd is
15used in non-WLAN cases without any following key exchange that would
16require the attacker to learn the MSK.
17
18Signed-off-by: Mathy Vanhoef <mathy.vanhoef@nyu.edu>
19Signed-off-by: Adrian Bunk <bunk@stusta.de>
20Upstream-Status: Backport
21CVE: CVE-2019-9497
22---
23 src/eap_server/eap_server_pwd.c | 9 +++++++++
24 1 file changed, 9 insertions(+)
25
26diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
27index 74979da..16057e9 100644
28--- a/src/eap_server/eap_server_pwd.c
29+++ b/src/eap_server/eap_server_pwd.c
30@@ -753,6 +753,15 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data,
31 }
32 }
33
34+ /* detect reflection attacks */
35+ if (crypto_bignum_cmp(data->my_scalar, data->peer_scalar) == 0 ||
36+ crypto_ec_point_cmp(data->grp->group, data->my_element,
37+ data->peer_element) == 0) {
38+ wpa_printf(MSG_INFO,
39+ "EAP-PWD (server): detected reflection attack!");
40+ goto fin;
41+ }
42+
43 /* compute the shared key, k */
44 if ((crypto_ec_point_mul(data->grp->group, data->grp->pwe,
45 data->peer_scalar, K) < 0) ||
46--
472.7.4
48