patch "USB: serial: console: fix use-after-free after failed setup" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: serial: console: fix use-after-free after failed setup
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
299d7572e46f98534033a9e65973f13ad1ce9047Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Wed, 4 Oct 2017 11:01:13 +0200
Subject: USB: serial: console: fix use-after-free after failed setup
Make sure to reset the USB-console port pointer when console setup fails in order to avoid having the struct usb_serial be prematurely freed by the console code when the device is later disconnected.
--- drivers/usb/serial/console.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/console.c +1 -0
@@ -186,6 +186,7 @@ static int usb_console_setup(struct console *co, char *options)tty_kref_put (tty); reset_open_count: port->port.count =0 ; + info->port =NULL ;usb_autopm_put_interface (serial->interface); error_get_interface:usb_serial_put (serial);
Signature · 1 line
2.14.2