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/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.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/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch')
-rw-r--r-- | meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch new file mode 100644 index 0000000000..95ea809ef2 --- /dev/null +++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-reassembly-buffer-handling.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From d2d1a324ce937628e4d9d9999fe113819b7d4478 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <jouni@codeaurora.org> | ||
3 | Date: Wed, 17 Apr 2019 02:21:20 +0300 | ||
4 | Subject: [PATCH 3/3] EAP-pwd peer: Fix reassembly buffer handling | ||
5 | |||
6 | Unexpected fragment might result in data->inbuf not being allocated | ||
7 | before processing and that could have resulted in NULL pointer | ||
8 | dereference. Fix that by explicitly checking for data->inbuf to be | ||
9 | available before using it. | ||
10 | |||
11 | Signed-off-by: Jouni Malinen <jouni@codeaurora.org> | ||
12 | Signed-off-by: Adrian Bunk <bunk@stusta.de> | ||
13 | Upstream-Status: Backport | ||
14 | CVE: CVE-2019-11555 | ||
15 | --- | ||
16 | src/eap_peer/eap_pwd.c | 9 ++++++++- | ||
17 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c | ||
20 | index 46894a5..76fcad4 100644 | ||
21 | --- a/src/eap_peer/eap_pwd.c | ||
22 | +++ b/src/eap_peer/eap_pwd.c | ||
23 | @@ -932,6 +932,13 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, | ||
24 | * buffer and ACK the fragment | ||
25 | */ | ||
26 | if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) { | ||
27 | + if (!data->inbuf) { | ||
28 | + wpa_printf(MSG_DEBUG, | ||
29 | + "EAP-pwd: No buffer for reassembly"); | ||
30 | + ret->methodState = METHOD_DONE; | ||
31 | + ret->decision = DECISION_FAIL; | ||
32 | + return NULL; | ||
33 | + } | ||
34 | data->in_frag_pos += len; | ||
35 | if (data->in_frag_pos > wpabuf_size(data->inbuf)) { | ||
36 | wpa_printf(MSG_INFO, "EAP-pwd: Buffer overflow attack " | ||
37 | @@ -958,7 +965,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, | ||
38 | /* | ||
39 | * we're buffering and this is the last fragment | ||
40 | */ | ||
41 | - if (data->in_frag_pos) { | ||
42 | + if (data->in_frag_pos && data->inbuf) { | ||
43 | wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes", | ||
44 | (int) len); | ||
45 | pos = wpabuf_head_u8(data->inbuf); | ||
46 | -- | ||
47 | 2.7.4 | ||
48 | |||