Skip to contentSkip to conversation

CVE-2026-72400: seg6: validate SRH length before reading fixed fields

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

seg6: validate SRH length before reading fixed fields

seg6_validate_srh() reads fixed SRH fields such as srh->type and srh->hdrlen before checking that the supplied length covers the fixed struct ipv6_sr_hdr fields.

The BPF SEG6 encap path reaches this with a BPF program-supplied pointer and length: bpf_lwt_push_encap() and the SEG6 local BPF END_B6 and END_B6_ENCAP actions call bpf_push_seg6_encap(), which forwards the length to seg6_validate_srh() with no minimum-size guard. A 2-byte SEG6 encap header can therefore make the validator read srh->type at offset 2 beyond the caller-supplied buffer.

Reject lengths shorter than the fixed SRH at the top of seg6_validate_srh(), before any field is read. This fixes the BPF helper path and keeps the common validator robust.

The Linux kernel CVE team has assigned CVE-2026-72400 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 5.10.261 with commit 715eb12e453df752f1b4baaf972c3acff0ab9402
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 5.15.212 with commit 7247d05c987c3eec4bb7c2306dbd77ecdf3b7c73
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 6.1.178 with commit 071f1a38d7ddbadee29c09b9e3ee0ff3a61e6a0e
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 6.6.145 with commit 804bb969f194c93497ba632b98343794c6367fdc
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 6.12.97 with commit 0fc7069d39239978130c37ebceaec85c8948d3f1
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 6.18.40 with commit 8dba7a94a269b88e500aafc25ad567ef6a423698
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 7.1.5 with commit c9961336aa5ff83092f23e33ee86666a9dbd1b2a
	Issue introduced in 4.18 with commit fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 and fixed in 7.2-rc2 with commit a75d99f46bf21b45965ce39c5cfb3b8bb5ffb1aa

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-72400

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:

	net/ipv6/seg6.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/715eb12e453df752f1b4baaf972c3acff0ab9402
	https://git.kernel.org/stable/c/7247d05c987c3eec4bb7c2306dbd77ecdf3b7c73
	https://git.kernel.org/stable/c/071f1a38d7ddbadee29c09b9e3ee0ff3a61e6a0e
	https://git.kernel.org/stable/c/804bb969f194c93497ba632b98343794c6367fdc
	https://git.kernel.org/stable/c/0fc7069d39239978130c37ebceaec85c8948d3f1
	https://git.kernel.org/stable/c/8dba7a94a269b88e500aafc25ad567ef6a423698
	https://git.kernel.org/stable/c/c9961336aa5ff83092f23e33ee86666a9dbd1b2a
	https://git.kernel.org/stable/c/a75d99f46bf21b45965ce39c5cfb3b8bb5ffb1aa