CVE-2026-23231 Overview
A use-after-free vulnerability has been discovered in the Linux kernel's netfilter nf_tables subsystem. The flaw exists in the nf_tables_addchain() function, which publishes a chain to table->chains via list_add_tail_rcu() before registering hooks. When nf_tables_register_hook() fails, the error path calls nft_chain_del() followed by nf_tables_chain_destroy() without an RCU grace period between them, leading to use-after-free conditions.
Critical Impact
This vulnerability can be triggered through both control-plane operations (chain dumps) and packet-path processing, potentially leading to memory corruption, kernel crashes, or privilege escalation in affected Linux systems.
Affected Products
- Linux kernel with netfilter nf_tables enabled
- Linux kernel versions prior to security patches (see kernel commits)
- Systems using NFPROTO_INET netfilter configurations
Discovery Timeline
- 2026-03-04 - CVE CVE-2026-23231 published to NVD
- 2026-03-04 - Last updated in NVD database
Technical Details for CVE-2026-23231
Vulnerability Analysis
This use-after-free vulnerability arises from a race condition in the netfilter nf_tables chain registration process. The nf_tables_addchain() function adds a new chain to the table's chain list using RCU (Read-Copy-Update) primitives before completing hook registration. If the subsequent nf_tables_register_hook() call fails, the cleanup path immediately deletes and frees the chain without waiting for an RCU grace period.
This creates two distinct use-after-free scenarios:
Control-plane use-after-free: The nf_tables_dump_chains() function traverses table->chains under rcu_read_lock(). A concurrent dump operation can still be walking the chain when the error path frees it, leading to dereferencing freed memory.
Packet-path use-after-free: For NFPROTO_INET configurations, 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.
Root Cause
The root cause is the missing RCU synchronization between chain deletion and destruction in the error handling path of nf_tables_addchain(). The RCU mechanism requires a grace period to ensure all readers have completed their critical sections before memory can be safely freed. The error path violated this requirement by calling nft_chain_del() (which performs list_del_rcu()) immediately followed by nf_tables_chain_destroy() without the required synchronize_rcu() call.
Attack Vector
The vulnerability can be triggered through netfilter table manipulation operations that cause hook registration failures. An attacker with sufficient privileges to manipulate nf_tables configurations could potentially exploit this by:
- Initiating chain addition operations targeting NFPROTO_INET tables
- Creating conditions that cause nf_tables_register_hook() to fail during IPv6 hook registration
- Racing with concurrent chain dump operations or packet processing to trigger the use-after-free
The fix adds synchronize_rcu() between nft_chain_del() and the chain destruction, ensuring all RCU readers—both dump threads and in-flight packet evaluation—have finished before the chain memory is freed.
Detection Methods for CVE-2026-23231
Indicators of Compromise
- Kernel oops or panics in netfilter-related functions such as nft_do_chain() or nf_tables_dump_chains()
- KASAN (Kernel Address Sanitizer) reports indicating use-after-free in nf_tables code paths
- Unexpected system crashes during nftables rule manipulation or high network traffic periods
Detection Strategies
- Deploy kernel debugging tools such as KASAN to detect use-after-free conditions in production-like environments
- Monitor kernel logs for netfilter subsystem errors and memory corruption warnings
- Implement runtime integrity monitoring for kernel memory regions associated with netfilter operations
Monitoring Recommendations
- Enable and review kernel audit logs for nftables configuration changes and failures
- Monitor for unusual patterns in netfilter hook registration and deregistration activities
- Implement alerting on kernel panic events with stack traces involving nf_tables functions
How to Mitigate CVE-2026-23231
Immediate Actions Required
- Update the Linux kernel to a patched version containing the RCU synchronization fix
- Review and restrict privileges for users who can manipulate netfilter/nftables configurations
- Consider temporarily disabling nf_tables if the system cannot be immediately patched and the functionality is not critical
Patch Information
Multiple patches have been released to address this vulnerability across different kernel stable branches. The fix adds synchronize_rcu() between nft_chain_del() and the chain destroy operation to ensure proper RCU grace period handling.
Relevant kernel commits:
- Linux Kernel Commit 2a6586e
- Linux Kernel Commit 2f9a4ff
- Linux Kernel Commit 7017745
- Linux Kernel Commit 71e99ee
- Linux Kernel Commit dbd0af8
- Linux Kernel Commit f3fe58c
Workarounds
- Restrict access to netfilter/nftables configuration to only trusted administrative users
- Implement network segmentation to limit exposure of vulnerable systems to potential attack traffic
- Monitor nftables operations closely and consider rate-limiting configuration changes until patching is complete
# Check current kernel version
uname -r
# Verify if nf_tables module is loaded
lsmod | grep nf_tables
# Restrict nftables access to root only (if not already)
chmod 700 /usr/sbin/nft
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

