]> git.hungrycats.org Git - linux/commit
netfilter: nf_tables: register hooks last when adding new chain/flowtable
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 19 Feb 2024 18:43:53 +0000 (19:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:26:38 +0000 (13:26 +0100)
commitf305359186724ac4bc058d5cd01782e6e6f9a3e7
treef4c1a99e86259872d042ff7b3467330cc78a3e92
parent26994a04b0ba50388600a617afe7baaa239cad25
netfilter: nf_tables: register hooks last when adding new chain/flowtable

[ Upstream commit d472e9853d7b46a6b094224d131d09ccd3a03daf ]

Register hooks last when adding chain/flowtable to ensure that packets do
not walk over datastructure that is being released in the error path
without waiting for the rcu grace period.

Fixes: 91c7b38dc9f0 ("netfilter: nf_tables: use new transaction infrastructure to handle chain")
Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c