linux/include/net/netfilter
Pablo Neira Ayuso 02a3231b6d netfilter: nf_conntrack_expect: store netns and zone in expectation
__nf_ct_expect_find() and nf_ct_expect_find_get() are called under
rcu_read_lock() but they dereference the master conntrack via
exp->master.

Since the expectation does not hold a reference on the master conntrack,
this could be dying conntrack or different recycled conntrack than the
real master due to SLAB_TYPESAFE_RCU.

Store the netns, the master_tuple and the zone in struct
nf_conntrack_expect as a safety measure.

This patch is required by the follow up fix not to dump expectations
that do not belong to this netns.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2026-03-26 13:24:40 +01:00
..
ipv4
ipv6
br_netfilter.h
nf_bpf_link.h
nf_conntrack.h netfilter: nf_conntrack: don't rely on implicit includes 2026-01-20 16:23:37 +01:00
nf_conntrack_acct.h
nf_conntrack_act_ct.h
nf_conntrack_bpf.h
nf_conntrack_bridge.h
nf_conntrack_core.h netfilter: ctnetlink: ensure safe access to master conntrack 2026-03-26 13:18:32 +01:00
nf_conntrack_count.h
nf_conntrack_ecache.h
nf_conntrack_expect.h netfilter: nf_conntrack_expect: store netns and zone in expectation 2026-03-26 13:24:40 +01:00
nf_conntrack_extend.h
nf_conntrack_helper.h
nf_conntrack_l4proto.h
nf_conntrack_labels.h
nf_conntrack_seqadj.h
nf_conntrack_synproxy.h
nf_conntrack_timeout.h
nf_conntrack_timestamp.h
nf_conntrack_tuple.h
nf_conntrack_zones.h
nf_dup_netdev.h
nf_flow_table.h
nf_hooks_lwtunnel.h
nf_log.h
nf_nat.h
nf_nat_helper.h
nf_nat_masquerade.h
nf_nat_redirect.h
nf_queue.h netfilter: nfnetlink_queue: do shared-unconfirmed check before segmentation 2026-02-06 13:34:55 +01:00
nf_reject.h
nf_socket.h
nf_synproxy.h
nf_tables.h nf_tables: nft_dynset: fix possible stateful expression memleak in error path 2026-03-13 15:31:15 +01:00
nf_tables_core.h
nf_tables_ipv4.h
nf_tables_ipv6.h net/ipv6: Introduce payload_len helpers 2026-02-06 20:50:03 -08:00
nf_tables_offload.h
nf_tproxy.h
nft_fib.h
nft_meta.h
nft_reject.h
xt_rateest.h