netfilter: nf_tables: fix GC transaction races with netns and netlink event exit...
authorSasha Levin <sashal@kernel.org>
Fri, 22 Sep 2023 17:01:09 +0000 (19:01 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 29 Sep 2023 04:25:15 +0000 (05:25 +0100)
commit5c8f59a9bde51698d16208921d2a62b7765762be
tree989c30c515ba643e16d968db4cc9a630bafed400
parentbfb25491fe4a892b4ada5152c8a29ed7679f52ed
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>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nf_tables-fix-gc-transaction-races-with-ne.patch
net/netfilter/nf_tables_api.c