]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nf_tables: fix GC transaction races with netns and netlink event exit...
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 15 Aug 2023 13:39:00 +0000 (15:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:32:46 +0000 (17:32 +0200)
commit3bdf400a1ad166274e85fa537f8a993a4553e36d
tree9e20707276838de471321d252513039867be1095
parent6650bebaa564a183c9358d0da9571f0e4138e7ec
netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path

[ Upstream commit 6a33d8b73dfac0a41f3877894b38082bd0c9a5bc ]

Netlink event path is missing a synchronization point with GC
transactions. Add GC sequence number update to netns release path and
netlink event path, any GC transaction losing race will be discarded.

Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
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/nf_tables_api.c