In the Linux kernel, the following vulnerability has been resolved:
bpf: Check skb->transportheader is set in bpfskbcheckmtu
The bpfskbcheckmtu helper needs to use skb->transportheader when the BPFMTUCHK_SEGS flag is used:
bpf_skb_check_mtu(skb, ifindex, &mtu_len, 0, BPF_MTU_CHK_SEGS)
The transportheader is not always set. There is a WARNONONCE report when CONFIGDEBUGNET is enabled + skb->gsosize is set + bpfprogtest_run is used:
WARNING: CPU: 1 PID: 2216 at ./include/linux/skbuff.h:3071 skbgsovalidatenetworklen bpfskbcheckmtu bpfprog3920e25740a41171tcchksegsflag # A test in the next patch bpftestrun bpfprogtestrun_skb
For a normal ingress skb (not testrun), skbresettransportheader is performed but there is plan to avoid setting it as described in commit 2170a1f09148 ("net: no longer reset transportheader in _netifreceiveskb_core()").
This patch fixes the bpf helper by checking skbtransportheaderwasset(). The check is done just before skb->transportheader is used, to avoid breaking the existing bpf prog. The WARNONONCE is limited to bpfprogtestrun, so targeting bpf-next.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68363.json",
"cna_assigner": "Linux"
}