Re: [RESEND PATCH] usbip: vudc: fix NULL pointer dereference in vep_dequeue()

From: Greg KH

Date: Thu Jul 02 2026 - 05:11:47 EST


On Thu, Jul 02, 2026 at 04:12:32PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@xxxxxxxxxxxxx>
>
> vep_alloc_request() zero-initializes struct vrequest but never assigns
> vrequest::udc. vep_dequeue() then reads that field and dereferences it
> while checking udc->driver. Consequently, any usb_ep_dequeue() call that
> reaches the vUDC dequeue operation can crash the kernel.
>
> The endpoint passed to ->dequeue() identifies both the request queue
> being searched and the owning vUDC. Derive the controller from that
> endpoint with ep_to_vudc(), as the other endpoint operations do.
>
> After this change, vrequest::udc has no users. Remove the redundant
> controller backpointer.
>
> Fixes: b6a0ca111867 ("usbip: vudc: Add UDC specific ops")
> Signed-off-by: Xu Rao <raoxu@xxxxxxxxxxxxx>
> ---
> drivers/usb/usbip/vudc.h | 1 -
> drivers/usb/usbip/vudc_dev.c | 4 +---
> 2 files changed, 1 insertion(+), 4 deletions(-)

Why is this a RESEND?