CVE-2026-72400: seg6: validate SRH length before reading fixed fields
In the Linux kernel, the following vulnerability has been resolved:
seg6: validate SRH length before reading fixed fields
seg6validatesrh() reads fixed SRH fields such as srh->type and srh->hdrlen before checking that the supplied length covers the fixed struct ipv6srhdr fields.
The BPF SEG6 encap path reaches this with a BPF program-supplied pointer and length: bpflwtpushencap() and the SEG6 local BPF ENDB6 and ENDB6ENCAP actions call bpfpushseg6encap(), which forwards the length to seg6validatesrh() 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 seg6validatesrh(), before any field is read. This fixes the BPF helper path and keeps the common validator robust.