From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Daehyeon Ko <4ncienth@gmail.com>,
phil@nwl.cc, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, netdev@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net v3] netfilter: conntrack: avoid recursive master destruction
Date: Wed, 7 Oct 2026 13:45:48 +0200 [thread overview]
Message-ID: <asYw7Pn4qcYt4F0D@chamomile> (raw)
In-Reply-To: <asYsY-yLXNVFc_Rv@strlen.de>
On Wed, Oct 07, 2026 at 01:26:27PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > That said, ignoring the source of the problem is not good.
> > >
> > > I see no point whatsoever for a expected connection to have a
> > > non-control connection as its master.
> >
> > I would prefer if chain length is limited too, ie. tighten this
> > interface based on the LLM feedback.
>
> Thanks, working on this now. Tentative plan:
>
> #define NF_CT_MAX_EXPECT_CHAIN_LEN 4
4 is a reasonable number, but I think 2 is just enough, which is what
H.323 and SIP need, in case you consider tightening this even further
Userspace helpers are simple, they don't use this feature. It is true
that conntrackd needs this feature for flow synchronization as the LLM
suggests.
> static inline bool nf_ct_master_acceptable(const struct nf_conn *m)
> {
> unsigned int depth = 0;
>
> while (m->master) {
> if (++depth > NF_CT_MAX_EXPECT_CHAIN_LEN)
> return false;
> m = m->master;
> }
>
> return true;
> }
>
> struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me)
> {
> struct nf_conntrack_expect *new;
>
> + if (!nf_ct_master_acceptable(me))
> + return NULL;
> +
>
> I'll make an independent submission for this.
Thanks Florian.
prev parent reply other threads:[~2026-10-07 11:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 1:48 [PATCH net v3] netfilter: conntrack: avoid recursive master destruction Daehyeon Ko
2026-10-07 1:49 ` netdev-bot+sinfo
2026-10-07 8:48 ` Florian Westphal
2026-10-07 10:32 ` Pablo Neira Ayuso
2026-10-07 11:26 ` Florian Westphal
2026-10-07 11:45 ` Pablo Neira Ayuso [this message]
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=asYw7Pn4qcYt4F0D@chamomile \
--to=pablo@netfilter.org \
--cc=4ncienth@gmail.com \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
--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