Mathias Nyman
5d9b70f7d5
xhci: Don't add a virt_dev to the devs array before it's fully allocated
...
Avoid null pointer dereference if some function is walking through the
devs array accessing members of a new virt_dev that is mid allocation.
Add the virt_dev to xhci->devs[i] _after_ the virt_device and all its
members are properly allocated.
issue found by KASAN: null-ptr-deref in xhci_find_slot_id_by_port
"Quick analysis suggests that xhci_alloc_virt_device() is not mutex
protected. If so, there is a time frame where xhci->devs[slot_id] is set
but not fully initialized. Specifically, xhci->devs[i]->udev can be NULL."
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 18:26:34 +01:00
..
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-28 15:17:48 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-02 11:10:55 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-02 11:10:55 +01:00
2017-11-07 15:52:29 +01:00
2017-11-02 11:10:55 +01:00
2017-11-01 17:05:51 +01:00
2017-11-13 21:14:07 -08:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-21 15:57:07 -08:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-21 15:57:07 -08:00
2017-11-02 11:10:55 +01:00
2017-11-04 11:48:02 +01:00
2017-11-02 11:10:55 +01:00
2017-11-21 15:57:07 -08:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2017-11-21 15:57:07 -08:00
2017-11-02 11:10:55 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-21 15:57:07 -08:00
2017-11-07 10:32:44 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-21 15:57:07 -08:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:53:48 +01:00
2017-11-07 15:53:48 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-12-08 18:26:34 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-12-01 15:24:58 +00:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-21 15:57:07 -08:00
2017-11-07 15:45:02 +01:00