From: Sergey Shtylyov <sergei.shtylyov@gmail.com>
To: "Peter Chen (CIX)" <peter.chen@kernel.org>,
Yongchao Wu <yongchao.wu@autochips.com>
Cc: Pawel Laszczak <pawell@cadence.com>,
Roger Quadros <rogerq@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: cdns3: gadget: fix NULL pointer dereference in ep_queue
Date: Mon, 30 Mar 2026 16:30:25 +0300 [thread overview]
Message-ID: <e370860b-4ad4-485e-8ad6-30fea2241547@gmail.com> (raw)
In-Reply-To: <acpAmimXvxD+WXA1@nchen-desktop>
On 3/30/26 12:21 PM, Peter Chen (CIX) wrote:
[...]
>> When the gadget endpoint is disabled or not yet configured, the ep->desc
>> pointer can be NULL. This leads to a NULL pointer dereference when
>> __cdns3_gadget_ep_queue() is called, causing a kernel crash.
>>
>> Add a check to return -ESHUTDOWN if ep->desc is NULL, which is the
>> standard return code for unconfigured endpoints.
>>
>> This prevents potential crashes when ep_queue is called on endpoints
>> that are not ready.
>>
>> Signed-off-by: Yongchao Wu <yongchao.wu@autochips.com>
>
> Add Fixed-by tag and Cc to stable tree please, others:
I think you meant the Fixes tag. :-)
[...]
MBR, Sergey
prev parent reply other threads:[~2026-03-30 13:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 14:38 [PATCH] usb: cdns3: gadget: fix NULL pointer dereference in ep_queue yongchao.wu
2026-03-28 16:03 ` Greg Kroah-Hartman
2026-03-29 1:34 ` Yongchao Wu
2026-03-30 9:21 ` Peter Chen (CIX)
2026-03-30 13:30 ` Sergey Shtylyov [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=e370860b-4ad4-485e-8ad6-30fea2241547@gmail.com \
--to=sergei.shtylyov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=peter.chen@kernel.org \
--cc=rogerq@kernel.org \
--cc=yongchao.wu@autochips.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