CVE-2026-139559

seg6: fix HMAC validation when an extension header precedes the SRH

Published Nov 30, 2026 CVSS n/a EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

seg6: fix HMAC validation when an extension header precedes the SRH

seg6_hmac_validate_skb() derived the SRH from skb_transport_header().
That only holds while the two coincide, which is not true on the
seg6_local input path.

ip6_rcv_core() 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 seg6_local
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
seg6_get_srh() 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
seg6_require_hmac is set. Such a packet is legitimate: RFC 8200 allows
Destination Options before a routing header, and get_srh() has walked
the header chain since commit 5829d70b0b6c ("ipv6: sr: fix get_srh() 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 seg6_get_srh(). This
happens before seg6_require_hmac is read, so the default configuration
is affected.

Reproduce by giving a node a seg6local End SID with
net.ipv6.conf.<dev>.seg6_require_hmac=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.

Analysis

AI-generated

Technical impact

The Linux kernel contains a bug where the seg6_hmac_validate_skb function derives the Segment Routing Header (SRH) from the transport header, which is only correct when those headers coincide. On the seg6_local input path, a Destination Options header can precede the SRH, causing the HMAC to be calculated over the wrong header. Because RFC 8200 permits this ordering, packets carrying a valid HMAC on the real SRH are incorrectly dropped when the seg6_require_hmac check is enabled, resulting in legitimate traffic loss.

Affected Systems

This flaw affects any system running a Linux kernel that has enabled the seg6_local LWTunnel with the sysctl net.ipv6.conf.<dev>.seg6_require_hmac=1 and has a segment‑routing HMAC key configured via "ip sr hmac set <keyid> sha1". Only kernels prior to the commit that applied the seg6_hmac_validate_skb fix are vulnerable; later kernels have corrected the SRH retrieval logic.

Risk and Exploitability

The vulnerability does not provide an attacker with elevated privileges or data exfiltration capabilities. It can be leveraged to cause a denial of service by an adversary who sends crafted IPv6 packets that include a Destination Options header immediately before a valid SRH and HMAC. Public exploits are not listed in the CISA KEV catalog and no EPSS score is available, indicating that attacks are currently unproven but plausible against exposed seg6_local traffic.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version containing the seg6_hmac_validate_skb patch.
  • If a kernel upgrade is not immediately possible, disable the seg6_require_hmac check by setting net.ipv6.conf.<dev>.seg6_require_hmac=0 to prevent packet drops.
  • Where seg6_require_hmac must remain enabled, reconfigure the network flow to avoid placing Destination Options headers before the SRH.

Generated by OpenCVE AI on December 1, 2026 at 17:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: seg6: fix HMAC validation when an extension header precedes the SRH seg6_hmac_validate_skb() derived the SRH from skb_transport_header(). That only holds while the two coincide, which is not true on the seg6_local input path. ip6_rcv_core() 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 seg6_local 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 seg6_get_srh() 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 seg6_require_hmac is set. Such a packet is legitimate: RFC 8200 allows Destination Options before a routing header, and get_srh() has walked the header chain since commit 5829d70b0b6c ("ipv6: sr: fix get_srh() 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 seg6_get_srh(). This happens before seg6_require_hmac is read, so the default configuration is affected. Reproduce by giving a node a seg6local End SID with net.ipv6.conf.<dev>.seg6_require_hmac=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.
Title seg6: fix HMAC validation when an extension header precedes the SRH
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:35 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM