Skip to content

Commit 2066b15

Browse files
committed
netfilter: nf_tables: unbind non-anonymous set if rule construction fails
jira LE-1907 cve CVE-2023-3390 Rebuild_History Non-Buildable kernel-5.14.0-284.30.1.el9_2 commit-author Pablo Neira Ayuso <[email protected]> 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 <[email protected]> (cherry picked from commit 3e70489) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 8d75cf0 commit 2066b15

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
@@ -4921,6 +4921,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
49214921
nft_set_trans_unbind(ctx, set);
49224922
if (nft_set_is_anonymous(set))
49234923
nft_deactivate_next(ctx->net, set);
4924+
else
4925+
list_del_rcu(&binding->list);
49244926

49254927
set->use--;
49264928
break;

0 commit comments

Comments
 (0)