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