CVE-2026-143354: bpf: Require BPF_LWT_REROUTE when an lwt_in prog changes the protocol

Published Dec 3, 2026
·
Updated

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

bpf: Require BPFLWTREROUTE when an lwtin prog changes the protocol

When an lwtin prog returns BPFOK, bpfinput() calls originput(), the input handler of the route. This handler is for one IP version and needs a dst of the same family. But BPFLWTENCAPIP lets the prog push a header of the other IP version and thus change skb->protocol. Then the handler reads and changes a header of the other IP version. The push of an SRH also replaces the dst, because seg6lookupnexthop() puts an rt6info into the skb. Then ipforward() uses the rt6info as a struct rtable.

Drop the skb with -EINVAL when skb->protocol changes, as bpfxmit() does. Drop it also when the family of the dst changes, because skb->protocol does not always show this change. Today no such skb leaves as the prog made it. A prog works as before if it returns BPFLWTREROUTE, or if it pushes an SRH on an IPv6 route.

The commit in the first Fixes tag lets a prog change skb->protocol. The commit in the second tag adds the check to bpfxmit() only.

Affected Software

4 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.1.0<6.12.120
6.12.120
linux/kernel>=6.13.0<6.18.66
6.18.66
linux/kernel>=6.19.0<7.3.7
7.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.120
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.66
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7
  4. Compensating control

    Ensure an lwt_in BPF program that changes skb->protocol returns BPF_LWT_REROUTE.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:22 AM
Data Sourced
via MITRE·09:22 AM
Description
Data Sourced
via OSV·09:22 AM
DescriptionAffected Software
Data Sourced
via NVD·10:18 AM
Description

Frequently Asked Questions

1

Which systems need attention?

The affected scenario requires an lwt_in BPF program that changes skb->protocol, such as by using BPF_LWT_ENCAP_IP, or changes the address family of the destination. The provided information does not identify an impact for systems without such programs.

2

What must an lwt_in BPF program do after changing the protocol or destination family?

It must return BPF_LWT_REROUTE rather than BPF_OK. Returning BPF_OK after either change causes the fixed kernel to drop the packet with -EINVAL.

3

What should be done if an existing program relies on returning BPF_OK?

Update the program to return BPF_LWT_REROUTE when it changes skb->protocol or the destination family. A program that pushes an SRH on an IPv6 route continues to work as before when returning BPF_OK.

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