Files
linux-stable-mirror/include/net
Pablo Neira Ayuso f8cebc41af netfilter: nf_conntrack_expect: store netns and zone in expectation
[ Upstream commit 02a3231b6d ]

__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>
Stable-dep-of: 917b61fa20 ("netfilter: ctnetlink: ignore explicit helper on new expectations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-04-11 14:24:35 +02:00
..
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2025-07-17 18:37:05 +02:00
2025-02-08 09:57:10 +01:00
2024-08-26 09:37:23 -07:00
2025-12-18 13:55:22 +01:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2026-01-08 10:15:01 +01:00
2024-12-19 18:13:13 +01:00
2024-08-26 09:37:23 -07:00
2024-08-12 17:23:57 -07:00
2024-08-26 09:37:23 -07:00
2024-09-11 20:44:31 -07:00
2024-08-12 17:50:34 -07:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2025-02-27 04:30:19 -08:00
2025-02-27 04:30:19 -08:00
2024-08-26 09:37:23 -07:00