summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/config.c
diff options
context:
space:
mode:
authorMathias Nyman2018-05-03 16:30:07 +0200
committerGreg Kroah-Hartman2018-05-03 17:55:32 +0200
commit44a182b9d17765514fa2b1cc911e4e65134eef93 (patch)
tree850a71ec84a35a4d6f7c56be0816b4e697d60edc /drivers/usb/core/config.c
parentusb: musb: trace: fix NULL pointer dereference in musb_g_tx() (diff)
downloadkernel-qcow2-linux-44a182b9d17765514fa2b1cc911e4e65134eef93.tar.gz
kernel-qcow2-linux-44a182b9d17765514fa2b1cc911e4e65134eef93.tar.xz
kernel-qcow2-linux-44a182b9d17765514fa2b1cc911e4e65134eef93.zip
xhci: Fix use-after-free in xhci_free_virt_device
KASAN found a use-after-free in xhci_free_virt_device+0x33b/0x38e where xhci_free_virt_device() sets slot id to 0 if udev exists: if (dev->udev && dev->udev->slot_id) dev->udev->slot_id = 0; dev->udev will be true even if udev is freed because dev->udev is not set to NULL. set dev->udev pointer to NULL in xhci_free_dev() The original patch went to stable so this fix needs to be applied there as well. Fixes: a400efe455f7 ("xhci: zero usb device slot_id member when disabling and freeing a xhci slot") Cc: <stable@vger.kernel.org> Reported-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/config.c')
0 files changed, 0 insertions, 0 deletions