]> www.infradead.org Git - users/dwmw2/linux.git/commit
hso: fix NULL-deref on tty open
authorJohan Hovold <johan@kernel.org>
Mon, 30 Sep 2019 15:12:41 +0000 (17:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:58:17 +0000 (18:58 +0200)
commit93b1f936455951e9c249403b4488e0cf4d32d61d
treef5bf2e45feed34b78d1ba19e6d50b2c3f25c126d
parent7edcdec673dc7e2c55c9fad8ae0e2ad211bf6350
hso: fix NULL-deref on tty open

[ Upstream commit 8353da9fa69722b54cba82b2ec740afd3d438748 ]

Fix NULL-pointer dereference on tty open due to a failure to handle a
missing interrupt-in endpoint when probing modem ports:

BUG: kernel NULL pointer dereference, address: 0000000000000006
...
RIP: 0010:tiocmget_submit_urb+0x1c/0xe0 [hso]
...
Call Trace:
hso_start_serial_device+0xdc/0x140 [hso]
hso_serial_open+0x118/0x1b0 [hso]
tty_open+0xf1/0x490

Fixes: 542f54823614 ("tty: Modem functions for the HSO driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/hso.c