CVE-2026-23231
Received Received - Intake
Use-After-Free in Linux Kernel netfilter nf_tables Causes Potential Crash

Publication date: 2026-03-04

Last updated on: 2026-04-02

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_tables: fix use-after-free in nf_tables_addchain() nf_tables_addchain() publishes the chain to table->chains via list_add_tail_rcu() (in nft_chain_add()) before registering hooks. If nf_tables_register_hook() then fails, the error path calls nft_chain_del() (list_del_rcu()) followed by nf_tables_chain_destroy() with no RCU grace period in between. This creates two use-after-free conditions: 1) Control-plane: nf_tables_dump_chains() traverses table->chains under rcu_read_lock(). A concurrent dump can still be walking the chain when the error path frees it. 2) Packet path: for NFPROTO_INET, nf_register_net_hook() briefly installs the IPv4 hook before IPv6 registration fails. Packets entering nft_do_chain() via the transient IPv4 hook can still be dereferencing chain->blob_gen_X when the error path frees the chain. Add synchronize_rcu() between nft_chain_del() and the chain destroy so that all RCU readers -- both dump threads and in-flight packet evaluation -- have finished before the chain is freed.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-04
Last Modified
2026-04-02
Generated
2026-05-07
AI Q&A
2026-03-04
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 3.16 (inc) to 6.1.165 (exc)
linux linux_kernel From 6.13 (inc) to 6.18.14 (exc)
linux linux_kernel From 6.19 (inc) to 6.19.4 (exc)
linux linux_kernel From 6.2 (inc) to 6.6.128 (exc)
linux linux_kernel From 6.7 (inc) to 6.12.75 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a use-after-free issue in the Linux kernel's netfilter nf_tables subsystem, specifically in the nf_tables_addchain() function.

The problem occurs because nf_tables_addchain() publishes a chain to the table's chains list before registering hooks. If the hook registration fails, the error handling code deletes the chain and frees its memory without waiting for all readers to finish accessing it.

This leads to two use-after-free conditions: one in the control plane where a concurrent dump might still be accessing the chain, and one in the packet path where packets processed by a transient IPv4 hook might access freed memory.

The fix involves adding a synchronize_rcu() call between deleting the chain from the list and freeing it, ensuring all readers have finished before the memory is freed.


How can this vulnerability impact me? :

This vulnerability can lead to use-after-free conditions, which may cause system instability, crashes, or potential execution of arbitrary code within the kernel.

Because the issue affects both control-plane operations and packet processing paths, it can impact the reliability and security of network filtering and firewall functions on affected Linux systems.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

The vulnerability is fixed by adding a synchronize_rcu() call between nft_chain_del() and the chain destroy in the Linux kernel's nf_tables code. To mitigate this vulnerability immediately, you should update your Linux kernel to a version that includes this fix.

Since the issue involves use-after-free conditions in nf_tables when registering hooks, avoiding use of vulnerable kernel versions or disabling nf_tables functionality temporarily could reduce risk until an update is applied.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart