can: mcba_usb: fix use-after-free on disconnect
authorJohan Hovold <johan@kernel.org>
Tue, 1 Oct 2019 10:29:13 +0000 (12:29 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:20 +0000 (21:47 +0100)
commit4d6636498c41891d0482a914dd570343a838ad79
treeb2fcd4498df3314092a4a1ead3235acc44d4d1a3
parentfb5be6a7b4863ecc44963bb80ca614584b6c7817
can: mcba_usb: fix use-after-free on disconnect

The driver was accessing its driver data after having freed it.

Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer")
Cc: stable <stable@vger.kernel.org> # 4.12
Cc: Remigiusz Kołłątaj <remigiusz.kollataj@mobica.com>
Reported-by: syzbot+e29b17e5042bbc56fae9@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/mcba_usb.c