]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: nf_conntrack_expect: use expect->helper
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 25 Mar 2026 13:11:03 +0000 (14:11 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 26 Mar 2026 12:18:31 +0000 (13:18 +0100)
commitf01794106042ee27e54af6fdf5b319a2fe3df94d
treec48cdae0f49decaaa3ad5551dc41a312bd7c4a31
parent9c42bc9db90a154bc61ae337a070465f3393485a
netfilter: nf_conntrack_expect: use expect->helper

Use expect->helper in ctnetlink and /proc to dump the helper name.
Using nfct_help() without holding a reference to the master conntrack
is unsafe.

Use exp->master->helper in ctnetlink path if userspace does not provide
an explicit helper when creating an expectation to retain the existing
behaviour. The ctnetlink expectation path holds the reference on the
master conntrack and nf_conntrack_expect lock and the nfnetlink glue
path refers to the master ct that is attached to the skb.

Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_sip.c