Article View: linux.kernel.netdev
Article #9345Re: [PATCH net v2] net: parse the eighth nested VLAN tag
From: Andrew Lunn
Date: Sun, 01 Nov 2026 19:50
Date: Sun, 01 Nov 2026 19:50
19 lines
8858 bytes
8858 bytes
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
Technical Details
Message-ID:
<eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354325-linux-kernel-netdev=dewy.ruReferences:
<20261101145841.687905-2-thnkslprpt@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354325-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] net: parse the eighth nested VLAN tag Date: Sun, 1 Nov 2026 20:50:13 +0100 Organization: Usenet Network Message-ID: <eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch> References: <20261101145841.687905-2-thnkslprpt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2755635"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:/YK4Y5V3R9FB7hlq7MsrS42/CYk= sha256:+WRyDM6ubOaBGq3zxUZeWeEKQzoE+H9/9k3aE7fFSI0= sha1:jJl/6ukz6NpxYvi9E0hNlOveL1E= sha256:z7rkTYAMv2FnOZt18557Qhwkl1GQ7aksR2SVGhnu9Lg= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id E310E112389; Sun, 1 Nov 2026 22:50:57 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yCUpiJo5vUex; Sun, 1 Nov 2026 22:50:55 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-354325-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 90EAC112345; Sun, 1 Nov 2026 22:50:46 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 9F23929999; Sun, 1 Nov 2026 19:50:18 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793562617; b=m3gccoi18cCd3b2GSbFraYrB5VWY19sgC5nefbSJuEYesQ0PU3jQF2fupCQlFKILwMGv 26yF3/d02j/lXF6sN+D4CjBS73iBoFHllZrXMkdmFxdcBb39xmWwYnYkRHtFS45hl2Ctm mfJ2YOwkmg3Qh5LfXT9eTUkq7A8DK7g6WMGqTxhxie3R5hKb3xdh1Ik06Bx5VVZtaKVBE eNupNKRRyNu+W1WNWw+Zhe67C/VRf41dvetwnqHHqfI9+U+LEAIZKcJaTFgpuA2CUsoOG Vzw7DSlQG3xlWInUdpxAK+6NKiSnPZbDykvXWPd2cUFGk7R+jzCMvYrd5T+H34DXjnw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793562617; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=yH5xbsjFG2Q93/74WpO9a6oG0kfWVF9R1es3wue38pQ=; b=ot3DRppAgGzCQ+lBDDvj7vAm6MFV3b8U9ov/+i63d+gXNDu5vwxtAsMMIIUPYN3IoYPx L52PU0mmfHI5vYH+u2i8DidKIgLgZsRhrVjk+4OH14T8Y5J3Z72gSjWg/v7SFYjpmlRiy DsxmdBo9gwRv2JhZee2nHul/FKOYwBOfYmoFEEC3p5xAEJxdymTWKzARgSaL5YIH3cJmT pvXg9Z1iLGBgH3LpxpjxUAUszXf5VqoyuGaVqRMbEL4tNzdCykbRg+rz+x1RcugsX87gs 9JpBXWx1/gT3oOUssljErY9UAF6WzOE1SWNirEx8CpiCDEcUXDDeIsRCOPbLPjC4d+A== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=gHrJNT6p; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92254606A337; Sun, 1 Nov 2026 19:50:17 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=gHrJNT6p X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793562616; b=ySLpIskojzKlmFvXCq3OCVrWeqxOKJLiODUmv0lHkBnYNj+HUVa1h2EIcqOLTcMLY3RT 7/1eWyZTebFhtgVZxJ9JCztebS73ZLHY7Zbh23xDdCE4/g6OWzOX8Pn5+6OuEPeUV6vkX K57phu5PFzzEm0g//8xWvcJUwz4wyxnMz/RTzStX6AHxVxhAWdBkcohwgnYAGrrBbG1gR 1NTZmzomkmR33G0IR2uXk8bii4ZRKNnoKRuhnrdQ1o1bLno15f6kGXkOnouuWOlYInE+J zs7OGYk1B06aJBVGTAOvO1sJVP/DSe6+ERYzPFw0T5wNlo8/HcmndYAUw0BovTJgZag== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793562616; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=yH5xbsjFG2Q93/74WpO9a6oG0kfWVF9R1es3wue38pQ=; b=Tgvh2PLGEhg9IGvSVZvNhdwt8cp1oLsnq5mR+4fKlbAwAchJ/zffE0O6RjXAfMQKDCIp j8rjQgOnU1Dek2uU7x5s5bIIN2sf5tLII8ocTd4gP08fVmsE2CdDjpCZbFTjWzxzGKx0s xrUHwHdqcW4dkOFwYYwZF9K/F5nxi9Ghn7jpXGNAebstpPmoeB0QALfyZU7hd9HYALSqF NYMeDFfVHjG60vBPcaDC7mjh8Y+CY6s5XbVclqn6kPS4ctYK2RmlxusBChjBuPG/ZZD1H 3WIOFL7xFHDbqFSdRsjWyHurwgp1yZW0s9Qa7J3HZZSsvrDSzbRUWMV3MtppwO7e2OA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=gHrJNT6p; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 160D360A2600 for <netdev@vger.kernel.org>; Sun, 1 Nov 2026 19:50:15 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 160D360A2600 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=yH5xbsjFG2Q93/74WpO9a6oG0kfWVF9R1es3wue38pQ=; b=gHrJNT6pSykIjEVfH75dhX2Wxi uSrCoqgNq209i6M5Xbrxt+X18Y6TpA9tbImGJgDfKIquWUbzEClA2iaKW+QUp9ysJL4d71V3uzg04 O7EQ85GzKjoj+a5KwWIEIwZQYXIjpX++Ajmd+FcTZpxdGCrWWCCLGZkjQn4gvFZhgC54=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xNbZF-00DfWP-BV; Sun, 01 Nov 2026 20:50:13 +0100 X-Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, toke@toke.dk X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261101145841.687905-2-thnkslprpt@gmail.com>