You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
netfilter: nf_tables: hold mutex on netns pre_exit path
commit3923b1e440upstream. clean_net() runs in workqueue while walking over the lists, grab mutex. Fixes:767d1216bf("netfilter: nftables: fix possible UAF over chains from packet path in netns") 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
9e8d927cfa
commit
8b7454dd98
@@ -8983,7 +8983,9 @@ static int __net_init nf_tables_init_net(struct net *net)
|
||||
|
||||
static void __net_exit nf_tables_pre_exit_net(struct net *net)
|
||||
{
|
||||
mutex_lock(&net->nft.commit_mutex);
|
||||
__nft_release_hooks(net);
|
||||
mutex_unlock(&net->nft.commit_mutex);
|
||||
}
|
||||
|
||||
static void __net_exit nf_tables_exit_net(struct net *net)
|
||||
|
||||
Reference in New Issue
Block a user