]> git.baikalelectronics.ru Git - kernel.git/commit
USB: iowarrior: fix use-after-free on release
authorJohan Hovold <johan@kernel.org>
Wed, 9 Oct 2019 10:48:42 +0000 (12:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2019 10:45:06 +0000 (12:45 +0200)
commit0ec7a5034a3d52087480e7f34c0edd6165d5c961
tree3d39716bed63861406644319ee527f04fe12ef3c
parent4f7f0eda72330eb517015e885ed70109e2c57c67
USB: iowarrior: fix use-after-free on release

The driver was accessing its struct usb_interface from its release()
callback without holding a reference. This would lead to a
use-after-free whenever debugging was enabled and the device was
disconnected while its character device was open.

Fixes: 37ffb00ea1d8 ("USB: iowarrior: Convert local dbg macro to dev_dbg")
Cc: stable <stable@vger.kernel.org> # 3.16
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191009104846.5925-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/iowarrior.c