{"id":"CVE-2026-139559","aliases":["CVE-2026-139559"],"related":[],"kind":"vulnerability","state":"published","title":"seg6: fix HMAC validation when an extension header precedes the SRH","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nseg6: fix HMAC validation when an extension header precedes the SRH\n\nseg6_hmac_validate_skb() derived the SRH from skb_transport_header().\nThat only holds while the two coincide, which is not true on the\nseg6_local input path.\n\nip6_rcv_core() leaves the transport header just past the IPv6 header.\nA Hop-by-Hop options header is consumed before the route lookup and\nadvances it, but a Destination Options header is not: the seg6_local\nlwtunnel is entered through an input redirect from the route lookup,\nwhich bypasses the extension header handlers. The transport header\nthen still points at the Destination Options header while\nseg6_get_srh() has located the real SRH further down the chain.\n\nThe HMAC is therefore computed over the Destination Options header,\nand a packet carrying a valid HMAC TLV is dropped when\nseg6_require_hmac is set. Such a packet is legitimate: RFC 8200 allows\nDestination Options before a routing header, and get_srh() has walked\nthe header chain since commit 5829d70b0b6c (\"ipv6: sr: fix get_srh() to\ncomply with IPv6 standard \"RFC 8200\"\").\n\nWith a Fragment or an Authentication header in front of the SRH, the\nsame mistake also reads past the data pulled by seg6_get_srh(). This\nhappens before seg6_require_hmac is read, so the default configuration\nis affected.\n\nReproduce by giving a node a seg6local End SID with\nnet.ipv6.conf.<dev>.seg6_require_hmac=1 and a key installed with\n\"ip sr hmac set <keyid> sha1\", then sending\n\n  IPv6 -> Destination Options -> SRH (carrying a valid HMAC TLV) -> payload\n\nto that SID: it is dropped, while the same packet without the\nDestination Options header passes.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nseg6: fix HMAC validation when an extension header precedes the SRH\n\nseg6_hmac_validate_skb() derived the SRH from skb_transport_header().\nThat only holds while the two coincide, which is not true on the\nseg6_local input path.\n\nip6_rcv_core() leaves the transport header just past the IPv6 header.\nA Hop-by-Hop options header is consumed before the route lookup and\nadvances it, but a Destination Options header is not: the seg6_local\nlwtunnel is entered through an input redirect from the route lookup,\nwhich bypasses the extension header handlers. The transport header\nthen still points at the Destination Options header while\nseg6_get_srh() has located the real SRH further down the chain.\n\nThe HMAC is therefore computed over the Destination Options header,\nand a packet carrying a valid HMAC TLV is dropped when\nseg6_require_hmac is set. Such a packet is legitimate: RFC 8200 allows\nDestination Options before a routing header, and get_srh() has walked\nthe header chain since commit 5829d70b0b6c (\"ipv6: sr: fix get_srh() to\ncomply with IPv6 standard \"RFC 8200\"\").\n\nWith a Fragment or an Authentication header in front of the SRH, the\nsame mistake also reads past the data pulled by seg6_get_srh(). This\nhappens before seg6_require_hmac is read, so the default configuration\nis affected.\n\nReproduce by giving a node a seg6local End SID with\nnet.ipv6.conf.<dev>.seg6_require_hmac=1 and a key installed with\n\"ip sr hmac set <keyid> sha1\", then sending\n\n  IPv6 -> Destination Options -> SRH (carrying a valid HMAC TLV) -> payload\n\nto that SID: it is dropped, while the same packet without the\nDestination Options header passes.","source":"cvelist"}],"published":"2026-11-30T13:35:52.842Z","modified":"2026-11-30T14:19:36.577Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"5829d70b0b6cd055e7a9af3abe573927e919e30b","fixed":"bbc1987204ea8eff0b3ea325a2239ec1c956371b","status":"affected"},{"type":"git","introduced":"5829d70b0b6cd055e7a9af3abe573927e919e30b","fixed":"7a854e18c2748ab4b2abb8edb35020d9292165c0","status":"affected"},{"type":"git","introduced":"5829d70b0b6cd055e7a9af3abe573927e919e30b","fixed":"771d35303f7ab9fc7b422ce254269a2868c58809","status":"affected"},{"type":"git","introduced":"5829d70b0b6cd055e7a9af3abe573927e919e30b","fixed":"3c82e978a0b0a45f521b8c200c037d50d66080e8","status":"affected"},{"type":"git","introduced":"5829d70b0b6cd055e7a9af3abe573927e919e30b","fixed":"f9cb4d296d81adb0923546ca5d54fae57a81af52","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.14","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/bbc1987204ea8eff0b3ea325a2239ec1c956371b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7a854e18c2748ab4b2abb8edb35020d9292165c0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/771d35303f7ab9fc7b422ce254269a2868c58809","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3c82e978a0b0a45f521b8c200c037d50d66080e8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f9cb4d296d81adb0923546ca5d54fae57a81af52","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139559","url":"https://www.cve.org/CVERecord?id=CVE-2026-139559","licence":"CVE Terms of Use","modified":"2026-11-30T13:35:52.842Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139559","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139559","licence":"Public domain","modified":"2026-11-30T14:19:36.577Z"}],"updatedAt":"2026-11-30T14:33:13.225Z","epss":{"score":0.00252,"percentile":0.17748,"date":"2026-12-01T12:00:22.000Z"}}