summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.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/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.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/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch')
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch
new file mode 100644
index 0000000000..45e6e87dfe
--- /dev/null
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-server-Fix-reassembly-buffer-handling.patch
@@ -0,0 +1,48 @@
1From fe76f487e28bdc61940f304f153a954cf36935ea Mon Sep 17 00:00:00 2001
2From: Jouni Malinen <jouni@codeaurora.org>
3Date: Wed, 17 Apr 2019 01:55:32 +0300
4Subject: [PATCH 1/3] EAP-pwd server: Fix reassembly buffer handling
5
6data->inbuf allocation might fail and if that were to happen, the next
7fragment in the exchange could have resulted in NULL pointer
8dereference. Unexpected fragment with more bit might also be able to
9trigger this. Fix that by explicitly checking for data->inbuf to be
10available before using it.
11
12Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
13Signed-off-by: Adrian Bunk <bunk@stusta.de>
14Upstream-Status: Backport
15CVE: CVE-2019-11555
16---
17 src/eap_server/eap_server_pwd.c | 8 +++++++-
18 1 file changed, 7 insertions(+), 1 deletion(-)
19
20diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
21index 11bef55..38e2af8 100644
22--- a/src/eap_server/eap_server_pwd.c
23+++ b/src/eap_server/eap_server_pwd.c
24@@ -912,6 +912,12 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv,
25 * the first and all intermediate fragments have the M bit set
26 */
27 if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) {
28+ if (!data->inbuf) {
29+ wpa_printf(MSG_DEBUG,
30+ "EAP-pwd: No buffer for reassembly");
31+ eap_pwd_state(data, FAILURE);
32+ return;
33+ }
34 if ((data->in_frag_pos + len) > wpabuf_size(data->inbuf)) {
35 wpa_printf(MSG_DEBUG, "EAP-pwd: Buffer overflow "
36 "attack detected! (%d+%d > %d)",
37@@ -932,7 +938,7 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv,
38 * last fragment won't have the M bit set (but we're obviously
39 * buffering fragments so that's how we know it's the last)
40 */
41- if (data->in_frag_pos) {
42+ if (data->in_frag_pos && data->inbuf) {
43 pos = wpabuf_head_u8(data->inbuf);
44 len = data->in_frag_pos;
45 wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes",
46--
472.7.4
48