CVE-2026-139281 PUBLISHED

netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset

Assigner: Linux
Reserved: 30.11.2026 Published: 30.11.2026 Updated: 01.12.2026

In the Linux kernel, the following vulnerability has been resolved:

netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset

find_prev_fhdr() returns the offset of the Next Header field before an IPv6 Fragment header through an int pointer, but stores the offset in a u8 local. An extension header chain can put this field beyond byte 255, causing the offset to wrap before it is saved in the fragment queue.

Reassembly later uses the wrapped value to update the preceding Next Header field. This overwrites another byte in the IPv6 header chain and can make conntrack parse a different transport tuple from the one used by IPv6 local delivery. A two-fragment packet can, for example, be recorded as UDP destination port 53 while its payload is delivered to UDP port 9999.

Use int for the working offset, matching the output argument and the other offset variables in this path.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS Score: 9.1

AV:N - The extension-header chain and Fragment header walked by find_prev_fhdr() arrive in remote IPv6 fragments via ipv6_rcv -> NF_INET_PRE_ROUTING -> ipv6_defrag -> nf_ct_frag6_gather; the sender alone builds a chain whose pre-fragment Next Header field lies past byte 255, and the transport is routable IPv6. AC:L - The sender chooses both the wrapped offset and the byte nf_ct_frag6_reasm() writes there (the Fragment header's nexthdr), and the write happens deterministically when the queue completes, with no race. The only precondition is an active nf_defrag_ipv6, which is present whenever the IPv6 conntrack filtering being bypassed is configured. PR:N - nf_ct_frag6_gather() runs on every received IPv6 fragment before any filtering or socket lookup, so the attacker only sends packets and needs no account or credentials. The ruleset that registers the defrag hook is the victim's configuration, not an attacker privilege. UI:N - No user action is involved; the kernel automatically reassembles the fragments in PRE_ROUTING and then classifies and delivers the result. S:U - The effect is a wrong verdict by the host's own netfilter policy and a misparse in the host's own IPv6 input path; no VM, container or IOMMU boundary is crossed. C:H - After the truncated write, ipv6_get_l4proto() and ipv6_find_hdr() walk the chain from the IPv6 header and classify one L4 header, while ip6_protocol_deliver_rcu() uses IP6CB->nhoff and the reset transport header and delivers another. This exposes locally firewalled UDP/TCP listeners and their data to the sender. I:H - The sender sets the tuple that conntrack records and nftables/ip6tables match (e.g. allowed UDP 53) independently of the tuple delivered (e.g. UDP 9999, per the fix commit), defeating the inbound packet-filter policy for arbitrary ports. The stray byte write also corrupts the reassembled packet's header. A:N - skb_network_header(skb)[fq->nhoffset] lands at a smaller offset than the real field, inside the first fragment's linear header already pulled by pskb_may_pull(skb, fhoff + sizeof(*fhdr)). No memory outside the packet is corrupted, and there is no oops, hang or leak.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to c540c1de02e9bc08a9880cee39a4757ef23365c9 (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to 150100520016209a46a0419edc41d1c94ebc7f66 (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to 6448b59ff3c83d9f4edc73c082eab7989ebe8e57 (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to 3468d5cb0cbfdc4b1bfa3d5e7ed8ed50c7ac9f5a (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to 55cd1d227de0caa8ab5e0440c2701d3b438d3fb6 (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to c6168a32eb25ec8f35e894c3851b87a013fd5b42 (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to 2004d38294264f89495e09337cba1b1f5bd1db43 (excl.)
  • affected from 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 to 48d522b65fb0ce2bd54f8f5838d77b48afcf1f3e (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 2.6.15 is affected
  • unaffected from 0 to 2.6.15 (excl.)
  • unaffected from 5.10.275 to 5.10.* (incl.)
  • unaffected from 5.15.226 to 5.15.* (incl.)
  • unaffected from 6.1.193 to 6.1.* (incl.)
  • unaffected from 6.6.163 to 6.6.* (incl.)
  • unaffected from 6.12.119 to 6.12.* (incl.)
  • unaffected from 6.18.65 to 6.18.* (incl.)
  • unaffected from 7.3.6 to 7.3.* (incl.)
  • unaffected from 7.4-rc1 to * (incl.)

References