From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Yuto Hamaguchi <Hamaguchi.Yuto@da.MitsubishiElectric.co.jp>,
Florian Westphal <fw@strlen.de>, Sasha Levin <sashal@kernel.org>,
pablo@netfilter.org, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org
Subject: [PATCH AUTOSEL 6.19-5.10] netfilter: nf_conntrack: Add allow_clash to generic protocol handler
Date: Sat, 14 Feb 2026 16:22:46 -0500 [thread overview]
Message-ID: <20260214212452.782265-21-sashal@kernel.org> (raw)
In-Reply-To: <20260214212452.782265-1-sashal@kernel.org>
From: Yuto Hamaguchi <Hamaguchi.Yuto@da.MitsubishiElectric.co.jp>
[ Upstream commit 8a49fc8d8a3e83dc51ec05bcd4007bdea3c56eec ]
The upstream commit, 71d8c47fc653711c41bc3282e5b0e605b3727956
("netfilter: conntrack: introduce clash resolution on insertion race"),
sets allow_clash=true in the UDP/UDPLITE protocol handler
but does not set it in the generic protocol handler.
As a result, packets composed of connectionless protocols at each layer,
such as UDP over IP-in-IP, still drop packets due to conflicts during conntrack insertion.
To resolve this, this patch sets allow_clash in the nf_conntrack_l4proto_generic.
Signed-off-by: Yuto Hamaguchi <Hamaguchi.Yuto@da.MitsubishiElectric.co.jp>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The current file does **not** yet have `allow_clash = true` — this
confirms the patch hasn't been applied yet and is needed.
### 7. STABILITY AND TRUST INDICATORS
- **Signed-off by Florian Westphal** — the netfilter maintainer,
indicating proper review
- The fix is trivially verifiable: it mirrors what was already done for
UDP/UDPLITE/GRE
- The author (Yuto Hamaguchi from Mitsubishi Electric) clearly
encountered this in a real-world deployment scenario
### Summary
| Criterion | Assessment |
|-----------|-----------|
| **Fixes a real bug** | YES — packets dropped for connectionless
protocol stacks |
| **Obviously correct** | YES — mirrors existing pattern for
UDP/UDPLITE/GRE |
| **Small and contained** | YES — single line addition |
| **No new features** | Correct — just extends existing clash resolution
to generic handler |
| **Risk of regression** | Very low — same mechanism already proven for
UDP |
| **User impact** | Moderate-high — affects any setup with
connectionless tunnels + conntrack |
| **Dependencies** | Requires 71d8c47fc653 which is already in mainline
|
This is a textbook stable backport candidate: a one-line fix that
addresses a real user-visible bug (packet drops) with essentially zero
regression risk, fixing an oversight in an earlier commit that only
partially applied clash resolution to all relevant protocol handlers.
**YES**
net/netfilter/nf_conntrack_proto_generic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c
index e831637bc8ca8..cb260eb3d012c 100644
--- a/net/netfilter/nf_conntrack_proto_generic.c
+++ b/net/netfilter/nf_conntrack_proto_generic.c
@@ -67,6 +67,7 @@ void nf_conntrack_generic_init_net(struct net *net)
const struct nf_conntrack_l4proto nf_conntrack_l4proto_generic =
{
.l4proto = 255,
+ .allow_clash = true,
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
.ctnl_timeout = {
.nlattr_to_obj = generic_timeout_nlattr_to_obj,
--
2.51.0
next parent reply other threads:[~2026-02-14 21:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260214212452.782265-1-sashal@kernel.org>
2026-02-14 21:22 ` Sasha Levin [this message]
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-5.10] netfilter: xt_tcpmss: check remaining length before reading optlen Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260214212452.782265-21-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Hamaguchi.Yuto@da.MitsubishiElectric.co.jp \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox