CVE-2026-143355: bpf: Reset skb->cb after an lwt prog pushes an IP header

Published Dec 3, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: Reset skb->cb after an lwt prog pushes an IP header

IPCB(skb)->opt holds the offsets from the network header to the IPv4 options. But bpflwtpushipencap() moves the network header and does not change IPCB(skb). Then ipforwardoptions() and ipoptionsecho() use the old offsets on the pushed header. Thus the kernel corrupts the skb and the stack. If the family changes, the kernel also reads IP6CB(skb) as IPCB(skb), or the reverse. With CONFIGIPV6MIP6, it reads IPSKBFORWARDED as fragmaxsize and adds a needless fragment header.

Reset skb->cb after the prog. bpflwtpushipencap() cannot do it, because bpfprogrunsavecb() can restore skb->cb. For IPv4 in IPv4, clear IPCB(skb)->opt as iptunnelxmit() does. If the family changes, clear the cb of the new family but keep iif, because ip6forward() gets the input device from it. Behind a VRF, skb->skbiif is the VRF device and cannot replace iif. Do nothing for IPv6 in IPv6, as in seg6dosrhencap().

Do the reset in bpfinput() only after a push. Without a push, ipforwardoptions() needs the offsets. Do it in bpfxmit() before each reroute, because an lwtxmit prog can also change the options. Thus after a reroute without a push, ipoptionsfragment() leaves the options in all fragments, and ICMP errors echo none. After BPFOK or BPFREDIRECT the skb goes to a device, thus bpfxmit() does no reset. The inner IPv4 checksum can still be wrong after iprcvoptions() changes an option.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Reset skb->cb after an LWT BPF program pushes an IP header. In bpf_input(), do this only after a push; when the family changes, clear the new family's control block while preserving the input interface index, and do not reset for IPv6-in-IPv6.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:22 AM
Data Sourced
via MITRE·09:22 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems are affected when a BPF lightweight-tunnel (LWT) program pushes an IP encapsulation header. The problematic paths involve IPv4 option handling after the network header moves, and can also occur when encapsulation changes the IP family.

2

What condition triggers the corruption?

A BPF LWT encapsulation operation must push an IP header without the relevant skb control-block state being reset afterward. Subsequent forwarding or IP option processing can then use stale offsets against the pushed header and corrupt the skb and kernel networking stack.

3

Are IPv6-specific configurations relevant?

They can be, particularly when encapsulation changes between IPv4 and IPv6 families, because control-block data for one family may be interpreted as data for the other. With CONFIG_IPV6_MIP6 enabled, the stale state can also cause a needless IPv6 fragment header to be added.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203