CVE-2026-143351: bpf: Check the offset in bpf_skb_generic_{push,pop}()
bpf: Check the offset in bpfskbgeneric{push,pop}()
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- 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 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.7-1 - Compensating control
In bpf_skb_generic_push() and bpf_skb_generic_pop(), return -ENOMEM when off > skb->len; in bpf_skb_generic_pop(), avoid the wrapping off + len check by validating len against skb->len - off.
Event History
Frequently Asked Questions
What conditions are required to trigger the out-of-bounds access?
A BPF program must use skb adjustment or protocol-change operations that derive an offset from the MAC header length. The unsafe cases include an IP header located in a non-linear fragment, or a header ordering where network_header is before mac_header and the resulting unsigned offset becomes very large.
What is the potential effect of a successful trigger?
The affected push path can read and write past skb->tail and damage skb_shared_info. The pop path can allow an integer-wrapped bounds check, after which memmove() may read and write far outside the skb.
How does the fix change behavior for malformed or inconsistent skb header offsets?
The corrected code returns -ENOMEM when the calculated offset exceeds the skb length, preventing offset arithmetic from wrapping. It also pulls the bytes before the offset into the linear skb area before moving them; programs that try to grow an skb ending before that offset can now fail.