summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Wellving <andreas.wellving@enea.com>2018-10-15 10:26:14 +0200
committerAdrian Dudau <Adrian.Dudau@enea.com>2018-10-16 17:40:26 +0200
commita706636a8a960796d819bb6471863a894f1943bf (patch)
tree84920a1200cf580c756693bf04d196db9c713c0a
parentfef7211bf4e231920db714db7e298bcbaa9dad1f (diff)
downloadenea-kernel-cache-a706636a8a960796d819bb6471863a894f1943bf.tar.gz
hidp: CVE-2018-9363:
hidp: buffer overflow in hidp_process_report References: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.9.y&id=7c7940ffbaefdbb189f78a48b4e64b6f268b1dbf Change-Id: If99e8c0371ad692696a19c97f11cac0b7f630919 Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
-rw-r--r--patches/cve/4.9.x.scc3
-rw-r--r--patches/cve/CVE-2018-9363-Bluetooth-hidp-buffer-overflow-in-hidp_process_repor.patch51
2 files changed, 54 insertions, 0 deletions
diff --git a/patches/cve/4.9.x.scc b/patches/cve/4.9.x.scc
index b5fb15d..b921809 100644
--- a/patches/cve/4.9.x.scc
+++ b/patches/cve/4.9.x.scc
@@ -43,3 +43,6 @@ patch CVE-2018-5390-tcp-free-batches-of-packets-in-tcp_prune_ofo_queue.patch
43 43
44#CVEs fixed in 4.9.119: 44#CVEs fixed in 4.9.119:
45patch CVE-2018-12233-jfs-Fix-inconsistency-between-memory-allocation-and-.patch 45patch CVE-2018-12233-jfs-Fix-inconsistency-between-memory-allocation-and-.patch
46
47#CVEs fixed in 4.9.121:
48patch CVE-2018-9363-Bluetooth-hidp-buffer-overflow-in-hidp_process_repor.patch
diff --git a/patches/cve/CVE-2018-9363-Bluetooth-hidp-buffer-overflow-in-hidp_process_repor.patch b/patches/cve/CVE-2018-9363-Bluetooth-hidp-buffer-overflow-in-hidp_process_repor.patch
new file mode 100644
index 0000000..4c6ce81
--- /dev/null
+++ b/patches/cve/CVE-2018-9363-Bluetooth-hidp-buffer-overflow-in-hidp_process_repor.patch
@@ -0,0 +1,51 @@
1From 7992c18810e568b95c869b227137a2215702a805 Mon Sep 17 00:00:00 2001
2From: Mark Salyzyn <salyzyn@android.com>
3Date: Tue, 31 Jul 2018 15:02:13 -0700
4Subject: [PATCH] Bluetooth: hidp: buffer overflow in hidp_process_report
5
6The buffer length is unsigned at all layers, but gets cast to int and
7checked in hidp_process_report and can lead to a buffer overflow.
8Switch len parameter to unsigned int to resolve issue.
9
10This affects 3.18 and newer kernels.
11
12CVE-2018-9363
13Upstream-Status: Backport
14
15Signed-off-by: Mark Salyzyn <salyzyn@android.com>
16Fixes: a4b1b5877b514b276f0f31efe02388a9c2836728 ("HID: Bluetooth: hidp: make sure input buffers are big enough")
17Cc: Marcel Holtmann <marcel@holtmann.org>
18Cc: Johan Hedberg <johan.hedberg@gmail.com>
19Cc: "David S. Miller" <davem@davemloft.net>
20Cc: Kees Cook <keescook@chromium.org>
21Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
22Cc: linux-bluetooth@vger.kernel.org
23Cc: netdev@vger.kernel.org
24Cc: linux-kernel@vger.kernel.org
25Cc: security@kernel.org
26Cc: kernel-team@android.com
27Acked-by: Kees Cook <keescook@chromium.org>
28Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
29Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
30---
31 net/bluetooth/hidp/core.c | 4 ++--
32 1 file changed, 2 insertions(+), 2 deletions(-)
33
34diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
35index 6f3eaf2..253975c 100644
36--- a/net/bluetooth/hidp/core.c
37+++ b/net/bluetooth/hidp/core.c
38@@ -431,8 +431,8 @@ static void hidp_del_timer(struct hidp_session *session)
39 del_timer(&session->timer);
40 }
41
42-static void hidp_process_report(struct hidp_session *session,
43- int type, const u8 *data, int len, int intr)
44+static void hidp_process_report(struct hidp_session *session, int type,
45+ const u8 *data, unsigned int len, int intr)
46 {
47 if (len > HID_MAX_BUFFER_SIZE)
48 len = HID_MAX_BUFFER_SIZE;
49--
502.7.4
51