Skip to content

Commit 1eef334

Browse files
committed
netfilter: nf_tables: unbind non-anonymous set if rule construction fails
jira VULN-6505 cve CVE-2023-3390 commit-author Pablo Neira Ayuso <pablo@netfilter.org> commit 3e70489 Otherwise a dangling reference to a rule object that is gone remains in the set binding list. Fixes: 26b5a57 ("netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> (cherry picked from commit 3e70489) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent c213bfc commit 1eef334

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4466,6 +4466,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
44664466
nft_set_trans_unbind(ctx, set);
44674467
if (nft_set_is_anonymous(set))
44684468
nft_deactivate_next(ctx->net, set);
4469+
else
4470+
list_del_rcu(&binding->list);
44694471

44704472
set->use--;
44714473
break;

0 commit comments

Comments
 (0)