Linux USB
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Hu Xinyao <huxinyao0011@gmail.com>
Cc: Valentina Manea <valentina.manea.m@gmail.com>,
	Shuah Khan <shuah@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Hongren Zheng <i@zenithal.me>,
	linux-usb@vger.kernel.org, security@kernel.org
Subject: Re: [PATCH] usbip: vudc: get vudc from endpoint in vep_dequeue
Date: Mon, 15 Jun 2026 12:33:47 +0200	[thread overview]
Message-ID: <2026061508-product-pliable-13cd@gregkh> (raw)
In-Reply-To: <20260615101110.1913-1-huxinyao0011@gmail.com>

On Mon, Jun 15, 2026 at 06:11:10PM +0800, Hu Xinyao wrote:
> vep_dequeue() looks up the virtual UDC through vrequest->udc, but
> that field is never initialized when requests are allocated or queued.
> A gadget function that dequeues a request during disconnect can
> therefore dereference a NULL vudc pointer and crash the kernel.
> 
> This was observed with a USB/IP vUDC ACM gadget. ACM is not unique here;
> it was only the tested gadget path. The bug is in the generic vUDC
> dequeue path rather than in ACM itself.
> 
> Use the endpoint to recover the vudc, as the other vUDC endpoint ops
> already do, instead of relying on the request-private field.
> 
> Fixes: b6a0ca111867 ("usbip: vudc: Add UDC specific ops")
> Cc: stable@vger.kernel.org
> Reported-by: Hu Xinyao <huxinyao0011@gmail.com>
> Signed-off-by: Hu Xinyao <huxinyao0011@gmail.com>

When you author and sign off on a patch, you don't need the reported-by
line.

Anyway, isn't this patch:
	https://lore.kernel.org/r/18A5F3B379FB205B+20260615093559.3436095-1-raoxu@uniontech.com
a better one instead?

thanks,

greg k-h

      reply	other threads:[~2026-06-15 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2026061502-rants-doing-407e@gregkh>
2026-06-15 10:11 ` [PATCH] usbip: vudc: get vudc from endpoint in vep_dequeue Hu Xinyao
2026-06-15 10:33   ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026061508-product-pliable-13cd@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=huxinyao0011@gmail.com \
    --cc=i@zenithal.me \
    --cc=linux-usb@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=valentina.manea.m@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox