AZL-118652: CVE-2026-143354 affecting package kernel 6.6.161.1-1
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the lwt_in path, drop the skb with -EINVAL when skb->protocol changes, including when the destination family changes.
Event History
Frequently Asked Questions
Which deployments are relevant to this issue?
The issue is relevant where an lwt_in BPF program can change skb->protocol or change the destination family. The described unsafe path occurs when such a program returns BPF_OK, causing the route input handler to process a packet using state for the wrong IP family.
What should operators review if they cannot immediately deploy the resolved kernel?
Review lwt_in BPF programs for use of BPF_LWT_ENCAP_IP that pushes a header for the other IP version, and for changes that replace the destination with one from another address family. Programs that perform those changes should not return BPF_OK.
What return behavior is identified as safe for programs that alter routing state?
A program continues to work as before if it returns BPF_LWT_REROUTE. Pushing an SRH on an IPv6 route is also identified as continuing to work as before.