diff options
author | Adrian Bunk <bunk@stusta.de> | 2019-06-19 21:04:22 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-30 22:34:23 +0100 |
commit | ee0e9eaafed96587b6f1c6b995cd7d5927170c21 (patch) | |
tree | c3e3b3602923c23aa0614a44b3b4049e6f340dea /meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch | |
parent | 76c220e5fe43aef1014e6eec7f0136c2b34be308 (diff) | |
download | poky-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/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch')
-rw-r--r-- | meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch new file mode 100644 index 0000000000..87095bf7f4 --- /dev/null +++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0011-EAP-pwd-server-Verify-received-scalar-and-element.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 70ff850e89fbc8bc7da515321b4d15b5eef70581 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathy Vanhoef <mathy.vanhoef@nyu.edu> | ||
3 | Date: Sun, 31 Mar 2019 17:13:06 +0200 | ||
4 | Subject: [PATCH 11/14] EAP-pwd server: Verify received scalar and element | ||
5 | |||
6 | When processing an EAP-pwd Commit frame, the peer's scalar and element | ||
7 | (elliptic curve point) were not validated. This allowed an adversary to | ||
8 | bypass authentication, and impersonate any user if the crypto | ||
9 | implementation did not verify the validity of the EC point. | ||
10 | |||
11 | Fix this vulnerability by assuring the received scalar lies within the | ||
12 | valid range, and by checking that the received element is not the point | ||
13 | at infinity and lies on the elliptic curve being used. (CVE-2019-9498) | ||
14 | |||
15 | The vulnerability is only exploitable if OpenSSL version 1.0.2 or lower | ||
16 | is used, or if LibreSSL or wolfssl is used. Newer versions of OpenSSL | ||
17 | (and also BoringSSL) implicitly validate the elliptic curve point in | ||
18 | EC_POINT_set_affine_coordinates_GFp(), preventing the attack. | ||
19 | |||
20 | Signed-off-by: Mathy Vanhoef <mathy.vanhoef@nyu.edu> | ||
21 | Signed-off-by: Adrian Bunk <bunk@stusta.de> | ||
22 | Upstream-Status: Backport | ||
23 | CVE: CVE-2019-9498 | ||
24 | --- | ||
25 | src/eap_server/eap_server_pwd.c | 20 ++++++++++++++++++++ | ||
26 | 1 file changed, 20 insertions(+) | ||
27 | |||
28 | diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c | ||
29 | index d0fa54a..74979da 100644 | ||
30 | --- a/src/eap_server/eap_server_pwd.c | ||
31 | +++ b/src/eap_server/eap_server_pwd.c | ||
32 | @@ -718,6 +718,26 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data, | ||
33 | goto fin; | ||
34 | } | ||
35 | |||
36 | + /* verify received scalar */ | ||
37 | + if (crypto_bignum_is_zero(data->peer_scalar) || | ||
38 | + crypto_bignum_is_one(data->peer_scalar) || | ||
39 | + crypto_bignum_cmp(data->peer_scalar, | ||
40 | + crypto_ec_get_order(data->grp->group)) >= 0) { | ||
41 | + wpa_printf(MSG_INFO, | ||
42 | + "EAP-PWD (server): received scalar is invalid"); | ||
43 | + goto fin; | ||
44 | + } | ||
45 | + | ||
46 | + /* verify received element */ | ||
47 | + if (!crypto_ec_point_is_on_curve(data->grp->group, | ||
48 | + data->peer_element) || | ||
49 | + crypto_ec_point_is_at_infinity(data->grp->group, | ||
50 | + data->peer_element)) { | ||
51 | + wpa_printf(MSG_INFO, | ||
52 | + "EAP-PWD (server): received element is invalid"); | ||
53 | + goto fin; | ||
54 | + } | ||
55 | + | ||
56 | /* check to ensure peer's element is not in a small sub-group */ | ||
57 | if (!crypto_bignum_is_one(cofactor)) { | ||
58 | if (crypto_ec_point_mul(data->grp->group, data->peer_element, | ||
59 | -- | ||
60 | 2.7.4 | ||
61 | |||