diff options
author | Johan Hovold <johan@kernel.org> | 2019-09-19 14:12:34 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2019-09-19 16:17:57 +0200 |
commit | 7fd25e6fc035f4b04b75bca6d7e8daa069603a76 (patch) | |
tree | de38167115834700c8622e7ec512d90f3c6174fb | |
parent | f53a7ad189594a112167efaf17ea8d0242b5ac00 (diff) | |
download | linux-stable-7fd25e6fc035f4b04b75bca6d7e8daa069603a76.tar.gz linux-stable-7fd25e6fc035f4b04b75bca6d7e8daa069603a76.tar.bz2 linux-stable-7fd25e6fc035f4b04b75bca6d7e8daa069603a76.zip |
ieee802154: atusb: fix use-after-free at disconnect
The disconnect callback was accessing the hardware-descriptor private
data after having having freed it.
Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver")
Cc: stable <stable@vger.kernel.org> # 4.2
Cc: Alexander Aring <alex.aring@gmail.com>
Reported-by: syzbot+f4509a9138a1472e7e80@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
-rw-r--r-- | drivers/net/ieee802154/atusb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/atusb.c b/drivers/net/ieee802154/atusb.c index ceddb424f887..0dd0ba915ab9 100644 --- a/drivers/net/ieee802154/atusb.c +++ b/drivers/net/ieee802154/atusb.c @@ -1137,10 +1137,11 @@ static void atusb_disconnect(struct usb_interface *interface) ieee802154_unregister_hw(atusb->hw); + usb_put_dev(atusb->usb_dev); + ieee802154_free_hw(atusb->hw); usb_set_intfdata(interface, NULL); - usb_put_dev(atusb->usb_dev); pr_debug("%s done\n", __func__); } |