Thread (4 messages) 4 messages, 3 authors, 3h ago

Re: [PATCH net v2] net: parse the eighth nested VLAN tag

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-11-01 19:50:15

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help