]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: serial: opticon: fix control-message timeouts
authorJohan Hovold <johan@kernel.org>
Mon, 13 Jan 2020 17:22:13 +0000 (18:22 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit8dfd60e08b76ffc9bfaf2525f0fbf1800b252ec4
tree572d74fa947d30f71fe161ba26533e5213139cb4
parent098fe8ba6b2dcbdb116b884d67cb8f57b4160c81
USB: serial: opticon: fix control-message timeouts

BugLink: https://bugs.launchpad.net/bugs/1862259
commit 5e28055f340275a8616eee88ef19186631b4d136 upstream.

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.

Fixes: 309a057932ab ("USB: opticon: add rts and cts support")
Cc: stable <stable@vger.kernel.org> # 2.6.39
Cc: Martin Jansen <martin.jansen@opticon.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/serial/opticon.c