CVE-2026-53219: netfilter: x_tables: avoid leaking percpu counter pointers
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: x_tables: avoid leaking percpu counter pointers
The native and compat get-entries paths copy the fixed rule entry header from the kernelized rule blob to userspace before overwriting the entry's counter fields with a sanitized counter snapshot.
On SMP kernels, entry->counters.pcnt contains the percpu allocation address used by x_tables rule counters. A caller can provide a userspace buffer that faults during the initial fixed-header copy after pcnt has been copied but before the later sanitized counter copy runs. The syscall then returns -EFAULT while leaving the raw percpu pointer in userspace.
Copy only the fixed entry prefix before counters from the kernelized rule blob, then copy the sanitized counter snapshot into the counter field. Apply this ordering to the IPv4, IPv6, and ARP native and compat get-entries implementations so a fault cannot expose the internal percpu counter pointer.
The Linux kernel CVE team has assigned CVE-2026-53219 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 5.10.259 with commit b74ba3343eb44b2cbf7e9665918c287df1d52ebb Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 5.15.210 with commit 0b35dc8527ccc16b7dc34e8a3164313e68cd4e45 Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.1.176 with commit b28e2fcad3db7e8687b15bc20bced26b5b7c920e Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.6.143 with commit a0d16941adf3a501956d74aefd8d6e217906e79c Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.12.94 with commit 8d67e42ad3b1a95a152541015a07110e06992d6c Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.18.36 with commit 08a3e218064db11f154ad9ad5541751ea7f34ebe Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 7.0.13 with commit fb0521aff1e10e300d89725cc439d3ea74c828c5 Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 7.1 with commit f7f2fbb0e893a0238dc464f8d8c0f5609bec584f
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-53219
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/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.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/b74ba3343eb44b2cbf7e9665918c287df1d52ebb https://git.kernel.org/stable/c/0b35dc8527ccc16b7dc34e8a3164313e68cd4e45 https://git.kernel.org/stable/c/b28e2fcad3db7e8687b15bc20bced26b5b7c920e https://git.kernel.org/stable/c/a0d16941adf3a501956d74aefd8d6e217906e79c https://git.kernel.org/stable/c/8d67e42ad3b1a95a152541015a07110e06992d6c https://git.kernel.org/stable/c/08a3e218064db11f154ad9ad5541751ea7f34ebe https://git.kernel.org/stable/c/fb0521aff1e10e300d89725cc439d3ea74c828c5 https://git.kernel.org/stable/c/f7f2fbb0e893a0238dc464f8d8c0f5609bec584f