Skip to content

Commit 2f2f3ff

Browse files
jhovoldgregkh
authored andcommitted
ieee802154: atusb: fix use-after-free at disconnect
commit 7fd25e6 upstream. The disconnect callback was accessing the hardware-descriptor private data after having having freed it. Fixes: 7490b00 ("ieee802154: add support for atusb transceiver") Cc: stable <[email protected]> # 4.2 Cc: Alexander Aring <[email protected]> Reported-by: [email protected] Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Stefan Schmidt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 156f149 commit 2f2f3ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ieee802154/atusb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,10 +838,11 @@ static void atusb_disconnect(struct usb_interface *interface)
838838

839839
ieee802154_unregister_hw(atusb->hw);
840840

841+
usb_put_dev(atusb->usb_dev);
842+
841843
ieee802154_free_hw(atusb->hw);
842844

843845
usb_set_intfdata(interface, NULL);
844-
usb_put_dev(atusb->usb_dev);
845846

846847
pr_debug("atusb_disconnect done\n");
847848
}

0 commit comments

Comments
 (0)