* CVE-2026-139559: seg6: fix HMAC validation when an extension header precedes the SRH
@ 2026-11-30 13:39 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-11-30 13:39 UTC (permalink / raw)
To: linux-cve-announce; +Cc: Greg Kroah-Hartman
From: Greg Kroah-Hartman <gregkh@kernel.org>
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.
The Linux kernel CVE team has assigned CVE-2026-139559 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.14 with commit 5829d70b0b6cd055e7a9af3abe573927e919e30b and fixed in 6.6.163 with commit bbc1987204ea8eff0b3ea325a2239ec1c956371b
Issue introduced in 4.14 with commit 5829d70b0b6cd055e7a9af3abe573927e919e30b and fixed in 6.12.119 with commit 7a854e18c2748ab4b2abb8edb35020d9292165c0
Issue introduced in 4.14 with commit 5829d70b0b6cd055e7a9af3abe573927e919e30b and fixed in 6.18.65 with commit 771d35303f7ab9fc7b422ce254269a2868c58809
Issue introduced in 4.14 with commit 5829d70b0b6cd055e7a9af3abe573927e919e30b and fixed in 7.3.6 with commit 3c82e978a0b0a45f521b8c200c037d50d66080e8
Issue introduced in 4.14 with commit 5829d70b0b6cd055e7a9af3abe573927e919e30b and fixed in 7.4-rc1 with commit f9cb4d296d81adb0923546ca5d54fae57a81af52
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-139559
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
include/net/seg6_hmac.h
net/ipv6/exthdrs.c
net/ipv6/seg6_hmac.c
net/ipv6/seg6_local.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/bbc1987204ea8eff0b3ea325a2239ec1c956371b
https://git.kernel.org/stable/c/7a854e18c2748ab4b2abb8edb35020d9292165c0
https://git.kernel.org/stable/c/771d35303f7ab9fc7b422ce254269a2868c58809
https://git.kernel.org/stable/c/3c82e978a0b0a45f521b8c200c037d50d66080e8
https://git.kernel.org/stable/c/f9cb4d296d81adb0923546ca5d54fae57a81af52
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-30 14:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:39 CVE-2026-139559: seg6: fix HMAC validation when an extension header precedes the SRH Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.