Article View: linux.kernel.netdev
Article #5516[PATCH nf v2] netfilter: bridge: use DEBUG_NET_WARN_ON_ONCE in nf_ct_bridge_refrag()
From: Laveesh Bansal
Date: Tue, 20 Oct 2026 13:29
Date: Tue, 20 Oct 2026 13:29
48 lines
11026 bytes
11026 bytes
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>
---
v2:
- Reduced to DEBUG_NET_WARN_ON_ONCE(), as suggested by Pablo. Handling the
vlan tag and the selftest will follow for nf-next.
- Dropped Reported-by, Closes and Cc: stable. This does not fix the syzbot
report, its config has CONFIG_DEBUG_NET=y.
- Only the commit that added the warning is listed in Fixes:.
v1: https://lore.kernel.org/r/20261020005403.38212-1-laveeshb@laveeshbansal.com
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.43.0
Technical Details
Message-ID:
<20261020132911.43696-1-laveeshb@laveeshbansal.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349315-linux-kernel-netdev=dewy.ruShow 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-349315-linux-kernel-netdev=dewy.ru From: laveeshb@laveeshbansal.com (Laveesh Bansal) Newsgroups: linux.kernel.netdev Subject: [PATCH nf v2] netfilter: bridge: use DEBUG_NET_WARN_ON_ONCE in nf_ct_bridge_refrag() Date: Tue, 20 Oct 2026 06:29:11 -0700 Organization: Usenet Network Message-ID: <20261020132911.43696-1-laveeshb@laveeshbansal.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3861774"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:YOnXbxpWC75UDeZNMZifXRzZ05M= sha256:mO5e5llQk3JhdIeUNwntrRaS6onGecWF/JLMYuG4Bj0= sha1:s5ZheP3tyuQlEW6OkZoEBj+gZig= sha256:TlXwyP9ZJ3AGAcmol/x7t9KHn2J4bqpZw3CHEvSOw50= 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 6B4DF110D0E; Tue, 20 Oct 2026 16:35:50 +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.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=laveeshbansal.com 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 JeUhAvkXqUDf; Tue, 20 Oct 2026 16:35:47 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349315-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=laveeshbansal.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A7C55110CDF; Tue, 20 Oct 2026 16:35:38 +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 1032D666E7; Tue, 20 Oct 2026 13:30:19 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792502991; b=oBdhLE7ryBUH6SFweutZse8c3kLL00M3qWsKN3ZfN2Am+UeEtcqVK8QM7A6u5dOn3bIM NerlTxG0fD6mrIsjTooqfTbX3t0VyyH8M/rYcq6kNxZ2dXZ21WQR605pLPdNmM/evbzKP 4QjAnJSkRqMpUtPEO/8pkJZjZ1rQMW7zGNApPcf+cH1sJYP2f7HCAbBORuOhbrLNUPScL U+QOPGHPU/VRhh3+wccuwJwsb3ctwSZcuoKWHffl7ZF2vRuC7nnHjA6pjBs+EXFwFZ1V/ iOTHLp0n+UwY8wI0QWqiZnYddbBd5YqH96wm6A6eN3fG1iF3EKcQJvqu0uiJJkGKF0g== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792502991; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding:X-ZohoMailClient; bh=faqcXlf3am5ayTseexfa5cqCZPxHait6Gq7hGss05/o=; b=p4c3YhPeLLEv7PVvCgZJijVEDAd3lPHZ9793u/cozrBALr97DjK06VQ9+If0JsU8WcBR D3GXmFPdY3gBchkEn0BoHM+SX96ucaFtW2K8PkfBsBiywnC1rIAX3wa0Kum9BB4UV3UUV JkJ1js1d4hHwulkd+N5iIG8hWZ2HKdOTVU34n983lO+3uOAYE+s2DPra8F7av6LBUuYnM A0+B3z20xMMLksMzPoRTyuwlHioZ5OU7d1VY8vHX3E1veRGUHmcAl7Hmbnp4JPdrDVVrO mTU5ar6gqujDfN/Of+VRj3BBLjIZXUQ8nzKLZW24L4sgDQ+3m0nf97q47ckt5jtP54Q== X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=laveeshbansal.com header.i=laveeshb@laveeshbansal.com header.a=rsa-sha256 header.s=zoho header.b="R2ntOH/z"; dmarc=none header.from=laveeshbansal.com; spf=pass smtp.mailfrom=laveeshbansal.com; 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 CF9C660A2637; Tue, 20 Oct 2026 13:29:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=laveeshbansal.com header.i=laveeshb@laveeshbansal.com header.a=rsa-sha256 header.s=zoho header.b=R2ntOH/z X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.15 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792502991; b=Q4kf7re5wHm8oWCcxmvpq3jnmcX01H0ihH2kKCQMd1kKvJsfIozwuQtqU9HkChnon/7d yYrw29xpOUpzk2tgdKar+05X3Pv2GixAPychK4ZuYuzm6HhDwnx7KFrQwR5j3SS2I1DHi CtTCZOtQfYdjv3IGqUvWx0Bfesr5ThoeZeFM8U3C1fbZkrqPo9RSBG3Lt8HGAkZDvLaIc QwAdeJoch2zYrQoSWc6RK5Fifo7ciCYIMyvjENaPtqOeRww/BvDjAeXYL4Azp2Hitko6J 8geDtRMdXQdCShEMCOFk68/TCXDgF8mXl4Ca8qLzIVm493hxhA2iYJJrbVdjMYxKLiA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792502991; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-ZohoMailClient; bh=faqcXlf3am5ayTseexfa5cqCZPxHait6Gq7hGss05/o=; b=u1YDx3wi/TJAybhpA4ffwn2g5W8vdF3Lf6xVkGj5aWvXQoVok8tHDNxTjKKJLVSshpay xqwP2ljgEOCjc1aJ7KyM9s495U7XhpiZuTAwWf/YfwVMeJLlyoygNA6YNI4CB56kYLP08 a4lnF26zIdAU6w6oa73wZXgBbGRhcbKd8WtkL43alKo6ymnrjmmaFiXxGNimKhQEMNxDO wk0X3o4CvME9REbCfkNQS0BnETvm3CDOtoUUIyJUXvlXkazgbyHBFyZUaixChpsa1eIGi njyk0Zy0dtujjO1Y7DySML61BT9zJiU3sXvlKqlFNmCIPi/79wdAAPYees/CNXv9UBw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=laveeshbansal.com; spf=pass smtp.mailfrom=laveeshbansal.com; dkim=pass header.d=laveeshbansal.com header.i=laveeshb@laveeshbansal.com header.a=rsa-sha256 header.s=zoho header.b="R2ntOH/z"; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.15 X-Received: from sender5-op-o15.zoho.com (sender5-op-o15.zoho.com [165.173.182.15]) (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 8546760A2626; Tue, 20 Oct 2026 13:29:50 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8546760A2626 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=laveeshbansal.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=laveeshbansal.com X-ARC-Seal: i=1; a=rsa-sha256; t=1792502973; cv=none; d=zohomail.com; s=zohoarc; b=EuD8bntbTMkMeHimUzqDTvJkp5gf2DKwzcTvVhBYZRbLdSFKytmJR1eJAFbIhoWbf1Tf7+gAjOjBPp/L2+eOihyXKpqlMe4JmcDn6lWy2Ajj9DQLaApTgrVzO7Nod2YCobHoqu2HRm54UbAxE9L+qHReVfOE3+2Jfx6UaqEleP0= X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792502973; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=faqcXlf3am5ayTseexfa5cqCZPxHait6Gq7hGss05/o=; b=E8c7QAJxpNL6PofIIb4S7ospQ8SfgCZ7q/Jahia6lK97gqRLA6q7/tfY3GrnzRI6XIVs5YdwWSnrLMNALcNJcKdA0Lkvf5tU6WJAE9e0PpAqAWUpw7fUSrfyUu1CoaPhhCA3GQUni0mBVxwsLN2d/Z7FxZTvxwnGSimQZuMXKKY= X-ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=laveeshbansal.com; spf=pass smtp.mailfrom=laveeshb@laveeshbansal.com; dmarc=pass header.from=<laveeshb@laveeshbansal.com> X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1792502973; s=zoho; d=laveeshbansal.com; i=laveeshb@laveeshbansal.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=faqcXlf3am5ayTseexfa5cqCZPxHait6Gq7hGss05/o=; b=R2ntOH/z5zrP4NH6DRLJy731eTb0c/6yaJH66gxC0lYeKUy7fmHPgdS3xOV28yaI DNunMDYmzgh3Iirhx6vnJa9w2Lkt7SYTd0Qn3DlJUaC7WJLpdCTTcEns3oMnI7wIYO4 UsUo1etcDjWFji08Hl2zhl8IUd4hzRIqexcSE+fI= X-Received: by smtp.zohomail.com with SMTPS id 1792502972236450.06009507923477; Tue, 20 Oct 2026 06:29:32 -0700 (PDT) X-Cc: Nikolay Aleksandrov <razor@blackwall.org>, Ido Schimmel <idosch@nvidia.com>, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux.dev, netdev@vger.kernel.org X-Mailer: git-send-email 2.54.0 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-ZohoMailClient: External