Skip to main content

Linux Fixes a 21-Year-Old IPv6 Firewall Bypass

9 min read

Check my Linux servers

We find servers with IPv6 and a port only the firewall protects, harden them and patch the kernel.

A one-line kernel fix closes CVE-2026-139281, a flaw in IPv6 fragment handling that let a packet slip past the host firewall. Fixed kernels are out upstream and for RHEL 8 and AlmaLinux 8, while Debian stable and Ubuntu still wait. How to check a server and what to do until then.

A One-Line Fix for a Very Old Bug

On November 30, 2026, the Linux kernel project published CVE-2026-139281, a flaw in the way the kernel firewall handles fragmented IPv6 packets. The fix changes the type of a single variable. It is already in seven stable kernel series and in mainline 7.4-rc1, and Red Hat and AlmaLinux shipped it for version 8 on December 3.

The bug let a remote sender get an IPv6 packet past a stateful firewall rule on the host. The kernel's own CVE team scored it 9.1, critical, and Red Hat agrees. The number is high because the sender needs nothing except the ability to reach the machine over IPv6. The effect is narrower than the number suggests. Nothing outside the packet is corrupted, the machine does not crash, and the flaw runs no code by itself. It delivers a packet to a port your firewall was meant to close, so how much it matters depends on what listens behind that firewall. You can check that in a few minutes.

Nothing points to attacks so far. The CVE was not in CISA's catalog of exploited vulnerabilities when we checked on December 3.

uname -r   # the running kernel, which can be older than the newest one installed

What Went Wrong

Linux tracks connections with a subsystem called conntrack, and almost every stateful firewall on a Linux host leans on it. That covers nftables, ip6tables, firewalld and ufw, and Docker and Kubernetes write conntrack rules of their own. Before conntrack can classify a fragmented IPv6 packet, the kernel has to put the fragments back together. The code for that lives in net/ipv6/netfilter/nf_conntrack_reasm.c.

An IPv6 packet can carry a chain of extension headers between its fixed header and the payload, and each header names the type of the one after it. During reassembly a function called find_prev_fhdr() notes where in the packet the field sits that points at the Fragment header, because that field is rewritten once the fragments are joined. The function hands the position back as an ordinary integer. Inside, it kept the working value in a u8, a type that cannot hold a number above 255.

When the chain of extension headers is long enough, that field sits past byte 255 and the stored position wraps around to a small number. Reassembly then rewrites the wrong byte in the header chain. According to the fix commit, conntrack can end up reading a different protocol and port from the ones the kernel uses when it delivers the packet. The commit gives an example of a packet that conntrack records as going to UDP port 53 while its payload arrives at UDP port 9999.

The fix, written by Jérémy Jean and signed off by netfilter maintainer Pablo Neira Ayuso, changes u8 prev_nhoff to int prev_nhoff. Nothing else in the function moves.

The mistake dates from the day this code was written. The commit names the change that added the nf_conntrack subsystem as the origin, and that change went into Linux 2.6.15 about 21 years ago. Every kernel since then carries it.

What It Can and Cannot Do

The kernel CVE team attached a detailed rationale to its score, and it is the best public description of the limits.

An attacker needs no account and no help from a user. They have to be able to send IPv6 packets to the machine, and the machine has to be reassembling IPv6 fragments for conntrack. That module, nf_defrag_ipv6, is active whenever a stateful IPv6 ruleset is loaded, so the precondition is simply having the kind of firewall the flaw gets around. The rationale adds that the outcome is deterministic, with no race to win.

The effect stays inside the packet. The stray byte lands in the packet's own header, in memory the kernel already holds for it, and the rationale states there is "no oops, hang or leak". Availability is scored as unaffected for that reason.

What remains is a wrong firewall verdict. A packet can be judged as traffic to a port you allow and then delivered to a port you block. The CVE team describes the result as exposing locally firewalled UDP and TCP listeners to the sender.

So the question to ask is what your firewall is the only guard for. A database, a cache or an admin interface that listens on every address and trusts the host firewall to keep strangers out is the case to worry about. A service that listens only on loopback cannot be reached from the network with or without a firewall, and a service that asks for a password or a client certificate still asks for it. A server with no global IPv6 address can be reached this way only from its own network segment.

Why the Ratings Differ

WhoRating
Linux kernel CVE team9.1 Critical
Red Hat9.1 Critical
AlmaLinuxCritical
Amazon Linux7.5 Important
SUSEImportant
UbuntuMedium

The spread comes from how each vendor counts the consequences. The kernel team and Red Hat score both confidentiality and integrity as high, on the grounds that a bypassed firewall exposes whatever stands behind it. Amazon counts only the integrity of the firewall decision and arrives at 7.5. NVD had not published its own analysis by December 3.

Our reading sits between them. Patch at your next kernel window if every service behind the firewall also has its own authentication, and move faster if the host firewall is the only thing protecting a port.

Where the Fixed Kernels Are

Upstream, the fix is in these releases and every later one in the same series.

Kernel seriesFirst fixed release
5.105.10.275
5.155.15.226
6.16.1.193
6.66.6.163
6.126.12.119
6.186.18.65
7.37.3.6
Mainline7.4-rc1

Most servers run a distribution kernel, and there the picture on December 3, 2026 was mixed.

DistributionStatus on December 3
RHEL 8Fixed in kernel 4.18.0-553.193.1.el8_10 (RHSA-2026:107608)
AlmaLinux 8Fixed in the same kernel (ALSA-2026:107608)
Rocky Linux 8No advisory yet
RHEL 9 and 10Affected, fix not released
RHEL 6 and 7, extended supportAffected, fix not released
Debian 12 bookwormVulnerable, newest kernel is 6.1.192-3
Debian 13 trixieVulnerable, newest kernel is 6.12.118-1
Debian testing and unstableFixed in 7.3.6-1
Ubuntu, including 22.04, 24.04 and 26.04Fix needed, not released
Amazon Linux 2 and 2023Pending fix
SUSEPending

Distribution kernels backport fixes without changing the upstream version they are named after, so compare your kernel with the vendor's advisory and not with the upstream table. A new kernel also does nothing until the machine boots into it.

# RHEL 8 and AlmaLinux 8
sudo dnf update kernel
sudo reboot

# Debian and Ubuntu, once the fixed package is published
sudo apt update && sudo apt full-upgrade
sudo reboot

After the reboot, run uname -r again and confirm the version matches the advisory.

Checking a Server

Four commands tell you whether a machine is in scope and what it would expose.

ip -6 addr show scope global      # does it have a routable IPv6 address
lsmod | grep nf_defrag_ipv6       # is IPv6 reassembly for conntrack loaded
sudo nft list ruleset | grep -E "ct state|ct status"   # stateful rules in nftables
sudo ss -6 -lntup                 # which services listen on IPv6, and on which address

On a server that still uses the legacy tools, sudo ip6tables-save | grep -E "conntrack|state" shows the same thing as the nftables line. If lsmod prints nothing, the module may be built into the kernel, and grep NF_DEFRAG_IPV6 /boot/config-$(uname -r) settles it.

A machine is in scope when it has a global IPv6 address and the module is loaded. In the ss output, look for listeners bound to [::] or to the global address on ports your firewall does not open to the internet. Those are the ports this flaw could reach, and they set the order in which you patch.

Container hosts count as well. Containers share the kernel of the node they run on, so the node is what needs the update.

A firewall in front of the server, such as a cloud security group or a hardware appliance, filters with its own code before a packet reaches your kernel. It is a second layer worth having. We have not seen a provider state how its filter treats these packets, so do not count it as a fix.

Until Your Distribution Ships the Kernel

Red Hat lists one mitigation, which is to turn IPv6 off on systems that do not need it.

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Put the same two settings in a file under /etc/sysctl.d/ to keep them across reboots. Red Hat warns that this cuts all IPv6 connectivity on the system. Try it on one server first, because a service configured to listen on an IPv6 address can fail to start once the address is gone.

Where IPv6 has to stay on, take the firewall out of the position of sole guard. Bind internal services to loopback or to a private address with bind in Redis, listen_addresses in PostgreSQL and bind-address in MySQL, and turn on authentication where it is off. This is ordinary hardening, and it will still be useful after the kernel is patched.

Some teams will want to drop IPv6 fragments outright as an extra layer. If you do, the hook order matters. The kernel reassembles fragments at netfilter priority -400, and the raw table runs at -300, so an ip6tables -t raw rule only ever sees packets that are already reassembled. In our lab a fragment match placed there counted zero packets. An nftables chain at priority -450 runs before reassembly, and in the same lab this one dropped ordinary fragmented IPv6 traffic while unfragmented traffic passed.

table inet prefrag {
  chain pre {
    type filter hook prerouting priority -450; policy accept;
    exthdr frag exists counter drop
  }
}

Treat it as hardening and not as the fix. We tested it against normal fragmented traffic only, and no vendor lists it as a mitigation for this CVE. It also drops every fragmented IPv6 packet, which can break large DNS answers over UDP and some VPN or tunnel traffic. TCP is rarely fragmented and normally carries on as before.

Found With an AI Assistant

One detail of the fix says something about where kernel security is heading. The commit carries the line Assisted-by: Codex:gpt-5, the tag the kernel uses to disclose that an AI coding tool helped with a patch. The author's address is on oss.cyber.gouv.fr, a domain of ANSSI, the French national cybersecurity agency, and the patch is dated August 22, 2026.

A variable that is one size too small, on a path that only unusual packets ever reach, is the kind of mistake that survives two decades of human review. Tools that read code line by line without getting bored are good at finding it. That is good news for anyone who runs Linux, and it has a practical side. Old bugs will keep turning up at a faster pace, and each one arrives with a kernel update and a reboot. Teams that can reboot a server without drama, through a load balancer, a rolling restart or a short planned window, will get through these as routine work.

What This Means for Your Team

On RHEL 8 and AlmaLinux 8 the fix is a kernel update and a reboot today. Everywhere else, find the servers that have a global IPv6 address and a port that only the host firewall protects, then either turn IPv6 off there or give those services a private bind address and authentication. Watch your distribution's advisory and reboot into the fixed kernel when it lands.

If you look after many servers and want each one checked, hardened and patched on a schedule, our security and compliance work covers that.

Sources

Read how we handle it in Cybersecurity.