AZL-118667: CVE-2026-143359 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject non-IPv6 packets in BPFLWTENCAPSEG6
The mode BPFLWTENCAPSEG6 of bpflwtpushencap() pushes an IPv6 header and an SRH, and it replaces the dst. The SRH says that IPv6 follows, and skb->protocol does not change. Thus the mode assumes an IPv6 packet, but an lwtin prog also runs for IPv4 packets. After the prog, bpfinput() calls originput() of the old dst. This IPv4 handler reads the pushed headers as IPv4. It can write after the packet data, and the kernel crashes.
after the push originput() expects --------------------- -------------------- skb->protocol ETHPIP ETHPIP dst rt6info rtable packet | IPv6 | SRH | IPv4 | | IPv4 |
The mode BPFLWTENCAPSEG6INLINE returns -EBADMSG for non-IPv6 packets. Apply this check to both modes. End.BPF does not change, because seg6localinput() drops non-IPv6 packets.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Reject non-IPv6 packets in both BPF_LWT_ENCAP_SEG6 modes.
Event History
Frequently Asked Questions
What traffic and configuration are required to trigger this issue?
The affected system must use a BPF LWT input program that invokes bpf_lwt_push_encap() in BPF_LWT_ENCAP_SEG6 mode. The program must process a non-IPv6 packet, such as IPv4; the unsafe path arises because the mode pushes IPv6 and SRH headers while the packet protocol remains IPv4.
What is the practical impact if the vulnerable path is reached?
The old IPv4 destination input handler can interpret the pushed IPv6 and SRH headers as IPv4 data and write beyond the packet data. This can crash the kernel.
Is the inline Segment Routing encapsulation mode affected?
No. BPF_LWT_ENCAP_SEG6_INLINE already returns -EBADMSG for non-IPv6 packets, so the described non-IPv6 handling flaw applies to BPF_LWT_ENCAP_SEG6 mode.
What can be done before applying the resolved kernel version?
Avoid using BPF_LWT_ENCAP_SEG6 in LWT input programs for traffic that may include non-IPv6 packets. Restrict such programs to IPv6 packets or prevent IPv4 packets from reaching the program.