]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: fix GC transaction races with netns and netlink event exit...
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 22 Sep 2023 16:30:19 +0000 (18:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:34 +0000 (14:56 +0200)
commit41113aa5698ad7a82635bcb747d483e4458d518d
tree033a875ce1668068f16f85dd2086d0660e805aef
parent59ee68c437c562170265194a99698c805a686bb3
netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path

commit 6a33d8b73dfac0a41f3877894b38082bd0c9a5bc upstream.

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