summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-09-14 10:11:06 +0200
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-09-14 10:11:06 +0200
commit18ee5a5d93dd98426c8cd07cf766d5a7e6d3aa44 (patch)
treee0666284d3e86967dca4a2b0fd8f91a0e4b4fbc3
parent9ff75d99afc5eccb7d4b80ebf3bcd9efa94c4683 (diff)
downloadhardware-18ee5a5d93dd98426c8cd07cf766d5a7e6d3aa44.tar.gz
hardware-18ee5a5d93dd98426c8cd07cf766d5a7e6d3aa44.tar.xz
bluez: backport patch for blueborne
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--metadata/repository_mask.conf7
-rw-r--r--packages/net-wireless/bluez/bluez-5.46-r1.exheres-0 (renamed from packages/net-wireless/bluez/bluez-5.46.exheres-0)5
-rw-r--r--packages/net-wireless/bluez/files/CVE-2017-1000250.patch27
3 files changed, 38 insertions, 1 deletions
diff --git a/metadata/repository_mask.conf b/metadata/repository_mask.conf
index 8a9c4c2..367872c 100644
--- a/metadata/repository_mask.conf
+++ b/metadata/repository_mask.conf
@@ -62,3 +62,10 @@ sys-apps/iucode-tool[<2.1.1] [[
token = security
description = [ CVE-2017-0357 ]
]]
+
+net-wireless/bluez[<5.46-r1] [[
+ author = [ Marc-Antoine Perennou <keruspe@exherbo.org> ]
+ date = [ 14 Sep 2017 ]
+ token = security
+ description = [ CVE-2017-1000250 ]
+]]
diff --git a/packages/net-wireless/bluez/bluez-5.46.exheres-0 b/packages/net-wireless/bluez/bluez-5.46-r1.exheres-0
index bda12ca..7a8380f 100644
--- a/packages/net-wireless/bluez/bluez-5.46.exheres-0
+++ b/packages/net-wireless/bluez/bluez-5.46-r1.exheres-0
@@ -6,5 +6,8 @@ require bluez autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ]
PLATFORMS="~amd64 ~x86"
-DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/0001-Allow-using-obexd-without-systemd-in-the-user-session.patch )
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/0001-Allow-using-obexd-without-systemd-in-the-user-session.patch
+ "${FILES}"/CVE-2017-1000250.patch
+)
diff --git a/packages/net-wireless/bluez/files/CVE-2017-1000250.patch b/packages/net-wireless/bluez/files/CVE-2017-1000250.patch
new file mode 100644
index 0000000..1d122d6
--- /dev/null
+++ b/packages/net-wireless/bluez/files/CVE-2017-1000250.patch
@@ -0,0 +1,27 @@
+Upstream: yes
+From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 13 Sep 2017 10:01:40 +0300
+Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function
+
+Check if there is enough data to continue otherwise return an error.
+---
+ src/sdpd-request.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sdpd-request.c b/src/sdpd-request.c
+index 1eefdce..318d044 100644
+--- a/src/sdpd-request.c
++++ b/src/sdpd-request.c
+@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
+ } else {
+ /* continuation State exists -> get from cache */
+ sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
+- if (pCache) {
++ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
+ uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
+ pResponse = pCache->data;
+ memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);
+--
+cgit v1.1
+