Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Avi Weiss <thnkslprpt@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	toke@toke.dk
Subject: Re: [PATCH net v2] net: parse the eighth nested VLAN tag
Date: Sun, 1 Nov 2026 20:50:13 +0100	[thread overview]
Message-ID: <eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch> (raw)
In-Reply-To: <20261101145841.687905-2-thnkslprpt@gmail.com>

On Sun, Nov 01, 2026 at 04:58:42PM +0200, Avi Weiss wrote:
> __vlan_get_protocol_offset() starts with VLAN_MAX_DEPTH (8) but
> pre-decrements parse_depth before checking it. This rejects the eighth
> VLAN header and returns protocol 0 instead of the encapsulated EtherType.
> 
> When skb->mac_len is ETH_HLEN, the first iteration rereads the outer
> EtherType, so eight VLAN tags require nine iterations. Check the counter
> before decrementing it and allow one extra iteration in this case.
> 
> Fixes: 469aceddfa3e ("vlan: consolidate VLAN parsing code and limit max parsing depth")

Do you have a use case for 8 nested VLANs?

Have you seen people reporting issues? Does this bother anybody?

If not, i suggest you drop the Fixes: tag and post to net-next.

   Andrew

  parent reply	other threads:[~2026-11-01 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 14:58 [PATCH net v2] net: parse the eighth nested VLAN tag Avi Weiss
2026-11-01 15:04 ` netdev-bot+sinfo
2026-11-01 19:50 ` Andrew Lunn [this message]
2026-11-02 12:57   ` Avi

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=eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thnkslprpt@gmail.com \
    --cc=toke@toke.dk \
    /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