Linux’s nearly 21-year-old Netfilter bug lets IPv6 traffic sneak past firewalls

Wait 5 sec.

A flaw sitting for over 20 years in the Linux kernel’s Netfilter connection-tracking (Conntrack) subsystem could let remote, unauthenticated attackers bypass firewall rules and reach otherwise inaccessible services.The vulnerability, tracked as CVE-2026-139281, stems from an integer truncation error in the handling of fragmented IPv6 packets, causing the kernel’s Conntrack workflow to misidentify the destination of network traffic.Red Hat has classified the vulnerability as Critical, assigning it a CVSS score of 9.1 out of 10. The attack requires neither authentication nor user interaction, and Red Hat warns that an attacker can exploit it remotely to bypass stateful firewall protections on affected Red Hat Enterprise Linux systems.The underlying problem is a mismatch between how the kernel tracks IPv6 packet headers during fragment reassembly and how it subsequently delivers the reassembled traffic. This can leave firewall rules making decisions about a different network connection from the one that ultimately receives the packet.A byte-sized variable is creating a large firewall problemThe problem lies with a function in the kernel’s IPv6 Netfilter Conntrack reassembly code, which was introduced in a January 2006 update. The “find_prev_fhdr()” function identifies the offset of the Next Header field preceding an IPv6 Fragment header, passing that position through an integer pointer.When an IPv6 packet carries a long chain of extension headers, it pushes the relevant header offset beyond 255 bytes. The eight-bit variable, which the function stores the offset in, cannot handle values that large, causing it to wrap around and point to the wrong location.When the kernel reassembles the fragments, it uses this incorrect offset to modify the wrong byte in the IPv6 header chain. This can make Netfilter’s Conntrack subsystem see a different destination from the one the kernel ultimately delivers the packet to. In one example, Conntrack identifies the traffic as UDP headed for port 53, while the payload actually reaches a service listening on UDP port 9999, according to an OSV description.The mismatch is significant for firewall configurations that allow or restrict traffic based on Conntrack information. A packet that appears to match an allowed service can consequently reach a different, potentially restricted service.A small kernel fix, but a broader patching exerciseThe upstream fix is straightforward. The patch changes the local offset variable in find_prev_fhdr() from u8 (the eight-bit variable) to int, aligning it with the function’s output argument and other offset variables in the same code path. This prevents the offset from wrapping when an extended IPv6 header chain places the relevant field beyond the 255-byte boundary.The patch was authored by Jeremy Jean and signed off by Pablo Neira Ayuso. Its commit message also identifies the original Netfilter connection-tracking subsystem as the introducing change, linking the underlying bug to longstanding kernel code.Affected Linux kernel ranges begin with 2.6.15, with fixes listed for the 5.10, 5.15, 6.1, 6.6, 6.12, 6.18 and 7.3 kernel series. The corresponding fixed releases are 5.10.275, 5.15.226, 6.1.193, 6.12.119, 6.18.65 and 7.3.6, respectively.Debian has also flagged the vulnerability in its Bookworm and Trixie releases, while marking it fixed in its unstable (Sid) and Forky branches with kernel version 7.3.6-1. Canonical, too, marked the flaw as affecting the Linux kernel packages in Ubuntu releases dating back to 16.04 LTS, including 20.04, 22.04, 24.04, and the upcoming 26.04 and 26.10 releases.Administrators should monitor their respective distribution security advisories for package-specific fixes. Red Hat’s recommended interim mitigation is to disable IPv6 on systems that do not require it. The vendor cautions that doing so disables all IPv6 connectivity, making it unsuitable for systems that depend on the protocol.