CVE-2026-52921: netfilter: ipset: stop hash:* range iteration at end
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: ipset: stop hash:* range iteration at end
The following hash set variants:
hash:ip,mark
hash:ip,port
hash:ip,port,ip
hash:ip,port,net
iterate IPv4 ranges with a 32-bit iterator.
The iterator must stop once the last address in the requested range has been processed. Advancing it once more can move the traversal state past the end of the request, so a later retry may continue from an unintended position.
Handle the iterator increment explicitly at the end of the loop and stop once the upper bound has been processed. This keeps the existing retry behaviour intact for valid ranges while preventing traversal from continuing past the original boundary.
The Linux kernel CVE team has assigned CVE-2026-52921 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 5.10.258 with commit be75218fadea22e59c8673db212f29c681bf45bb Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 5.15.209 with commit 383418c20e69f5761b6ec5238f599423f4fb77fb Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 6.1.175 with commit 0d7b33ace701fe397e6e4de145f32e098178d901 Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 6.6.142 with commit c281e018af98df91827d65bec00f4956c00a1b02 Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 6.12.92 with commit 02f75f041a93ea045834da89cd3234f4c1d749b4 Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 6.18.34 with commit 952e988163c2ab9939c3db9f0f8e77af6a1bb436 Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 7.0.11 with commit 0b530efb2cc9dbdddfd49d392e3a857f0d4ce8dc Issue introduced in 4.14 with commit 48596a8ddc46f96afb6a2cd72787cb15d6bb01fc and fixed in 7.1 with commit 0d3a282ab5f165fc207ff49ea5b6ad8f54616bd6
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-52921
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_hash_ipmark.c net/netfilter/ipset/ip_set_hash_ipport.c net/netfilter/ipset/ip_set_hash_ipportip.c net/netfilter/ipset/ip_set_hash_ipportnet.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/be75218fadea22e59c8673db212f29c681bf45bb https://git.kernel.org/stable/c/383418c20e69f5761b6ec5238f599423f4fb77fb https://git.kernel.org/stable/c/0d7b33ace701fe397e6e4de145f32e098178d901 https://git.kernel.org/stable/c/c281e018af98df91827d65bec00f4956c00a1b02 https://git.kernel.org/stable/c/02f75f041a93ea045834da89cd3234f4c1d749b4 https://git.kernel.org/stable/c/952e988163c2ab9939c3db9f0f8e77af6a1bb436 https://git.kernel.org/stable/c/0b530efb2cc9dbdddfd49d392e3a857f0d4ce8dc https://git.kernel.org/stable/c/0d3a282ab5f165fc207ff49ea5b6ad8f54616bd6