CVE-2026-23231 netfilter: nf_tables: fix use-after-free in nf_tables_addchain()

High 7.8 Published Updated

A use-after-free in the Linux kernel's nf_tables allows attackers to potentially execute code or escalate privileges via race conditions during chain registration failures.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-23231?

CVE-2026-23231 is a high-severity use after free vulnerability in Linux kernel, published on 4 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-416

Which versions are affected by CVE-2026-23231?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2026-23231?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2026-23231 being exploited?

There is no known exploitation of CVE-2026-23231 in the wild and no public exploit code.

Public exploit code: 1 Exploit-DB entry.

All Linux kernel vulnerabilities

Sources

Also known as AZL-78650, BELL-CVE-2026-23231, DEBIAN-CVE-2026-23231, GHSA-gxm6-px42-mpjc, ROOT-OS-DEBIAN-11-CVE-2026-23231, ROOT-OS-DEBIAN-12-CVE-2026-23231 and 5 more.

Is CVE-2026-23231 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free