mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
netfilter: nf_tables: set dormant flag on hook register failure
[ Upstream commitbccebf6470
] We need to set the dormant flag again if we fail to register the hooks. During memory pressure hook registration can fail and we end up with a table marked as active but no registered hooks. On table/base chain deletion, nf_tables will attempt to unregister the hook again which yields a warn splat from the nftables core. Reported-and-tested-by: syzbot+de4025c006ec68ac56fc@syzkaller.appspotmail.com Fixes:179d9ba555
("netfilter: nf_tables: fix table flag updates") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4f13a79ea3
commit
f2135bbf14
1 changed files with 1 additions and 0 deletions
|
@ -1253,6 +1253,7 @@ static int nf_tables_updtable(struct nft_ctx *ctx)
|
|||
return 0;
|
||||
|
||||
err_register_hooks:
|
||||
ctx->table->flags |= NFT_TABLE_F_DORMANT;
|
||||
nft_trans_destroy(trans);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue