]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:45 +0000 (11:55 +0200)
commit466d25b93d9b7cef5cf7e5622fb3d359af6639df
treefc0bd62d45ffc4cf5098fa5edb15b7d839774b27
parent9337823f09c9b513b5af2d58e6ee4dcd032c861c
hso: fix NULL-deref on tty open

BugLink: https://bugs.launchpad.net/bugs/1848274
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/usb/hso.c