From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf,v2] netfilter: conntrack: add dead flag to helpers
Date: Fri, 15 May 2026 14:26:31 +0200 [thread overview]
Message-ID: <agcQ90JCmlkojf6s@strlen.de> (raw)
In-Reply-To: <agZm_JyKhSFOrV94@chamomile>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> If the module reference grab does not work, maybe add:
>
> if (unlikely(nf_conntrack_ext_genid() != ext->id)
> return NULL;
>
> to nfct_help() and nfct_timeout()? So access to these ct extension
> area is always validated before hand?
>
> > > Another alternative would be to give up on this design completely
> > > and just grab module references :-)
> >
> > But that would not be enough for userspace ct helpers, right?
This is a mess:
https://sashiko.dev/#/patchset/20260515103501.18669-1-fw%40strlen.de
No idea how to fix this yet. Is it ok to disable cross-helper-attach
via ctnetlink? I don't see a way to validate nfct_help_data().
Proposal: Get rid of data[] and nfct_help_data(). Explicit structure,
explicit helpers (e.g. nfct_help_data_sip(), type enum in nf_conn_help.
Callers must handle NULL return value everywhere (wrong helper type,
helper invalidated, etc).
unhelp will have to be changed to invoke the helper
destructor as well:
static int unhelp(struct nf_conn *ct, void *me)
{
struct nf_conn_help *help = nfct_help(ct);
if (help && rcu_dereference_raw(help->helper) == me) {
nf_conntrack_event(IPCT_HELPER, ct);
RCU_INIT_POINTER(help->helper, NULL);
}
This can't be right, we lose the ->destroy() CB?
Ideally we could get rid of ->destroy, but that would require
permanent removal of pptp.
prev parent reply other threads:[~2026-05-15 12:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 14:30 [PATCH nf,v2] netfilter: conntrack: add dead flag to helpers Pablo Neira Ayuso
2026-05-14 14:43 ` Florian Westphal
2026-05-14 15:10 ` Pablo Neira Ayuso
2026-05-14 15:44 ` Florian Westphal
2026-05-14 23:30 ` Pablo Neira Ayuso
2026-05-14 23:53 ` Pablo Neira Ayuso
2026-05-14 23:55 ` Florian Westphal
2026-05-15 0:10 ` Pablo Neira Ayuso
2026-05-15 0:21 ` Pablo Neira Ayuso
2026-05-15 12:26 ` Florian Westphal [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=agcQ90JCmlkojf6s@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.