CVE-2026-143352: bpf: Move the transport header with the moved headers
In the Linux kernel, the following vulnerability has been resolved:
bpf: Move the transport header with the moved headers
bpfskbnethdrpop() removes len bytes at offset off. bpfskbnethdrpush() does the opposite.
skb->data off before | A | removed | B | after | A | B | skb->data off
macheader and networkheader move with A. transportheader moves only when it is equal to networkheader. innertransportheader never moves. This is correct only for a header in B. In bpflwtseg6adjustsrh() transportheader is in A. bpfskbadjustroom() can remove both transport headers. With an incorrect header offset, the stack can drop the skb or read outside of it.
Also move transportheader with A when it is in A. Set it to offset off when it is in the removed bytes. In BPFADJROOMMAC mode it is then equal to networkheader. Do not unset it, because skbgsovalidatemaclen() uses it without a check. After a removal, set innertransportheader to off when it is not in B and skb->encapsulation is set. A has only outer headers.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.276 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Which BPF paths are implicated in the incorrect header-offset handling?
The issue affects packet header removal and insertion through bpf_skb_net_hdr_pop() and bpf_skb_net_hdr_push(). The described problematic cases include bpf_lwt_seg6_adjust_srh(), where the transport header is in the moved portion of the packet, and bpf_skb_adjust_room(), which can remove both transport headers.
What can happen when the transport-header offset is incorrect?
The network stack can drop the skb or read outside of it. The fix updates transport and inner transport header offsets when headers are moved or removed.