From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Aamir Ahmed <elb12345@hotmail.co.uk>
Cc: 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>,
Lucas Stach <dev@lynxeye.de>,
Deepanshu Kartikey <kartikey406@gmail.com>,
Ethan Nelson-Moore <enelsonmoore@gmail.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: usb: asix: reject a truncated Data header in rx_fixup
Date: Tue, 15 Sep 2026 10:35:59 +0300 [thread overview]
Message-ID: <aqj1X8aIEs5SqEAK@ashevche-desk.local> (raw)
In-Reply-To: <AS8P251MB000193C798F98A11C73C3E9DC8BB2@AS8P251MB0001.EURP251.PROD.OUTLOOK.COM>
On Mon, Sep 14, 2026 at 10:23:45PM +0100, Aamir Ahmed wrote:
> asix_rx_fixup_internal() runs its parsing loop while two bytes remain,
> but the branch that starts a new frame reads a four-byte Data header.
> Only a two-byte tail is special-cased, via split_head, so a three-byte
> tail reaches that read and leaves offset at skb->len + 1. The clamp
> below it then takes the unsigned difference skb->len - offset, which
> wraps, so copy_length becomes the full length the device asked for:
> skb_put_data() copies from one byte past the received data and
> usbnet_skb_return() passes the frame to the stack, before the trailing
> skb->len != offset check can report it.
>
> Reject a Data header that does not fit and reset the parser state, as
> the other malformed-header paths do.
>
> Only a device emitting an odd skb->len can get there - every asix
> rx_urb_size is even and offset always advances by an even number of
> bytes - so this is net-next material rather than a stable backport.
>
> Fixes: 8b5b6f5413e9 ("net: asix: handle packets crossing URB boundaries")
If it's a fix, why net-next and not net in the Subject?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-15 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 21:23 Aamir Ahmed
2026-09-15 7:35 ` Andy Shevchenko [this message]
2026-09-15 8:59 ` Aamir Ahmed
2026-09-17 0:24 netdev-bot+sashiko
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=aqj1X8aIEs5SqEAK@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dev@lynxeye.de \
--cc=edumazet@google.com \
--cc=elb12345@hotmail.co.uk \
--cc=enelsonmoore@gmail.com \
--cc=kartikey406@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®