🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10451

[PATCH nf-next] netfilter: flowtable: do not scrub as crossing netns

#10451
From: Pablo Neira Ayuso
Date: Tue, 03 Nov 2026 14:02
40 lines
9570 bytes
IPIP tunneling support does not result in crossing a netns, therefore,
adopt the more conservative variant of skb_scrub_packet() by specifying
!xnet, keep the existing skb mark in place.

Fixes: d30301ba4b07 ("netfilter: flowtable: Add IPIP tx sw acceleration")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
@Lorenzo: Do you remember the reason why this is scrubbing as crossing netns?
There is a LLM report that is flagging this as an issue when interacting with
other subsystem, eg. packets was marked. At least in the tunnel driver I can
see this is conditional.

 net/netfilter/nf_flow_table_ip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c
index 19cafae748ab..78bba416dd5b 100644
--- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c
@@ -630,7 +630,7 @@ static int nf_flow_tunnel_ip_push(struct net *net, struct sk_buff *skb,
 	if (err)
 		return err;
 
-	skb_scrub_packet(skb, true);
+	skb_scrub_packet(skb, false);
 	skb_clear_hash_if_not_l4(skb);
 
 	/* Push down and install the IP header. */
@@ -699,7 +699,7 @@ static int nf_flow_tunnel_ip6_push(struct net *net, struct sk_buff *skb,
 	if (err)
 		return err;
 
-	skb_scrub_packet(skb, true);
+	skb_scrub_packet(skb, false);
 	mtu = dst_mtu(dst) - sizeof(*ip6h);
 	mtu = max(mtu, IPV6_MIN_MTU);
 	skb_dst_update_pmtu_no_confirm(skb, mtu);
-- 
2.47.3
Technical Details
Message-ID: <20261103140308.591690-2-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-355681-linux-kernel-netdev=dewy.ru
References: <20261103140308.591690-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-355681-linux-kernel-netdev=dewy.ru
From: pablo@netfilter.org (Pablo Neira Ayuso)
Newsgroups: linux.kernel.netdev
Subject: [PATCH nf-next] netfilter: flowtable: do not scrub as crossing netns
Date: Tue,  3 Nov 2026 15:02:53 +0100
Organization: Usenet Network
Message-ID: <20261103140308.591690-2-pablo@netfilter.org>
References: <20261103140308.591690-1-pablo@netfilter.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3188411"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:E1kZuPXDSISvryZoghdT+UWxk+k= sha256:c4uFUR1zwGhoIMRbWcPBYeusiOuSBRvMhbCDcgz5yQk=
	sha1:G3qZ1yFDQ6rGaPrUpzahywVkg38= sha256:sgwBpLCX7SsOZ4KlmfWMz4Mn1mf17qiFpcvu6NoMqO8=
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 C14051128F8; Tue,  3 Nov 2026 17:38:46 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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] 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 IFtvgb0JUY5C;
	Tue,  3 Nov 2026 17:38:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-355681-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id DC7D41128F2; Tue,  3 Nov 2026 17:38:35 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 465FE47E07; Tue,  3 Nov 2026 14:05:30 +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=1793714603;
	b=haurm13Xq/fwn+qQfN4hQVKcoF/KN0UTiM+9HE2+F9pq0w2KpqQ49v2kIotfDfVMYrLD
	 J+Sj5geyn4oAOAC7PRIFXylcK6epE6EIz2cj7BOed3bGWRBou3Ku8xxhjU0PZOCnd8iMe
	 S8N880BsGvmJ9iu4ZnDZSvaJNXfhowL9KaDjpaywXFEBnDWj3vp7u1EfBu/XvpTzlEATl
	 L8yUAOk/Ql+2IRZn9gv7SCok6POUegqqzc5KnbCoI9LXm7GJkRGQfZBV14kiF8Y7M1hF8
	 D9raJGKr+VkyKZr4drxc6xIqmwme7clqPUnubh9Mibpj6cl8O7VVivU2pv7BV8nff9w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793714603;
	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=fYx82PF450mtCVkFsMXGvGkBMko96dPNczM0QIVlTyM=;
	b=v0ru9/knZWTwRV/AzzNZSXHvX61mp0u3j6aXSZ/GP8XTHv/Iz28wUVq3ZAkR3BjXLLGX
	 BO9v2zTVaTJXpR4TF0bJxPlMrgudPUbfHKcnd8WLqkS8d8QCdWn0yPf8QTX7R1z1I/Sm6
	 4XhS+7zI4VDBq9imjkAknZUtcWW4Sp2a7imNqF9iBGICAeiMPNjU3AqRR8L/Bd20j46wd
	 Idsr/BoSMBB9W20TpeSNFakj7i3W1QgeDN3MJ5p91wIaQ9wIsoIYZMoAQTSnorp7Cq7JO
	 0WglKHqqAymQnrYgvawiLqqL5Gd/qniuHuq+L/ouEB8IDwyiJAkCGJR7v4ih22mRK9Q==
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=O5PotDhX;
	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 7808C6082BDB;
	Tue,  3 Nov 2026 14:03:23 +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=O5PotDhX
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=1793714597;
	b=qh7wJEkRGt0A1pJ5o6xCzW3e2JKAl3LFUKtlSY4grRzquZoGzBTnoTI/Q3vUvoF5t6+e
	 I3AlBtGvdiZbXd3AY8UE9Ozib6uZjMp3hrLHVxPL7yl9s4oH2UVnhSbp+XbWvwDrA3/SJ
	 VhzAKXFVHuInuOjL/IjB1nuqo/6MSb0NYWGwNEGCuYGPGulBKjs6SWWwDexlMtL8Q7aKb
	 giDFt31N/N5RWQzDwwOzDbiFSgm0Zskgu4daK3vYjDX/SEJCy0aNlUkhQqUyFPRiKvb19
	 ufO5QAvAOP58Lqi+qpGzBxPzQouB4BmAEswtMYbCUtx2UZD/RyM3NfIiC6i5lGc4CDg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793714597;
	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=fYx82PF450mtCVkFsMXGvGkBMko96dPNczM0QIVlTyM=;
	b=fgLvhvlXA6TuvYM+S+OhcwzqlCiwDwUmNHaMAWYj0AyrILFAPd4ANVvdpHSJynOlJvqE
	 cu0uV5Mc9WHxL1l4Bg2V2NPAArnZwXgqX03iSSlAzZCipBFeWcxmlGibje7ZtYWOhZH2F
	 c8uvDFgSmRglyTUmi2oERtWa6FV+RaEybViiTV7/XqRWndhkIz9rkT52lRAK7zUY04Ufj
	 mYYjRg2+xqv42ln3UkJmGVtJxas4LUjMo3lMcCEFYZiaz/IW6hQFPS8rw0/NK0zSlfPmV
	 0OS4g6I/S5EgGm/MlY/NgmuKnyxYwD6H0L7JzHleUBwKGspZE4Vu+SlA+hAGiarZuKw==
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=O5PotDhX;
	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 28231606D820;
	Tue,  3 Nov 2026 14:03:17 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 28231606D820
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=1793714595;
	bh=fYx82PF450mtCVkFsMXGvGkBMko96dPNczM0QIVlTyM=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=O5PotDhXXb/AZTPUxSFImY8iOV6okilPDL8RfRqYzLUn+qffqt05fERLJu4wkvuHX
	 GafwSGONshQfZPN+Zq2tAPKRJvyu+VEMNQly0RD+Z83JJ3fkhw8489aSIVywP0V+bx
	 G8cTicp/EprFiCAmdX0IrQTm/j4zAMrAjM/DZf8x1Hk/Vkb+KCGSH5u+fE5QUneZCL
	 m95N9Wb+fgtVZMJuYdUBNBG35oFxYuG+ZcmGSzwED8X/IzXay7uYsD/Ni1LQteF/iu
	 QNF+iWx8ZBOWJ/kh2lpHro7lXpTucmQaDh8eNBuuFPed1zyxwLMeRQQCBK0maUUXsC
	 UEr6UXdEgjBtA==
X-Received: from localhost.localdomain (mail-agni [217.70.190.124])
	by mail.netfilter.org (Postfix) with ESMTPSA id ADE6B60090;
	Tue,  3 Nov 2026 15:03:14 +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: <20261103140308.591690-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