]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: xt_CT: drop pending enqueued packets on template removal
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 12 Mar 2026 12:48:48 +0000 (13:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2026 10:08:53 +0000 (11:08 +0100)
commit19a230dec6bb8928e3f96387f9085cf2c79bcef9
treed88f9bb82ed5df45f0bfb7901b2ac31591d85e7e
parent6802ff8beceb9c4254318e81c1395720438f2cc2
netfilter: xt_CT: drop pending enqueued packets on template removal

[ Upstream commit f62a218a946b19bb59abdd5361da85fa4606b96b ]

Templates refer to objects that can go away while packets are sitting in
nfqueue refer to:

- helper, this can be an issue on module removal.
- timeout policy, nfnetlink_cttimeout might remove it.

The use of templates with zone and event cache filter are safe, since
this just copies values.

Flush these enqueued packets in case the template rule gets removed.

Fixes: 24de58f46516 ("netfilter: xt_CT: allow to attach timeout policy + glue code")
Reported-by: Yiming Qian <yimingqian591@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/xt_CT.c