Skip to content
Commit 767d1216 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nftables: fix possible UAF over chains from packet path in netns

Although hooks are released via call_rcu(), chain and rule objects are
immediately released while packets are still walking over these bits.

This patch adds the .pre_exit callback which is invoked before
synchronize_rcu() in the netns framework to stay safe.

Remove a comment which is not valid anymore since the core does not use
synchronize_net() anymore since 8c873e21

 ("netfilter: core: free
hooks with call_rcu").

Suggested-by: default avatarFlorian Westphal <fw@strlen.de>
Fixes: df05ef87

 ("netfilter: nf_tables: release objects on netns destruction")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent a3005b0f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment