]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Oct 2019 01:06:49 +0000 (21:06 -0400)
commita22b73e4c642a071c80acacda2420d0e275ae6f7
tree12ac3d1e332c42a46cfa76c0e6ff836e189ad397
parent1e65606596702549569185e8e4a43a84b9672c40
hso: fix NULL-deref on tty open

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: 1ff44df39df0 ("tty: Modem functions for the HSO driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c