summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2026-09-29 16:59:44 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2026-10-18 02:34:55 +0200
commita3217c51a3171cf53bed17f962798368f2786bdc (patch)
treede691bfbd51d499727db2efa5fe1322fcafa2ea2 /include/linux/errqueue.h
parent9836164821a46af07428bb2a5e14137bf0c7bd6e (diff)
netfilter: nf_tables: switch chain_types array to rcu
LLM quote: The global chain_type array is cleared under the nfnetlink subsystem mutex, but transaction processing reads it while holding only the pernet transaction mutex. nf_tables_chain_type_lookup() and nft_chain_parse_hook() dereference type->name/hook_mask before try_module_get(type->owner). Concurrent unloading of a separate provider such as nft_chain_nat can unregister and free its static nft_chain_type while a transaction is in the unprotected interval, causing a module-memory use-after-free. LLM finding, not observed in practice. Move this under RCU and grab the module owner earlier. Both nft_chain_route and nft_chain_filter are built into nf_tables.ko: only nft_chain_nat needs an extra synchronize_rcu(). Reported-by: Vega <vega@nebusec.ai> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions