+5
−0
Loading
stable inclusion from stable-v4.19.271 commit 6fac4b5cecb3928a0a81069aaa815a2edc8dd5a1 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IALLDG CVE: CVE-2023-52898 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6fac4b5cecb3928a0a81069aaa815a2edc8dd5a1 -------------------------------- commit a2bc47c4 upstream. Make sure xhci_free_dev() and xhci_kill_endpoint_urbs() do not race and cause null pointer dereference when host suddenly dies. Usb core may call xhci_free_dev() which frees the xhci->devs[slot_id] virt device at the same time that xhci_kill_endpoint_urbs() tries to loop through all the device's endpoints, checking if there are any cancelled urbs left to give back. hold the xhci spinlock while freeing the virt device Cc: stable@vger.kernel.org Conflicts: drivers/usb/host/xhci.c [Resolve conflicts due to previous bugfix] Signed-off-by:Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20230116142216.1141605-4-mathias.nyman@linux.intel.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Zheng Yejian <zhengyejian1@huawei.com>