From: Shuah Khan <skhan@linuxfoundation.org>
To: tjdqudcks0424@naver.com,
Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>
Cc: linux-usb@vger.kernel.org, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] usbip: vudc: reject submits after endpoint state changes
Date: Mon, 19 Oct 2026 13:25:07 -0600 [thread overview]
Message-ID: <bca330ed-9594-4b0c-a15a-49d694d72cfa@linuxfoundation.org> (raw)
In-Reply-To: <20261008183753.10231-1-tjdqudcks0424@naver.com>
On 10/8/26 12:37, tjdqudcks0424@naver.com wrote:
> From: Sung Byeongchan <tjdqudcks0424@naver.com>
>
> v_recv_cmd_submit() looks up an endpoint under udc->lock, but drops the
> lock while it allocates the URB and receives the payload. A gadget
> configuration change can disable or disable and re-enable that endpoint
> before the URB is queued. The submit then carries stale endpoint state
> into asynchronous VUDC processing. The confirmed failure dereferences a
> NULL urb->dev while logging a completion error and panics the kernel.
>
> Give each VUDC endpoint a generation that changes on enable and disable.
> Snapshot the generation and immutable parsing fields during lookup, then
> recheck descriptor presence and generation under udc->lock immediately
> before adding the URB to urb_queue. Reject a stale request with
> -ESHUTDOWN.
>
> On a KASAN build at ff47652a4b66c067c765a7ad464d930b5a9367cc,
> normal enabled-endpoint, serialized-disable, and disable/re-enable
> stale-submit cases each passed three independent fresh-boot runs after the
> fix. The stale case returned -ESHUTDOWN without a sanitizer report, and a
> following EP0 request succeeded after bounded reconnection. The touched
> source is unchanged at 0c2669a9f4a1d607e7591ae50ccf3c432a0aff08, where
> the patch also applies and builds cleanly.
>
> The demonstrated impact is kernel/service denial of service. No controlled
> write, information disclosure, RCE, or LPE was demonstrated. The source
> reproducer and complete logs are available on request and are not included
> in this public report.
>
> OpenAI Codex assisted source inspection, test design, patch drafting, and
> evidence organization.
Please explain how this problem can be reproduced and why this fix
masese sense?
thanks,
-- Shuah
next prev parent reply other threads:[~2026-10-19 19:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 18:37 [PATCH] usbip: vudc: reject submits after endpoint state changes tjdqudcks0424
2026-10-08 18:50 ` sashiko-bot
2026-10-19 19:25 ` Shuah Khan [this message]
2026-10-20 18:13 ` 성병찬
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=bca330ed-9594-4b0c-a15a-49d694d72cfa@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=tjdqudcks0424@naver.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.