summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/cve/CVE-2017-16525.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/cve/CVE-2017-16525.patch b/patches/cve/CVE-2017-16525.patch
new file mode 100644
index 0000000..b1a635e
--- /dev/null
+++ b/patches/cve/CVE-2017-16525.patch
@@ -0,0 +1,40 @@
1From 42651349f0207b8ba3b80b5bd868d9872fbcc6c1 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <johan@kernel.org>
3Date: Wed, 4 Oct 2017 11:01:13 +0200
4Subject: USB: serial: console: fix use-after-free after failed setup
5
6[ Upstream commit 299d7572e46f98534033a9e65973f13ad1ce9047 ]
7
8Make sure to reset the USB-console port pointer when console setup fails
9in order to avoid having the struct usb_serial be prematurely freed by
10the console code when the device is later disconnected.
11
12Fixes: 73e487fdb75f ("[PATCH] USB console: fix disconnection issues")
13
14Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.1.y&id=42651349f0207b8ba3b80b5bd868d9872fbcc6c1]
15CVE: CVE-2017-16525
16
17Cc: stable <stable@vger.kernel.org> # 2.6.18
18Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19Signed-off-by: Johan Hovold <johan@kernel.org>
20Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
21Signed-off-by: Adrian Stratulat <adrian.stratulat@enea.com>
22---
23 drivers/usb/serial/console.c | 1 +
24 1 file changed, 1 insertion(+)
25
26diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
27index 3806e7014199..2938153fe7b1 100644
28--- a/drivers/usb/serial/console.c
29+++ b/drivers/usb/serial/console.c
30@@ -189,6 +189,7 @@ static int usb_console_setup(struct console *co, char *options)
31 tty_kref_put(tty);
32 reset_open_count:
33 port->port.count = 0;
34+ info->port = NULL;
35 usb_autopm_put_interface(serial->interface);
36 error_get_interface:
37 usb_serial_put(serial);
38--
39cgit 1.2-0.3.lf.el7
40