summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2018-09-20 09:45:19 +0200
committerMartin Borg <martin.borg@enea.com>2018-09-21 14:42:26 +0200
commite5105c1a35907089dd13c0783ee5940106046896 (patch)
treeee94e601cb4fd951a30b00f2a90a921523af1c74
parent7954c83819f78fd8baf68615d592eb0886a8af65 (diff)
downloadmeta-enea-bsp-x86-e5105c1a35907089dd13c0783ee5940106046896.tar.gz
linux-intel-rt: Fix for CVE-2018-9363
References: https://github.com/nluedtke/linux_kernel_cves/blob/master/4.14/4.14_security.txt https://nvd.nist.gov/vuln/detail/CVE-2018-9363 Change-Id: I6c93f124c5ddfac6de11f62b943fea255513c8a3 Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-rw-r--r--recipes-kernel/linux/linux-intel-rt_4.14.bbappend1
-rw-r--r--recipes-kernel/linux/linux-intel/CVE-2018-9363.patch56
2 files changed, 57 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-intel-rt_4.14.bbappend b/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
index 530ea31..2b8d8d9 100644
--- a/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
+++ b/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
@@ -11,6 +11,7 @@ SRC_URI_append = " git://git@git.enea.com/linux/enea-kernel-cache.git;protocol=s
11 file://CVE-2018-13093.patch \ 11 file://CVE-2018-13093.patch \
12 file://CVE-2018-13094.patch \ 12 file://CVE-2018-13094.patch \
13 file://CVE-2018-15572.patch \ 13 file://CVE-2018-15572.patch \
14 file://CVE-2018-9363.patch \
14 " 15 "
15 16
16# Debug tools support 17# Debug tools support
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