Skip to content

Commit 4572356

Browse files
committed
netfilter: nf_tables: use correct lock to protect gc_list
jira VULN-430 cve CVE-2023-4244 commit-author Pablo Neira Ayuso <pablo@netfilter.org> commit 8357bc9 Use nf_tables_gc_list_lock spinlock, not nf_tables_destroy_list_lock to protect the gc list. Fixes: 5f68718 ("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> (cherry picked from commit 8357bc9) Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
1 parent 9ef4dc2 commit 4572356

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9146,9 +9146,9 @@ static void nft_trans_gc_work(struct work_struct *work)
91469146
struct nft_trans_gc *trans, *next;
91479147
LIST_HEAD(trans_gc_list);
91489148

9149-
spin_lock(&nf_tables_destroy_list_lock);
9149+
spin_lock(&nf_tables_gc_list_lock);
91509150
list_splice_init(&nf_tables_gc_list, &trans_gc_list);
9151-
spin_unlock(&nf_tables_destroy_list_lock);
9151+
spin_unlock(&nf_tables_gc_list_lock);
91529152

91539153
list_for_each_entry_safe(trans, next, &trans_gc_list, list) {
91549154
list_del(&trans->list);

0 commit comments

Comments
 (0)