Not scored
bpf: Check skb->transport_header is set in bpf_skb_check_mtu
- Severity
- Not scored
- Exploit likelihood
- 0.25% (higher than 17% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Check skb->transport_header is set in bpf_skb_check_mtu The bpf_skb_check_mtu helper needs to use skb->transport_header when the BPF_MTU_CHK_SEGS flag is used: bpf_skb_check_mtu(skb, ifindex, &mtu_len, 0, BPF_MTU_CHK_SEGS) The transport_header is not always set. There is a WARN_ON_ONCE report when CONFIG_DEBUG_NET is enabled + skb->gso_size is set + bpf_prog_test_run is used: WARNING: CPU: 1 PID: 2216 at ./include/linux/skbuff.h:3071 skb_gso_validate_network_len bpf_skb_check_mtu bpf_prog_3920e25740a41171_tc_chk_segs_flag # A test in the next patch bpf_test_run bpf_prog_test_run_skb For a normal ingress skb (not test_run), skb_reset_transport_header is performed but there is plan to avoid setting it as described in commit 2170a1f09148 ("net: no longer reset transport_header in __netif_receive_skb_core()"). This patch fixes the bpf helper by checking skb_transport_header_was_set(). The check is done just before skb->transport_header is used, to avoid breaking the existing bpf prog. The WARN_ON_ONCE is limited to bpf_prog_test_run, so targeting bpf-next.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 34b2021cc61642d61c3cf943d9e71925b827941b before b3171a5e4622e915e94599a55f4964078bdec27e, from 34b2021cc61642d61c3cf943d9e71925b827941b before 97b876fa88322625228792cf7a5fd77531815a80, from 34b2021cc61642d61c3cf943d9e71925b827941b before 30ce906557a21adef4cba5901c8e995dc18263a9, from 34b2021cc61642d61c3cf943d9e71925b827941b before 1c30e4afc5507f0069cc09bd561e510e4d97fbf7, from 34b2021cc61642d61c3cf943d9e71925b827941b before 942268e2726ac7f16e3ec49dbfbbbe7cf5af9da5, from 34b2021cc61642d61c3cf943d9e71925b827941b before d946f3c98328171fa50ddb908593cf833587f725, 5.12 Not affected: before 5.12, from 6.1.160 up to 6.1.*, from 6.6.120 up to 6.6.*, from 6.12.63 up to 6.12.*, from 6.17.13 up to 6.17.*, from 6.18.2 up to 6.18.* | CVE List |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: bpf: Check skb->transport_header is set in bpf_skb_check_mtu The bpf_skb_check_mtu helper needs to use skb->transport_header when the BPF_MTU_CHK_SEGS flag is used: bpf_skb_check_mtu(skb, ifindex, &mtu_len, 0, BPF_MTU_CHK_SEGS) The transport_header is not always set. There is a WARN_ON_ONCE report when CONFIG_DEBUG_NET is enabled + skb->gso_size is set + bpf_prog_test_run is used: WARNING: CPU: 1 PID: 2216 at ./include/linux/skbuff.h:3071 skb_gso_validate_network_len bpf_skb_check_mtu bpf_prog_3920e25740a41171_tc_chk_segs_flag # A test in the next patch bpf_test_run bpf_prog_test_run_skb For a normal ingress skb (not test_run), skb_reset_transport_header is performed but there is plan to avoid setting it as described in commit 2170a1f09148 ("net: no longer reset transport_header in __netif_receive_skb_core()"). This patch fixes the bpf helper by checking skb_transport_header_was_set(). The check is done just before skb->transport_header is used, to avoid breaking the existing bpf prog. The WARN_ON_ONCE is limited to bpf_prog_test_run, so targeting bpf-next.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: bpf: Verificar que skb -> transport_header esté configurado en bpf_skb_check_mtu La función auxiliar bpf_skb_check_mtu necesita usar skb -> transport_header cuando se usa la bandera BPF_MTU_CHK_SEGS: bpf_skb_check_mtu(skb, ifindex, &mtu_len, 0, BPF_MTU_CHK_SEGS) El transport_header no siempre está configurado. Hay un informe WARN_ON_ONCE cuando CONFIG_DEBUG_NET está habilitado + skb -> gso_size está configurado + se usa bpf_prog_test_run: WARNING: CPU: 1 PID: 2216 en ./include/linux/skbuff.h:3071 skb_gso_validate_network_len bpf_skb_check_mtu bpf_prog_3920e25740a41171_tc_chk_segs_flag # Una prueba en el siguiente parche bpf_test_run bpf_prog_test_run_skb Para un skb de entrada normal (no test_run), se realiza skb_reset_transport_header, pero hay un plan para evitar configurarlo como se describe en el commit 2170a1f09148 ('net: ya no restablecer transport_header en __netif_receive_skb_core()'). Este parche corrige la función auxiliar bpf verificando skb_transport_header_was_set(). La verificación se realiza justo antes de que se use skb -> transport_header, para evitar romper el programa bpf existente. El WARN_ON_ONCE está limitado a bpf_prog_test_run, por lo que apunta a bpf-next.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-68363 changed 2026-11-10 | CVE Terms of Use |
| NVD | CVE-2025-68363 changed 2026-11-10 | Public domain |