]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: nft_ct: drop pending enqueued packets on removal
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 12 Mar 2026 12:48:47 +0000 (13:48 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 13 Mar 2026 14:31:15 +0000 (15:31 +0100)
commit36eae0956f659e48d5366d9b083d9417f3263ddc
tree30bb50fc61c83c599b8f59feb3e9dbc31dc53eae
parent0548a13b5a145b16e4da0628b5936baf35f51b43
netfilter: nft_ct: drop pending enqueued packets on removal

Packets sitting in nfqueue might hold a reference to:

- templates that specify the conntrack zone, because a percpu area is
  used and module removal is possible.
- conntrack timeout policies and helper, where object removal leave
  a stale reference.

Since these objects can just go away, drop enqueued packets to avoid
stale reference to them.

If there is a need for finer grain removal, this logic can be revisited
to make selective packet drop upon dependencies.

Fixes: 7e0b2b57f01d ("netfilter: nft_ct: add ct timeout support")
Reported-by: Yiming Qian <yimingqian591@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_ct.c