summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-intel/CVE-2018-9363.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-intel/CVE-2018-9363.patch')
-rw-r--r--recipes-kernel/linux/linux-intel/CVE-2018-9363.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-intel/CVE-2018-9363.patch b/recipes-kernel/linux/linux-intel/CVE-2018-9363.patch
new file mode 100644
index 0000000..45a02d7
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/CVE-2018-9363.patch
@@ -0,0 +1,56 @@
1From 6e2c702e797c25b49dac3a9f663c449f30cf8efc 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
6commit 7992c18810e568b95c869b227137a2215702a805 upstream.
7
8CVE-2018-9363
9
10The buffer length is unsigned at all layers, but gets cast to int and
11checked in hidp_process_report and can lead to a buffer overflow.
12Switch len parameter to unsigned int to resolve issue.
13
14This affects 3.18 and newer kernels.
15
16CVE: CVE-2018-9363
17Upstream-Status: Backport
18
19Signed-off-by: Mark Salyzyn <salyzyn@android.com>
20Fixes: a4b1b5877b514b276f0f31efe02388a9c2836728 ("HID: Bluetooth: hidp: make sure input buffers are big enough")
21Cc: Marcel Holtmann <marcel@holtmann.org>
22Cc: Johan Hedberg <johan.hedberg@gmail.com>
23Cc: "David S. Miller" <davem@davemloft.net>
24Cc: Kees Cook <keescook@chromium.org>
25Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
26Cc: linux-bluetooth@vger.kernel.org
27Cc: netdev@vger.kernel.org
28Cc: linux-kernel@vger.kernel.org
29Cc: security@kernel.org
30Cc: kernel-team@android.com
31Acked-by: Kees Cook <keescook@chromium.org>
32Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
35---
36 net/bluetooth/hidp/core.c | 4 ++--
37 1 file changed, 2 insertions(+), 2 deletions(-)
38
39diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
40index 8112893..cef3754 100644
41--- a/net/bluetooth/hidp/core.c
42+++ b/net/bluetooth/hidp/core.c
43@@ -431,8 +431,8 @@ static void hidp_del_timer(struct hidp_session *session)
44 del_timer(&session->timer);
45 }
46
47-static void hidp_process_report(struct hidp_session *session,
48- int type, const u8 *data, int len, int intr)
49+static void hidp_process_report(struct hidp_session *session, int type,
50+ const u8 *data, unsigned int len, int intr)
51 {
52 if (len > HID_MAX_BUFFER_SIZE)
53 len = HID_MAX_BUFFER_SIZE;
54--
551.9.1
56