summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-intel/CVE-2018-16658.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-intel/CVE-2018-16658.patch')
-rw-r--r--recipes-kernel/linux/linux-intel/CVE-2018-16658.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-intel/CVE-2018-16658.patch b/recipes-kernel/linux/linux-intel/CVE-2018-16658.patch
new file mode 100644
index 0000000..d6dc109
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/CVE-2018-16658.patch
@@ -0,0 +1,42 @@
1From 73b2e7073b51de0b03ebd15c97dd3ad0c3470810 Mon Sep 17 00:00:00 2001
2From: Scott Bauer <scott.bauer@intel.com>
3Date: Thu, 26 Apr 2018 11:51:08 -0600
4Subject: [PATCH] cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
5
6commit 8f3fafc9c2f0ece10832c25f7ffcb07c97a32ad4 upstream.
7
8Like d88b6d04: "cdrom: information leak in cdrom_ioctl_media_changed()"
9
10There is another cast from unsigned long to int which causes
11a bounds check to fail with specially crafted input. The value is
12then used as an index in the slot array in cdrom_slot_status().
13
14CVE: CVE-2018-16658
15Upstream-Status: Backport
16
17Signed-off-by: Scott Bauer <scott.bauer@intel.com>
18Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
19Cc: stable@vger.kernel.org
20Signed-off-by: Jens Axboe <axboe@kernel.dk>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
23---
24 drivers/cdrom/cdrom.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
28index bfc566d..8cfa10ab 100644
29--- a/drivers/cdrom/cdrom.c
30+++ b/drivers/cdrom/cdrom.c
31@@ -2542,7 +2542,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
32 if (!CDROM_CAN(CDC_SELECT_DISC) ||
33 (arg == CDSL_CURRENT || arg == CDSL_NONE))
34 return cdi->ops->drive_status(cdi, CDSL_CURRENT);
35- if (((int)arg >= cdi->capacity))
36+ if (arg >= cdi->capacity)
37 return -EINVAL;
38 return cdrom_slot_status(cdi, arg);
39 }
40--
411.9.1
42