CVE-2026-139281: how one wrong variable type let IPv6 packets dodge Linux firewall rules since 2006
A one-line bug in the Linux kernel's connection tracking let a crafted IPv6 packet look like one thing to the firewall and be delivered as another. Red Hat rates it 9.1, and it has been there since conntrack arrived in Linux 2.6.15 in January 2006. This page explains the bug in plain words and shows how to check your own machines.
Read the original first: https://lkml.iu.edu/hypermail/linux/kernel/2608.2/11966.html
In one minute
- CVE-2026-139281 is a bug in conntrack, the part of the Linux kernel that lets a firewall remember connections.
- A long chain of IPv6 extension headers pushes one stored position past 255. The value wraps around, and the kernel later writes to the wrong byte.
- The result: the firewall can see a packet as going to UDP port 53 while the machine delivers it to UDP port 9999. That is the patch's own example.
- Red Hat rates it 9.1 and Critical. No login and no user action are needed.
- The bug dates to Linux 2.6.15 (January 2006). The fix changes one word: u8 becomes int.
- No attacks were publicly confirmed when The Hacker News reported it. Update the kernel; Red Hat says turning off IPv6 blocks the remote attack where IPv6 is not needed.
What conntrack does
Most Linux firewalls are stateful. They let a reply in because they remember the request that went out. The part of the kernel that remembers is called conntrack (connection tracking).
To remember a connection, conntrack reads each packet's address, protocol and port. Firewall rules then decide using what conntrack read.
IPv6 packets can be split into fragments. Before conntrack can read a split packet, the kernel puts the pieces back together. That step is called reassembly.
The bug, in plain words
An IPv6 packet can carry a chain of extra headers before the real data. Each header says what comes next, in a one-byte field called Next Header.
During reassembly, a function called find_prev_fhdr() finds where that Next Header field sits, as a count of bytes from the start. The patch says the function hands the answer back as an int, but the code stored it in a u8.
A u8 can only hold 0 to 255. If the attacker adds enough extra headers, the real position is past byte 255, so the stored number wraps around to a small one.
Later, the kernel uses that wrong number to patch the header chain. It overwrites a different byte than it meant to.
Now conntrack and the part of the kernel that delivers the packet disagree about what the packet is. The patch gives an example: a two-fragment packet recorded as UDP port 53 (DNS, often allowed) while its data goes to UDP port 9999.
So a rule like "allow DNS, block everything else" can be walked around.
The fix
The fix changes one line in net/ipv6/netfilter/nf_conntrack_reasm.c: the variable prev_nhoff becomes an int instead of a u8. That matches the other offset variables in the same code.
The patch was posted to the kernel mailing list on August 22. The Hacker News reports it was merged on October 19 and reached mainline in 7.4-rc1 on November 1.
The patch carries an "Assisted-by: Codex:gpt-5" line. It does not say what the help covered.
Check your machines
First, see which kernel you run, then compare it with the table below or your distribution's notice.
uname -r
Second, see if IPv6 is on. A 0 means IPv6 is on; a 1 means it is off for all interfaces.
sysctl net.ipv6.conf.all.disable_ipv6
Third, see if conntrack is loaded. If it is not, this firewall bypass does not apply to that machine.
lsmod | grep nf_conntrack
- A machine with IPv6 on, conntrack loaded and an old kernel is the one to update first, above all if it is a firewall or router.
- Red Hat's stopgap is to turn off IPv6, but only on systems that do not need it.
Who is affected
| Case | Status |
|---|---|
| Linux kernels since 2.6.15 with IPv6 conntrack in use | Affected until updated. |
| 5.10 / 5.15 / 6.1 branches | First fixed in 5.10.275, 5.15.226 and 6.1.193 (per The Hacker News). |
| 6.6 / 6.12 / 6.18 branches | First fixed in 6.6.163, 6.12.119 and 6.18.65 (per The Hacker News). |
| 7.3 branch and mainline | First fixed in 7.3.6 and 7.4-rc1 (per The Hacker News). |
| RHEL 8 | Kernel update shipped (RHSA-2026:107608). |
| Debian bookworm and trixie | Listed as vulnerable in Debian's tracker when The Hacker News reported it. |
What to do
- Update the kernel to a fixed release for your branch, then reboot.
- Do firewalls, routers and any host that relies on IPv6 rules first.
- If you can not update yet and do not need IPv6, turn it off (Red Hat's stopgap).
- Watch your distribution's security tracker for the fixed package.
What is still unknown
- Whether anyone has used the bug. No attacks were publicly confirmed when it was reported.
- Exact fixed package versions for every distribution. Check your vendor's notice.
- Which part of the work the AI assistant named in the patch helped with.
Sources
- Jérémy Jean: netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset (LKML, Aug. 22, 2026) - the original report
- Red Hat: CVE-2026-139281
- The Hacker News: Critical 21-Year-Old Linux Kernel Flaw Lets Attackers Bypass Firewalls with Crafted IPv6 Packets
- Debian security tracker: CVE-2026-139281