From: Simon Horman <horms@kernel.org>
To: Ziyi Guo <n7l8m4@u.northwestern.edu>
Cc: Petko Manolov <petkan@nucleusys.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: usb: pegasus: enable basic endpoint checking
Date: Mon, 23 Feb 2026 19:50:41 +0000 [thread overview]
Message-ID: <aZyvkd_k47RuraeS@horms.kernel.org> (raw)
In-Reply-To: <20260222050633.410165-1-n7l8m4@u.northwestern.edu>
On Sun, Feb 22, 2026 at 05:06:33AM +0000, Ziyi Guo wrote:
> pegasus_probe() fills URBs with hardcoded endpoint pipes without
> verifying the endpoint descriptors:
>
> - usb_rcvbulkpipe(dev, 1) for RX data
> - usb_sndbulkpipe(dev, 2) for TX data
> - usb_rcvintpipe(dev, 3) for status interrupts
>
> A malformed USB device can present these endpoints with transfer types
> that differ from what the driver assumes.
>
> Add a pegasus_usb_ep enum for endpoint numbers, replacing magic
> constants throughout. Add usb_check_bulk_endpoints() and
> usb_check_int_endpoints() calls before any resource allocation to
> verify endpoint types before use, rejecting devices with mismatched
> descriptors at probe time, and avoid triggering assertion.
>
> Similar fix to
> - commit 90b7f2961798 ("net: usb: rtl8150: enable basic endpoint checking")
> - commit 9e7021d2aeae ("net: usb: catc: enable basic endpoint checking")
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2026-02-23 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-22 5:06 [PATCH net] net: usb: pegasus: enable basic endpoint checking Ziyi Guo
2026-02-23 19:50 ` Simon Horman [this message]
2026-02-24 11:00 ` patchwork-bot+netdevbpf
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=aZyvkd_k47RuraeS@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=n7l8m4@u.northwestern.edu \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petkan@nucleusys.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.