CVE-2026-23351: netfilter: nft_set_pipapo: split gc into unlink and reclaim phase
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_set_pipapo: split gc into unlink and reclaim phase
Yiming Qian reports Use-after-free in the pipapo set type:
Under a large number of expired elements, commit-time GC can run for a very long time in a non-preemptible context, triggering soft lockup warnings and RCU stall reports (local denial of service).
We must split GC in an unlink and a reclaim phase.
We cannot queue elements for freeing until pointers have been swapped. Expired elements are still exposed to both the packet path and userspace dumpers via the live copy of the data structure.
call_rcu() does not protect us: dump operations or element lookups starting after call_rcu has fired can still observe the free'd element, unless the commit phase has made enough progress to swap the clone and live pointers before any new reader has picked up the old version.
This a similar approach as done recently for the rbtree backend in commit 35f83a75529a ("netfilter: nft_set_rbtree: don't gc elements on insert").
The Linux kernel CVE team has assigned CVE-2026-23351 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.6 with commit 3c4287f62044a90e73a561aa05fc46e62da173da and fixed in 6.1.167 with commit 16f3595c0441d87dfa005c47d8f95be213afaa9e Issue introduced in 5.6 with commit 3c4287f62044a90e73a561aa05fc46e62da173da and fixed in 6.6.130 with commit 7864c667aed01a58b87ca518a631322cd0ac34c0 Issue introduced in 5.6 with commit 3c4287f62044a90e73a561aa05fc46e62da173da and fixed in 6.12.77 with commit c12d570d71920903a1a0468b7d13b085203d0c93 Issue introduced in 5.6 with commit 3c4287f62044a90e73a561aa05fc46e62da173da and fixed in 6.18.17 with commit 500a50a301ce962b019ab95053ac70264fec2c21 Issue introduced in 5.6 with commit 3c4287f62044a90e73a561aa05fc46e62da173da and fixed in 6.19.7 with commit aff13667708dfa0dce136b8efd81baa9fa6ef261 Issue introduced in 5.6 with commit 3c4287f62044a90e73a561aa05fc46e62da173da and fixed in 7.0-rc3 with commit 9df95785d3d8302f7c066050117b04cd3c2048c2
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-23351
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c
net/netfilter/nft_set_pipapo.c
net/netfilter/nft_set_pipapo.h
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/16f3595c0441d87dfa005c47d8f95be213afaa9e https://git.kernel.org/stable/c/7864c667aed01a58b87ca518a631322cd0ac34c0 https://git.kernel.org/stable/c/c12d570d71920903a1a0468b7d13b085203d0c93 https://git.kernel.org/stable/c/500a50a301ce962b019ab95053ac70264fec2c21 https://git.kernel.org/stable/c/aff13667708dfa0dce136b8efd81baa9fa6ef261 https://git.kernel.org/stable/c/9df95785d3d8302f7c066050117b04cd3c2048c2