patch "USB: serial: opticon: fix control-message timeouts" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: serial: opticon: fix control-message timeouts
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.
From 5e28055f340275a8616eee88ef19186631b4d136 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 13 Jan 2020 18:22:13 +0100
Subject: USB: serial: opticon: fix control-message timeouts
The driver was issuing synchronous uninterruptible control requests without using a timeout. This could lead to the driver hanging on open() or tiocmset() due to a malfunctioning (or malicious) device until the device is physically disconnected.
The USB upper limit of five seconds per request should be more than enough.
--- drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/opticon.c +1 -1
@@ -113,7 +113,7 @@ static int send_control_msg(struct usb_serial_port *port, u8 requesttype, retval =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), requesttype,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_INTERFACE , -0 ,0 , buffer,1 ,0 ); +0 ,0 , buffer,1 ,USB_CTRL_SET_TIMEOUT );kfree (buffer);if (retval <0 )
Signature · 1 line
2.25.0