public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Luke Howard <lukeh@padl.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Ryan Wilkins <Ryan.Wilkins@telosalliance.com>
Subject: Re: [PATCH v2 net-next] net: dsa: validate source trunk against lags_len
Date: Thu, 31 Jul 2025 14:44:14 +0300	[thread overview]
Message-ID: <20250731114414.2ofpam6rt3krmjp4@skbuf> (raw)
In-Reply-To: <5E37B372-015B-4B19-92E9-7212C33D59C5@padl.com>

On Thu, Jul 31, 2025 at 07:56:37PM +1000, Luke Howard wrote:
> A DSA frame with an invalid source trunk ID could cause an out-of-bounds
> read access of dst->lags.
> 
> Add a check to dsa_lag_by_id() to validate the LAG ID is not zero, and is
> less than or equal to dst->lags_len. (The LAG ID is derived by adding one
> to the source trunk ID.)
> 
> Note: this is in the fast path for any frames within a trunk.
> 
> Fixes: 5b60dadb71db ("net: dsa: tag_dsa: Support reception of packets from LAG devices")
> Signed-off-by: Luke Howard <lukeh@padl.com>
> ---

1. You need to carry over previous review tags (like from Dawid Osuchowski)
when you send new patch versions.

2. As mentioned in the comments to the previous change, you can submit
patches with a Fixes tag to 'net-next' only if the fixed commit is
exclusively present in net-next. Not the case here.

3. The discussion on v1 is still ongoing, you shouldn't have posted v2
within one minute of replying to the v1 comments. Further changes will
have to be made at least to the commit message of this patch, let's
discuss them back on v1 after we have more data.

pw-bot: changes-requested

  reply	other threads:[~2025-07-31 11:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31  5:35 [PATCH net] net: dsa: validate source trunk against lags_len Luke Howard
2025-07-31  8:23 ` Dawid Osuchowski
2025-07-31  9:07 ` Vladimir Oltean
2025-07-31  9:55   ` Luke Howard
2025-07-31 11:37     ` Vladimir Oltean
     [not found]       ` <C867697B-7F5B-4500-8098-9C44630D7930@padl.com>
     [not found]         ` <CAD3ieB36VnKAQPXUGbnRdWYFThf-VfLkhZTRfb9=ddndZEW3=A@mail.gmail.com>
2025-08-05  7:42           ` Vladimir Oltean
2025-08-05 11:52             ` Andrew Lunn
2025-08-06  1:28               ` Luke Howard
2025-07-31  9:56 ` [PATCH v2 net-next] " Luke Howard
2025-07-31 11:44   ` Vladimir Oltean [this message]
2025-07-31 13:07   ` 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=20250731114414.2ofpam6rt3krmjp4@skbuf \
    --to=olteanv@gmail.com \
    --cc=Ryan.Wilkins@telosalliance.com \
    --cc=andrew@lunn.ch \
    --cc=lukeh@padl.com \
    --cc=netdev@vger.kernel.org \
    /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