🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11721

[PATCH net 07/12] netfilter: bridge: use DEBUG_NET_WARN_ON_ONCE in nf_ct_bridge_refrag()

#11721
From: Pablo Neira Ayuso
Date: Thu, 05 Nov 2026 12:45
42 lines
9881 bytes
From: Laveesh Bansal <laveeshb@laveeshbansal.com>

nf_ct_bridge_refrag() warns when skb->protocol is neither IPv4 nor IPv6.
A vlan filtering bridge can get there with a vlan ethertype: if the
protocol of the tag of a frame differs from the vlan_protocol of the
bridge, br_allowed_ingress() moves the tag back into the packet after
NF_BR_PRE_ROUTING, where bridge conntrack has already defragmented it.

Anyone who can send fragments into a port of such a bridge can trigger the
warning, which takes the machine down with panic_on_warn. The packet is
dropped either way, so only warn on kernels built with CONFIG_DEBUG_NET.

This only avoids the warning. Such fragmented packets are still dropped.
syzbot reported the warning. It keeps triggering on CONFIG_DEBUG_NET
kernels until the vlan tag is handled, which is left for a follow-up:

  https://syzkaller.appspot.com/bug?extid=a8ba738fe2db6b4bb27f

Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system")
Assisted-by: LLM
Signed-off-by: Laveesh Bansal <laveeshb@laveeshbansal.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/bridge/netfilter/nf_conntrack_bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/netfilter/nf_conntrack_bridge.c b/net/bridge/netfilter/nf_conntrack_bridge.c
index b5444335b86f..8c83dc05114b 100644
--- a/net/bridge/netfilter/nf_conntrack_bridge.c
+++ b/net/bridge/netfilter/nf_conntrack_bridge.c
@@ -358,7 +358,7 @@ nf_ct_bridge_refrag(struct sk_buff *skb, const struct nf_hook_state *state,
 		nf_br_ip6_fragment(state->net, state->sk, skb, &data, output);
 		break;
 	default:
-		WARN_ON_ONCE(1);
+		DEBUG_NET_WARN_ON_ONCE(1);
 		return NF_DROP;
 	}
 
-- 
2.47.3
Technical Details
Message-ID: <20261105124536.1009301-8-pablo@netfilter.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357332-linux-kernel-netdev=dewy.ru
References: <20261105124536.1009301-1-pablo@netfilter.org>

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-357332-linux-kernel-netdev=dewy.ru
From: pablo@netfilter.org (Pablo Neira Ayuso)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 07/12] netfilter: bridge: use DEBUG_NET_WARN_ON_ONCE in nf_ct_bridge_refrag()
Date: Thu,  5 Nov 2026 13:45:31 +0100
Organization: Usenet Network
Message-ID: <20261105124536.1009301-8-pablo@netfilter.org>
References: <20261105124536.1009301-1-pablo@netfilter.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3646446"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IQKz39h+9wYIKwEc+F7V37+ARP4= sha256:afXrwnM8nnQmKfchUGQvvK12YPh1qQa6J9BopZ8JLfM=
	sha1:ThnWcqB43uGZqtFXG+KZVQ3Lu7c= sha256:9v9Mm01cOZ3tx5bhiv+b3IYYHLfMwd0TXNehP+0fYzs=
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 91431112F34; Thu,  5 Nov 2026 16:40:59 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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.249,
	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 (2048-bit key)
	header.d=netfilter.org
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 DE9gN2hy32Jx;
	Thu,  5 Nov 2026 16:40:52 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-357332-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=netfilter.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 105E5112FAB; Thu,  5 Nov 2026 16:40:42 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id B8EA438DD1; Thu,  5 Nov 2026 12:46:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1793882757;
	b=xrCDY19Cx2Q5t/bXA2jefm69MuQ2WbUAbG9NSwN6fpp+Q2t+ebbjntV29xaB1h92TEeR
	 0KZqL9BoCBU60r56vYHsWPjZrmzHHxY5jCEpFiztiS+xO7OEpUVuw8AZnetAJm9/iczP3
	 mMJpGtAPECIX+yeENi3wLXT5eANssFpWeoem7g2y49XAVJUOjHPkuQ8h75s4mzdPYoWXO
	 ohr6JvOBE+2l4A+oHB0yKZCLEIljwH6Slt4TH2G9Cs3Wj7k7ZB6R7a0zR/Pde4+R9OUUr
	 tRSdAWXgpH87fYYrDHMtMXTuEZvnyfMHSqyvXzmIZjH1D2LSIVBUqy4u+VCt/3wpUqQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793882757;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=bRwI7uwCHVVt6T7DMLyhA8VEKQ0FrttDo22yhPZt5LE=;
	b=KrlgDKVdG87ECYTWRqPDEM/tuRgGCNb1xBt8Bqn7kJh0xnOa7pOiio/TOTAQlRc1c1Qy
	 YzOLSepbgWj748zQ2lLQYLOLDVhXOL33ixBsrzcAEfHZGrnQW/6jmuzh2zMLwQe0wE12V
	 1ggVPJqtwQ9u6huTSnJkFAv8lNQ/g6HQBa4GTpsUmCX7CqGaZNG5fFwbHzc+L2FlsVtBw
	 2cyRFz0tKAy2X3HJ01Q6syV7LUXM0gefhxynZaKQwgKhmf3TNfKr1s8ibv/ioCKkRfiDt
	 vAy7UDLuTtly9uKlMLXCVsh5N+rZrJi2LllWLzZ7oi2SD8DRLCz5aAHmiehq1q7EywA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=B9G31my3;
	dmarc=none header.from=netfilter.org;
	spf=pass smtp.mailfrom=netfilter.org;
	arc=fail 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 6B388606EEB0;
	Thu,  5 Nov 2026 12:45:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=B9G31my3
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.70.190.124
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793882751;
	b=dz0ejqY+OOVvX/uBuLDs7GDZMFvWLo16fIIJe/zv8eYoWDjc191WisVQJdcngml7X7Mi
	 R+lxRuWl0ghW/rdGNUVLYsuXK82IXeayDUa2V1uqwr7Z6oH9EthULGGN6pRL5yNnBvMnj
	 iUiZbDDDvOZFC/H+ZMCgaC2AIOD7FWrrarqiyJoPreLKbRdBK8WFsluQqIZvdCynNRnWX
	 JmRy0OL5IvKOSr7/oKfcox4YyM4mfTL8/3pU52ox89WgWy2SCpgg9qu0GTlKrAaiTYH/c
	 yqF2fbEoonFKUmkrM139BQLVDnVqZQWHR+T0+5CnjIi3P0FRWzcDQk/2tuiwYU9dx5Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793882751;
	h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding:X-Spam-Status:X-Spam-Checker-Version;
	bh=bRwI7uwCHVVt6T7DMLyhA8VEKQ0FrttDo22yhPZt5LE=;
	b=wv6cpaC9k+V9VZCNWwLa0+X1q9XgWrMOLfEXC9FhvAojzbVldq529NC0OUUzD1FHxbv5
	 d/oOWnJ7ImEelnVwJWXczwtJLCsdm30WolbnGrhqCJTKmvA73BQ0GuW+yK6UsDnNU96tO
	 2W8TL8olFv71xFU0TmqGt+4OGa6Rfd/RGmVJsrgt/rxT+s5OJjWTuuUKGmD2TV3UABhvd
	 xgbxFz+qf1egsaml6REaRJEpN03TMB8FA+euI69tfId9rx7MtBYoI0nxp1zrIg7YiHB/8
	 xxFAg8y5J4ilswnEM8TruZOhiAUe/V0/S3mnhJYVpea339e1HjvwT+ipyDC0KyXNsfQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=netfilter.org;
	spf=pass smtp.mailfrom=netfilter.org;
	dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=B9G31my3;
	arc=none smtp.remote-ip=217.70.190.124
X-Received: from mail.netfilter.org (mail.netfilter.org [217.70.190.124])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18AE5606D835;
	Thu,  5 Nov 2026 12:45:50 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 18AE5606D835
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;
	s=2025; t=1793882749;
	bh=bRwI7uwCHVVt6T7DMLyhA8VEKQ0FrttDo22yhPZt5LE=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=B9G31my3uxJYAv4FSiDRTuNohUuHu7s+anXoDouGBTesTCaggrnQ4Tz6FDVAhRNVD
	 1TDEUtmtMCRt/H+oSCdQ33nTSNUuQTFy2Ta9XvqOkLDiq/pbsVYtN6S0MAL1xWfInX
	 NN3B8l+JarZm/JAqH62LqI5bg42uXHAEBA+7GOUHLUpk/4SSTCsBqYA9JF0c/TfNuo
	 4gwHGdquOu3J8ev2e4zWhekOcPOHjQR68nBKa+Iv7iDtT77XV/i+fxAQ54twxcUc4+
	 Pd6cMNhvbFPhUPCkURD+xvlcG/j4Ur3DpgeZcuyRKOLAFMOn9vz47WtMW4gwGMtIrI
	 Ov1DhJ5EmkNag==
X-Received: from localhost.localdomain (mail-agni [217.70.190.124])
	by mail.netfilter.org (Postfix) with ESMTPSA id E1C0B60097;
	Thu,  5 Nov 2026 13:45:48 +0100 (CET)
X-Cc: davem@davemloft.net,
	netdev@vger.kernel.org,
	kuba@kernel.org,
	pabeni@redhat.com,
	edumazet@kernel.org,
	horms@kernel.org,
	fw@strlen.de,
	ja@ssi.bg
X-Mailer: git-send-email 2.47.3
X-In-Reply-To: <20261105124536.1009301-1-pablo@netfilter.org>
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