diff options
author | Mark H Weaver <mhw@netris.org> | 2015-11-11 07:43:12 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-11-11 07:45:11 -0500 |
commit | 419630e0bec46b9cb33047dea1662df0c400ade3 (patch) | |
tree | 585a136efc3f6af5be8ffe95435ccb96f59d58e7 /gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch | |
parent | 875b2f3d5e7c04176239d16c1832543f315cbf91 (diff) | |
download | guix-419630e0bec46b9cb33047dea1662df0c400ade3.tar guix-419630e0bec46b9cb33047dea1662df0c400ade3.tar.gz |
gnu: wpa-supplicant: Add fixes for CVE-2015-{5310,5314,5315,5316}.
* gnu/packages/patches/wpa-supplicant-CVE-2015-5310.patch,
gnu/packages/patches/wpa-supplicant-CVE-2015-5314.patch,
gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch,
gnu/packages/patches/wpa-supplicant-CVE-2015-5316.patch: New files.
* gnu-system.am (dist_patch_DATA): Add them.
* gnu/packages/admin.scm (wpa-supplicant-minimal)[source]: Add patches.
Diffstat (limited to 'gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch')
-rw-r--r-- | gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch b/gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch new file mode 100644 index 0000000000..82c26398b6 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch @@ -0,0 +1,54 @@ +From 8057821706784608b828e769ccefbced95591e50 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sun, 1 Nov 2015 18:18:17 +0200 +Subject: [PATCH] EAP-pwd peer: Fix last fragment length validation + +All but the last fragment had their length checked against the remaining +room in the reassembly buffer. This allowed a suitably constructed last +fragment frame to try to add extra data that would go beyond the buffer. +The length validation code in wpabuf_put_data() prevents an actual +buffer write overflow from occurring, but this results in process +termination. (CVE-2015-5315) + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 1f78544..75ceef1 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -903,7 +903,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * buffer and ACK the fragment + */ +- if (EAP_PWD_GET_MORE_BIT(lm_exch)) { ++ if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) { + data->in_frag_pos += len; + if (data->in_frag_pos > wpabuf_size(data->inbuf)) { + wpa_printf(MSG_INFO, "EAP-pwd: Buffer overflow attack " +@@ -916,7 +916,8 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + return NULL; + } + wpabuf_put_data(data->inbuf, pos, len); +- ++ } ++ if (EAP_PWD_GET_MORE_BIT(lm_exch)) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, + EAP_PWD_HDR_SIZE, + EAP_CODE_RESPONSE, eap_get_id(reqData)); +@@ -930,10 +931,8 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * we're buffering and this is the last fragment + */ + if (data->in_frag_pos) { +- wpabuf_put_data(data->inbuf, pos, len); + wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes", + (int) len); +- data->in_frag_pos += len; + pos = wpabuf_head_u8(data->inbuf); + len = data->in_frag_pos; + } +-- +1.9.1 + |