]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
USB: cdc-acm: fix use-after-free after probe failure
authorJohan Hovold <johan@kernel.org>
Mon, 22 Mar 2021 15:53:12 +0000 (16:53 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:53 +0000 (15:42 -0500)
commit1e1c6accd3a91c23dcf7b03f13d7787c8f62c46f
tree8db557d4806823203ac00c3238da9df1e0e77623
parent821fdb8364ef33f298d4417da59f53b24e85e3bd
USB: cdc-acm: fix use-after-free after probe failure

BugLink: https://bugs.launchpad.net/bugs/1923069
commit 4e49bf376c0451ad2eae2592e093659cde12be9a upstream.

If tty-device registration fails the driver would fail to release the
data interface. When the device is later disconnected, the disconnect
callback would still be called for the data interface and would go about
releasing already freed resources.

Fixes: c93d81955005 ("usb: cdc-acm: fix error handling in acm_probe()")
Cc: stable@vger.kernel.org # 3.9
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210322155318.9837-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/usb/class/cdc-acm.c