CVE-2026-23272: netfilter: nf_tables: unconditionally bump set->nelems before insertion
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: unconditionally bump set->nelems before insertion
In case that the set is full, a new element gets published then removed without waiting for the RCU grace period, while RCU reader can be walking over it already.
To address this issue, add the element transaction even if set is full, but toggle the set_full flag to report -ENFILE so the abort path safely unwinds the set to its previous state.
As for element updates, decrement set->nelems to restore it.
A simpler fix is to call synchronize_rcu() in the error path. However, with a large batch adding elements to already maxed-out set, this could cause noticeable slowdown of such batches.
The Linux kernel CVE team has assigned CVE-2026-23272 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.10 with commit 35d0ac9070ef619e3bf44324375878a1c540387b and fixed in 6.18.17 with commit 6826131c7674329335ca25df2550163eb8a1fd0c Issue introduced in 4.10 with commit 35d0ac9070ef619e3bf44324375878a1c540387b and fixed in 6.19.7 with commit ccb8c8f3c1127cf34d18c737309897c68046bf21 Issue introduced in 4.10 with commit 35d0ac9070ef619e3bf44324375878a1c540387b and fixed in 7.0-rc3 with commit def602e498a4f951da95c95b1b8ce8ae68aa733a Issue introduced in 4.9.33 with commit fefdd79403e89b0c673965343b92e2e01e2713a8
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-23272
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:
net/netfilter/nf_tables_api.c
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/6826131c7674329335ca25df2550163eb8a1fd0c https://git.kernel.org/stable/c/ccb8c8f3c1127cf34d18c737309897c68046bf21 https://git.kernel.org/stable/c/def602e498a4f951da95c95b1b8ce8ae68aa733a