CVE-2026-72435: netfilter: ipset: fix order of kfree_rcu() and rcu_assign_pointer()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: ipset: fix order of kfree_rcu() and rcu_assign_pointer()
Sashiko pointed out that kfree_rcu() was called before rcu_assign_pointer() in handling the comment extension. Fix the order so that rcu_assign_pointer() called first.
The Linux kernel CVE team has assigned CVE-2026-72435 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 5.10.261 with commit c9787d7c24ffd83019f379455e1b97fb4f0f75eb Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 5.15.212 with commit 6e98407cb94e035bba98956adc9096a76d8b2a9f Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 6.1.178 with commit 50b70f56f3baaff46599f59b2d93fa2540120776 Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 6.6.145 with commit d01b4b471f0fc5c396af62845e972ccf99cee29a Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 6.12.97 with commit fcb565966534909377a16be5f7b065db2e25c8b5 Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 6.18.40 with commit 8087bb360a936a6314d22b567e4b861656943eb6 Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 7.1.5 with commit 93a775fd67f3ef34949a9523bfa69403ee74efdd Issue introduced in 4.2 with commit b57b2d1fa53fe8563bdfc66a33b844463b9af285 and fixed in 7.2-rc1 with commit 3ca9982a8882470aa0ac4e8bb9a552b181d1efcd
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-72435
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/ipset/ip_set_core.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/c9787d7c24ffd83019f379455e1b97fb4f0f75eb https://git.kernel.org/stable/c/6e98407cb94e035bba98956adc9096a76d8b2a9f https://git.kernel.org/stable/c/50b70f56f3baaff46599f59b2d93fa2540120776 https://git.kernel.org/stable/c/d01b4b471f0fc5c396af62845e972ccf99cee29a https://git.kernel.org/stable/c/fcb565966534909377a16be5f7b065db2e25c8b5 https://git.kernel.org/stable/c/8087bb360a936a6314d22b567e4b861656943eb6 https://git.kernel.org/stable/c/93a775fd67f3ef34949a9523bfa69403ee74efdd https://git.kernel.org/stable/c/3ca9982a8882470aa0ac4e8bb9a552b181d1efcd