CVE-2026-139559: seg6: fix HMAC validation when an extension header precedes the SRH
In the Linux kernel, the following vulnerability has been resolved:
seg6: fix HMAC validation when an extension header precedes the SRH
seg6hmacvalidateskb() derived the SRH from skbtransportheader(). That only holds while the two coincide, which is not true on the seg6local input path.
ip6rcvcore() leaves the transport header just past the IPv6 header. A Hop-by-Hop options header is consumed before the route lookup and advances it, but a Destination Options header is not: the seg6local lwtunnel is entered through an input redirect from the route lookup, which bypasses the extension header handlers. The transport header then still points at the Destination Options header while seg6getsrh() has located the real SRH further down the chain.
The HMAC is therefore computed over the Destination Options header, and a packet carrying a valid HMAC TLV is dropped when seg6requirehmac is set. Such a packet is legitimate: RFC 8200 allows Destination Options before a routing header, and getsrh() has walked the header chain since commit 5829d70b0b6c ("ipv6: sr: fix getsrh() to comply with IPv6 standard "RFC 8200"").
With a Fragment or an Authentication header in front of the SRH, the same mistake also reads past the data pulled by seg6getsrh(). This happens before seg6requirehmac is read, so the default configuration is affected.
Reproduce by giving a node a seg6local End SID with net.ipv6.conf.<dev>.seg6requirehmac=1 and a key installed with "ip sr hmac set <keyid> sha1", then sending
IPv6 -> Destination Options -> SRH (carrying a valid HMAC TLV) -> payload
to that SID: it is dropped, while the same packet without the Destination Options header passes.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1
Event History
Frequently Asked Questions
Which systems are affected in practice?
Systems using the Linux kernel's SEG6 local processing path with seg6_require_hmac enabled are affected when packets place certain IPv6 extension headers, including Destination Options, before the Segment Routing Header (SRH).
What is the observable impact?
Legitimate packets carrying a valid HMAC TLV can be dropped because the HMAC is computed over the wrong header when the transport header still points to a preceding extension header. This can affect valid RFC 8200-compliant packets with Destination Options before a routing header.
Is HMAC enforcement required for the problem to occur?
Yes. The described packet drop occurs when seg6_require_hmac is set; the validation uses the wrong header location and rejects a packet whose HMAC TLV is valid.