In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_inner: Fix IPv6 inner_thoff desync In nft_inner_parse_l2l3(), when processing inner IPv6 packets, ipv6_find_hdr() correctly computes the transport header offset traversing all extension headers, but the result is immediately overwritten with nhoff + sizeof(_ip6h) (40 bytes), which only accounts for the IPv6 base header. This creates a desync between inner_thoff (wrong — points to extension header start) and l4proto (correct — e.g., IPPROTO_TCP), enabling transport header forgery and potential firewall bypass. This issue affects stable versions from Linux 6.2. For comparison, the normal (non-inner) IPv6 path correctly preserves ipv6_find_hdr()'s result. Removing the incorrect overwrite ensures that ipv6_find_hdr()'s calculated transport header offset is preserved, thereby fixing the desynchronization.
In the nft_inner_parse_l2l3() function processing internal IPv6 packets, the ipv6_find_hdr() function correctly calculates the transport header offset by traversing all extension headers. However, this result is immediately overwritten by the value nhoff + sizeof(_ip6h) (40 bytes), which accounts only for the basic IPv6 header. The consequence is desynchronization: the inner_thoff field incorrectly points to the beginning of extension headers, while l4proto contains the correct value (e.g., IPPROTO_TCP). This discrepancy allows crafting a packet that the netfilter engine will evaluate inconsistently with the actual structure of its headers.
A remote attacker without authentication can forge the transport header of an internal IPv6 packet, leading to bypassing firewall rules based on netfilter/nftables. The vulnerability results in unauthorized access to protected network resources (high confidentiality and integrity — no impact on availability).
Patches available from the vendor should be applied according to references (commits available in the kernel.org repository: 689bbf48c1f4, 870d59e2cf21, b6a91f68ebfe, c161ad9157f5, d0f98a3617f6). It is recommended to update the Linux kernel to a version containing the fix for the stable branch being used.
Stable Linux kernel versions from version 6.2 using the netfilter nft_inner module with support for internal IPv6 packets.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NLinux Kernel
OSLinux7.16.2 – 6.6.142 (excl.)6.7 – 6.12.92 (excl.)6.13 – 6.18.34 (excl.)6.19 – 7.0.11 (excl.)
Related vulnerabilities
Type confusion w V8 (Google Chrome) — zdalne uszkodzenie sterty
Commvault Command Center – nieuwierzytelniony RCE przez path traversal w ZIP
RCE przez YAML deserialization w IBM Aspera Faspex
RCE w VMware Workspace ONE Access i Identity Manager poprzez server-side template injection
Command Injection w VMware Workspace One Access i Identity Manager