mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
netfilter: nf_tables: unbind non-anonymous set if rule construction fails
commit3e70489721upstream. Otherwise a dangling reference to a rule object that is gone remains in the set binding list. Fixes:26b5a5712e("netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
30235c2457
commit
2bd6f13734
@@ -5042,6 +5042,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
|
||||
nft_set_trans_unbind(ctx, set);
|
||||
if (nft_set_is_anonymous(set))
|
||||
nft_deactivate_next(ctx->net, set);
|
||||
else
|
||||
list_del_rcu(&binding->list);
|
||||
|
||||
set->use--;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user