From: sashiko-bot@kernel.org
To: "Wei Jie Law" <law.wei.jie@gt.tech.gov.sg>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] net: usb: pegasus: check rx pkt_len against the received length
Date: Wed, 21 Oct 2026 02:08:49 +0000 [thread overview]
Message-ID: <sashiko-outbox-179685@kernel.org> (raw)
In-Reply-To: <20261021020310.34045-3-law.wei.jie@gt.tech.gov.sg>
> read_bulk_callback() takes the frame length from the device, from the
> receive header on the 0x8513 and from the trailing status bytes on the
> other chips, and only checks it against PEGASUS_MTU before passing that
> many bytes up the stack. In two cases the stack then uses bytes that the
> device did not send:
>
> - A device that sends a short transfer but claims a long frame gets the
> stale or uninitialized remainder of the receive skb delivered as
> packet data.
>
> - A device that claims a frame shorter than an Ethernet header gets
> past the check as well. eth_type_trans() takes pkt_type from h_dest
> and the protocol from h_proto without checking skb->len. If the
> transfer is also short, those come from bytes left in the skb by an
> earlier transfer, or from uninitialized memory.
> [ ... ]
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Wei Jie Law <law.wei.jie@gt.tech.gov.sg>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261021020310.34045-1-law.wei.jie@gt.tech.gov.sg?part=2
prev parent reply other threads:[~2026-10-21 2:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 2:03 [PATCH net v2 0/2] net: usb: pegasus: fix receive length handling Wei Jie Law
2026-10-21 2:03 ` [PATCH net v2 1/2] net: usb: pegasus: do not advance rx_skb->data on dropped frames Wei Jie Law
2026-10-21 2:08 ` sashiko-bot
2026-10-21 2:03 ` [PATCH net v2 2/2] net: usb: pegasus: check rx pkt_len against the received length Wei Jie Law
2026-10-21 2:08 ` sashiko-bot [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=sashiko-outbox-179685@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=law.wei.jie@gt.tech.gov.sg \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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