79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Linux Kernel IPv6 Conntrack Firewall Bypass (CVE-2026-139281)

A Linux kernel offset truncation lets remote IPv6 fragments slip past stateful firewall rules; fixed in 7.3.6 and stable branches.

TL;DR

  • A u8 in IPv6 fragment reassembly wraps the saved header offset, so Netfilter conntrack can record a different destination than the one the packet reaches. Red Hat rates the flaw Critical at CVSS v3.1 9.1.
  • Linux kernels from 2.6.15 through the first fixed release of each maintained branch are affected when stateful IPv6 firewalling uses conntrack.
  • No public proof of concept and no confirmed in-the-wild exploitation are reported. The CVE is not in CISA KEV as of 2026-12-04 (catalog 2026.11.30).
  • Update to the first fixed release for your branch and reboot. "How do I fix it?" lists the seven versions.

Am I affected?

You are affected if the host runs a vulnerable kernel and its own stateful IPv6 rules are the barrier that protects a service. All of these must hold:

  • The kernel is 2.6.15 or later and older than the first fixed release for its branch.
  • The host processes IPv6 and loads Netfilter connection tracking (nf_conntrack) with IPv6 defragmentation (nf_defrag_ipv6).
  • At least one firewall or NAT rule depends on conntrack state to accept or drop IPv6 traffic.
  • An attacker can send IPv6 fragments to the host, directly or through an upstream router that forwards them.

A host with IPv6 disabled, or one that runs no conntrack rule on the IPv6 path, does not reach the vulnerable code through this route. A host behind an upstream firewall is still exposed if fragments reach its own stack and its own rules are the last barrier. A container shares the host kernel, so the host kernel and the host ruleset decide exposure.

The CVE record lists a fixed release for seven maintained branches. It lists no fixed release for the 6.19, 7.0, 7.1 and 7.2 lines, so those lines are affected with no fix in the record. The mainline fix arrived in 7.4-rc1.

Branch Affected versions Fixed version
7.3 every release before 7.3.6 7.3.6 (7.3.7 is current)
6.18 every release before 6.18.65 6.18.65 (6.18.66 is current)
6.12 every release before 6.12.119 6.12.119
6.6 every release before 6.6.163 6.6.163
6.1 every release before 6.1.193 6.1.193
5.15 every release before 5.15.226 5.15.226
5.10 every release before 5.10.275 5.10.275
6.19, 7.0, 7.1 and 7.2 every release in those lines no fixed release listed; move to 7.3.7
7.4-rc1 and later not affected 7.4-rc1

Check the running kernel first:

uname -r

Then check whether conntrack and IPv6 defragmentation are enabled. If /boot/config-$(uname -r) is not present, read /proc/config.gz instead:

grep -E '^CONFIG_NF_CONNTRACK=|^CONFIG_NF_DEFRAG_IPV6=' /boot/config-$(uname -r)
zgrep -E '^CONFIG_NF_CONNTRACK=|^CONFIG_NF_DEFRAG_IPV6=' /proc/config.gz

Check whether the host's IPv6 rules use conntrack, and whether the host has global IPv6 addresses:

sudo nft list ruleset | grep -E 'ct (state|status)|conntrack' | head
sudo iptables-save | grep -i conntrack | head
ip -6 addr show scope global

A y or m for both config options and at least one ct or conntrack rule means the host uses the vulnerable path. A host with no global IPv6 address is not reachable over IPv6, but it can still be affected if IPv6 is enabled later.

How do I fix it?

Install the first fixed release for your branch, or any later release on that branch, and reboot. The fix is in the kernel, so a container image update does not change it.

  1. Identify the branch and the running kernel with uname -r.
  2. Install the fixed kernel for that branch. For a self-built kernel, download 7.3.7 or 6.18.66 from kernel.org and build it.
  3. On Red Hat Enterprise Linux 8, apply RHSA-2026:107608 with sudo dnf update kernel.
  4. On Red Hat Enterprise Linux 6 Extended Lifecycle Support, apply RHSA-2026:107921 with sudo yum update kernel.
  5. Reboot. The new kernel does not run until the host restarts, unless your vendor ships a livepatch for this CVE.
  6. On Debian, bookworm and trixie were still listed as vulnerable on 2026-12-04. Track the Debian security tracker entry and install the fixed package when it appears.
  7. On a container host, update the host kernel and the host ruleset. Updating a container image leaves the shared kernel unchanged.

If the host does not need IPv6, Red Hat suggests disabling it as a mitigation. Debian lists no workaround for its kernel.

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

To keep the setting after a reboot:

echo 'net.ipv6.conf.all.disable_ipv6=1' | sudo tee /etc/sysctl.d/99-disable-ipv6.conf

Disabling IPv6 removes the attack path on that host. It also breaks every IPv6 service, including monitoring and internal traffic, and it does not fix the kernel. A host that needs IPv6 should be patched rather than left with the workaround.

What is the root cause?

A u8 local truncates the byte offset of the Next Header field that precedes an IPv6 Fragment header. A long extension-header chain then makes reassembly write the transport protocol byte to the wrong place. The function that finds the Fragment header is find_prev_fhdr() in net/ipv6/netfilter/nf_conntrack_reasm.c. Netfilter conntrack calls it on the first IPv6 fragment before any firewall rule runs.

static int
find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff)
{
    u8 nexthdr = ipv6_hdr(skb)->nexthdr;
    const int netoff = skb_network_offset(skb);
    u8 prev_nhoff = netoff + offsetof(struct ipv6hdr, nexthdr);   /* line 401 */
    int start = netoff + sizeof(struct ipv6hdr);
    int len = skb->len - start;
    u8 prevhdr = NEXTHDR_IPV6;

    while (nexthdr != NEXTHDR_FRAGMENT) {
        /* ... bounds checks and header copy ... */
        prevhdr = nexthdr;
        prev_nhoff = start;                                    /* line 429 */
        nexthdr = hdr.nexthdr;
        len -= hdrlen;
        start += hdrlen;
    }

    if (len < 0)
        return -1;

    *prevhdrp = prevhdr;
    *prevhoff = prev_nhoff;                                        /* line 440 */
    *fhoff = start;

    return 0;
}

netoff is the offset of the IPv6 header in the packet. prev_nhoff starts at the IPv6 header's own Next Header field. Each time the loop walks one extension header, it sets prev_nhoff to start, the offset of that header's Next Header field.

start is an int and grows by each header's length. prev_nhoff is a u8, so a value greater than 255 wraps modulo 256 before it reaches the int *prevhoff output argument.

nf_ct_frag6_gather() passes that value to nf_ct_frag6_queue(), which stores it in the fragment queue when the first fragment arrives:

    if (offset == 0) {
        fq->nhoffset = nhoff;      /* line 283, nhoff holds the truncated value */
        fq->q.flags |= INET_FRAG_FIRST_IN;
    }

When both fragments are present, nf_ct_frag6_reasm() removes the Fragment header and updates the preceding Next Header field so the header chain stays valid:

    skb_network_header(skb)[fq->nhoffset] = skb_transport_header(skb)[0];  /* line 348 */

The byte on the right is the Fragment header's Next Header value, which is the transport protocol of the payload. The index on the left is the wrapped offset. The write lands on a byte of the first fragment's header chain that is not the intended Next Header field.

Conntrack then parses the modified chain from the IPv6 header and records one transport tuple. The IPv6 input path keeps its own header offset and delivers the payload to another. A stateful rule that matches the recorded tuple can therefore accept traffic that the host delivers to a different port.

How is it exploited?

The attack is a two-fragment IPv6 packet with a long extension-header chain. No public exploit code is available. These steps follow the patch and the CVE record.

  1. The attacker builds an IPv6 packet whose extension-header chain is long enough that the Next Header field before the Fragment header sits past byte 255.
  2. The chain ends with a Fragment header, and the attacker splits the payload into two fragments.
  3. find_prev_fhdr() saves the pre-fragment offset in the u8 local, so the value wraps.
  4. The fragment queue stores the wrapped offset and reassembles the packet when the second fragment arrives.
  5. Reassembly writes the Fragment header's Next Header byte at the wrapped offset, which corrupts a different byte of the header chain.
  6. Conntrack parses the corrupted chain and records a tuple the attacker chose, for example UDP destination port 53.
  7. IPv6 delivery uses the original chain and hands the payload to the real service, for example UDP port 9999.
  8. A stateful rule that allows the recorded tuple passes traffic to a port it was meant to block.

The attacker needs no credentials and no user action. The packet must reach the host over IPv6, and the host must run conntrack with IPv6 defragmentation on that path. An upstream firewall that drops IPv6 fragments before they reach the host prevents the attack at that hop.

How does the attack flow?

A long IPv6 extension-header chain wraps the saved offset. Reassembly then writes the protocol byte to the wrong header position, and conntrack records a tuple that differs from the one the host delivers.

flowchart LR A["IPv6 fragments with a long extension-header chain"] --> B["find_prev_fhdr() saves the offset in a u8"] B --> C["offset wraps past byte 255: no range check"] C --> D["reassembly writes the Next Header byte at the wrapped offset"] D --> E["conntrack records a different tuple"] E --> F["firewall rule allows the recorded tuple"] F --> G["payload reaches a blocked service"]

What can an attacker do?

An attacker can reach IPv6 services that the host's stateful rules were meant to block, read their responses and send requests to them. Red Hat scores confidentiality and integrity as High and availability as None. The demonstrated impact is data exposure and unauthorized requests, not a crash or code execution.

The impact needs all of these conditions:

  • The host runs a vulnerable kernel with conntrack and IPv6 defragmentation active.
  • The attacker can send IPv6 fragments to the host.
  • The host's own ruleset is the barrier in front of the target service.
  • A rule's verdict depends on the tuple conntrack records.

The flaw corrupts only bytes inside the reassembled packet's header chain. It does not write outside the packet buffer, so it does not by itself give kernel memory corruption or a denial of service. A host that filters IPv6 fragments upstream, or that does not rely on conntrack for the protected service, is not bypassed by this mechanism.

Why does the fix work?

The fix changes the local variable from u8 to int, so the offset keeps its full value and reassembly writes the protocol byte to the real Next Header field.

--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -398,7 +398,7 @@ find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff)
 {
    u8 nexthdr = ipv6_hdr(skb)->nexthdr;
    const int netoff = skb_network_offset(skb);
-   u8 prev_nhoff = netoff + offsetof(struct ipv6hdr, nexthdr);
+   int prev_nhoff = netoff + offsetof(struct ipv6hdr, nexthdr);
    int start = netoff + sizeof(struct ipv6hdr);
    int len = skb->len - start;
    u8 prevhdr = NEXTHDR_IPV6;

The patch is one declaration. The other offsets in the function are already int, and prev_nhoff is the only value that carried the offset through a narrower type. With an int, the value stored in fq->nhoffset matches the real field, so the write in nf_ct_frag6_reasm() updates the intended byte. The fix removes the truncation rather than narrowing its effect.

How do I check if I was compromised?

No indicators of compromise are published for CVE-2026-139281, and the patch adds no log message for this event. A successful bypass looks like ordinary traffic to the service that received it, so there is no reliable local trace to search.

If you suspect a bypass, compare the IPv6 services that answered with the rules that should have blocked them. Review service logs for connections from sources that your ruleset should have dropped. Check whether the destination port in the service log differs from the port conntrack recorded.

A mismatch is a lead, not proof, because NAT, proxies and application routing can also change the observed tuple. An attempt that fails may leave no trace at all.

Timeline

  • 2026-08-22: Jérémy Jean posted the patch to the Netfilter mailing list.
  • 2026-10-19: The patch was merged into the mainline kernel.
  • 2026-11-01: Linux 7.4-rc1 was tagged with the fix.
  • 2026-11-23: The first fixed stable releases shipped on all seven maintained branches.
  • 2026-11-30: CVE-2026-139281 was published, and Red Hat published its Critical rating.
  • 2026-12-03: Red Hat shipped RHSA-2026:107608 for RHEL 8 and RHSA-2026:107921 for RHEL 6 ELS.

The public patch to the first fixed stable releases took 93 days, and the CVE record followed 7 days after that.

The fix moved from a public patch to seven fixed stable branches in 93 days
Figure 1: The patch, the mainline merge, 7.4-rc1, the first stable releases, the CVE record and the RHEL errata. Source: Linux kernel commit 48d522b6, CVE-2026-139281 and Red Hat, checked December 4, 2026

FAQ

Does this affect IPv4?

No. The truncation is in find_prev_fhdr(), which walks the IPv6 extension-header chain before an IPv6 Fragment header. The IPv4 conntrack reassembly path does not call it.

I use nftables without a conntrack rule. Am I affected?

No, if no rule on the IPv6 path uses ct state and no NAT or defrag hook is active. The vulnerable function runs from nf_ct_frag6_gather(), which is reached through the IPv6 defragmentation hook that conntrack registers. A host that only uses stateless IPv6 filters does not reach it through this path.

Is there a public exploit?

No public exploit code is published. The CVE record and the patch describe the mechanism, and Red Hat's analysis gives the UDP 53 to UDP 9999 example, but neither includes a packet generator.

Is CVE-2026-139281 in CISA KEV?

No. The CISA KEV catalog was at version 2026.11.30 with 1,810 records on 2026-12-04, and this CVE is not in it. No in-the-wild exploitation is confirmed in the sources checked.

Was AI used to find or fix the bug?

The upstream commit carries an Assisted-by: Codex:gpt-5 trailer. The commit does not say whether the model found the bug, wrote the fix or checked it, so the extent of the assistance is not public.

I run Debian stable. What should I do?

Debian's tracker listed bookworm and trixie as vulnerable on 2026-12-04, including the kernels in its security channels. Track the tracker entry and install the fixed package when Debian publishes it. If the host does not need IPv6, disabling IPv6 removes the attack path until then.

Find exposed IPv6 hosts with Ostorlab

Ostorlab's attack surface discovery inventories the internet-facing hosts and services your organisation exposes. It shows which ones answer over IPv6, so you can patch the kernel behind them first. It maps the surface; the kernel update and the firewall review remain yours.

References

  • Red Hat, "CVE-2026-139281" security data, threat severity Critical, CVSS v3.1 9.1, published 2026-11-30 (checked December 4, 2026): https://access.redhat.com/security/cve/CVE-2026-139281
  • Red Hat, "RHSA-2026:107608" kernel security update for RHEL 8, published 2026-12-03 (checked December 4, 2026): https://access.redhat.com/errata/RHSA-2026:107608
  • Red Hat, "RHSA-2026:107921" kernel security update for RHEL 6 Extended Lifecycle Support, published 2026-12-03 (checked December 4, 2026): https://access.redhat.com/errata/RHSA-2026:107921
  • CVE Program, "CVE-2026-139281" record, published 2026-11-30 (checked December 4, 2026): https://www.cve.org/CVERecord?id=CVE-2026-139281
  • Linux kernel, "netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset", commit 48d522b65fb0ce2bd54f8f5838d77b48afcf1f3e, merged 2026-10-19 (checked December 4, 2026): https://github.com/torvalds/linux/commit/48d522b65fb0ce2bd54f8f5838d77b48afcf1f3e
  • Linux kernel stable, backport c540c1de02e9bc08a9880cee39a4757ef23365c9, author date 2026-08-22 (checked December 4, 2026): https://github.com/gregkh/linux/commit/c540c1de02e9bc08a9880cee39a4757ef23365c9
  • kernel.org, Linux 6.x and 7.x release listings with tarball dates (checked December 4, 2026): https://cdn.kernel.org/pub/linux/kernel/v7.x/
  • Debian Security Tracker, "CVE-2026-139281" package status, checked 2026-12-04 (checked December 4, 2026): https://security-tracker.debian.org/tracker/CVE-2026-139281
  • CISA, Known Exploited Vulnerabilities catalog, version 2026.11.30, 1,810 records (checked December 4, 2026): https://www.cisa.gov/known-exploited-vulnerabilities-catalog
  • The Hacker News, "Critical 21-Year-Old Linux Kernel Flaw Lets Attackers Bypass Firewalls with Crafted IPv6 Packets", published 2026-12-03 (checked December 4, 2026): https://thehackernews.com/2026/12/critical-21-year-old-linux-kernel-flaw.html

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog