]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 21 Dec 2017 13:06:13 +0000 (15:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Dec 2017 14:24:27 +0000 (15:24 +0100)
commitb7fdadebdd27f6974b75e409a71613ab06672f20
tree9b54176a65005199ca70e259ebbbb20f490b78ee
parent5ccdd1ba1926d23d74f23984cb1b1fe6dbe2f292
xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate

Free the virt_device and its debugfs_private member together.

When resuming from hibernate the .free_dev callback unconditionally
freed the debugfs_private member, but could leave virt_device intact.

This triggered a NULL pointer dereference after resume when usbmuxd
sent a USBDEVFS_SETCONFIGURATION ioctl to a device, trying to add a
endpoint debugfs entry to a already freed debugfs_private pointer.

Fixes: a191edfed15e ("usb: xhci: Add debugfs interface for xHCI driver")
Reported-by: Alexander Kappner <agk@godking.net>
Tested-by: Alexander Kappner <agk@godking.net>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c