From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>, justin.chen@broadcom.com
Cc: alcooperx@gmail.com, bcm-kernel-feedback-list@broadcom.com,
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: bdc: validate status-report endpoint indices
Date: Mon, 23 Mar 2026 12:20:17 -0700 [thread overview]
Message-ID: <89a5cf0e-444a-42d3-b7cb-49ce2560995c@broadcom.com> (raw)
In-Reply-To: <20260323121730.75245-1-pengpeng@iscas.ac.cn>
On 3/23/26 05:17, Pengpeng Hou wrote:
> bdc_sr_xsf() decodes a 5-bit endpoint number from the hardware status
> report and uses it to index bdc->bdc_ep_array[] directly. The array is
> only allocated to bdc->num_eps for the current controller instance, so a
> status report can carry an endpoint number that still fits the 5-bit
> field but does not fit the runtime-sized endpoint table.
>
> Reject status reports whose endpoint number is outside bdc->num_eps
> before indexing the endpoint array.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
next prev parent reply other threads:[~2026-03-23 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 12:17 [PATCH] usb: gadget: bdc: validate status-report endpoint indices Pengpeng Hou
2026-03-23 19:20 ` Florian Fainelli [this message]
2026-03-24 18:45 ` Justin Chen
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=89a5cf0e-444a-42d3-b7cb-49ce2560995c@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=justin.chen@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pengpeng@iscas.ac.cn \
/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