summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch')
-rw-r--r--recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch49
1 files changed, 0 insertions, 49 deletions
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch
deleted file mode 100644
index 7abf193..0000000
--- a/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From 1e87a2456b0227ca4ab881e19a11bb99d164e792 Mon Sep 17 00:00:00 2001
2From: Kees Cook <keescook@chromium.org>
3Date: Wed, 28 Aug 2013 22:31:52 +0200
4Subject: [PATCH] HID: picolcd_core: validate output report details
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9A HID device could send a malicious output report that would cause the
10picolcd HID driver to trigger a NULL dereference during attr file writing.
11
12[jkosina@suse.cz: changed
13
14 report->maxfield < 1
15
16to
17
18 report->maxfield != 1
19
20as suggested by Bruno].
21
22CVE-2013-2899
23
24Signed-off-by: Kees Cook <keescook@chromium.org>
25Cc: stable@kernel.org
26Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org>
27Acked-by: Bruno Prémont <bonbons@linux-vserver.org>
28Signed-off-by: Jiri Kosina <jkosina@suse.cz>
29Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
30---
31 drivers/hid/hid-picolcd_core.c | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c
35index b48092d..acbb0210 100644
36--- a/drivers/hid/hid-picolcd_core.c
37+++ b/drivers/hid/hid-picolcd_core.c
38@@ -290,7 +290,7 @@ static ssize_t picolcd_operation_mode_store(struct device *dev,
39 buf += 10;
40 cnt -= 10;
41 }
42- if (!report)
43+ if (!report || report->maxfield != 1)
44 return -EINVAL;
45
46 while (cnt > 0 && (buf[cnt-1] == '\n' || buf[cnt-1] == '\r'))
47--
481.7.9.5
49