From: sashiko-bot@kernel.org
To: "Joas Antonio dos Santos" <joasantonio108@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH net v3] net: usb: smsc75xx: reject frames without a full header and FCS
Date: Thu, 12 Nov 2026 16:33:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-211501@kernel.org> (raw)
In-Reply-To: <20261112-smsc75xx-rx-fcs-v3-1-6ad0378d0384@gmail.com>
> From: Joas Antonio dos Santos <joasantonio108@gmail.com>
>
> smsc75xx_rx_fixup() takes the frame length from the RX command word
> supplied by the device and strips the FCS by using "size - 4" for the
> allocation, skb_put() and memcpy() of each frame that is not the last
> one in the URB. The length is only checked against an upper bound and
> against skb->len, so a device can report a length field of 2..5, which
> gives a size of 0..3 after RXW_PADDING is subtracted.
>
> size is a u32, so "size - 4" then wraps to 0xfffffffc..0xffffffff.
> __netdev_alloc_skb() adds NET_SKB_PAD to the unsigned length, which
> wraps back to a small value and the allocation succeeds. skb_put()
> adds the length to the 32-bit skb->tail and skb->len, which also wrap,
> so the skb_over_panic() check does not fire. The following memcpy()
> then tries to copy almost 4 GiB from the URB buffer into that small
> [ ... ]
> Found by LLM-assisted source review.
>
> Fixes: 1b3b2d9e772b ("net: usb: smsc75xx: stop lying about skb->truesize")
> Cc: stable@vger.kernel.org
> Signed-off-by: Joas Antonio dos Santos <joasantonio108@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-smsc75xx-rx-fcs-v3-1-6ad0378d0384@gmail.com?part=1
next prev parent reply other threads:[~2026-11-12 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 16:23 [PATCH net v3] net: usb: smsc75xx: reject frames without a full header and FCS Joas Antonio dos Santos via B4 Relay
2026-11-12 16:33 ` sashiko-bot [this message]
2026-11-12 16:42 ` Andrew Lunn
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-211501@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=joasantonio108@gmail.com \
--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