AZL-118658: CVE-2026-143356 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: Move the MAC header in bpflwtseg6adjustsrh()
bpfskbnethdrpush() and bpfskbnethdrpop() change skb->data and skb->macheader by len. That is correct in a tc prog, where skb->data is the MAC header. But bpflwtseg6adjustsrh() calls them in an End.BPF prog, where skb->data is the network header. The MAC header does not move:
before push | free | MAC header | IPv6 | SRH | payload ^ head ^ macheader ^ data today | free | MAC h| IPv6 | SRH + len | payload ^ head ^ macheader ^ data this patch | free | MAC header | IPv6 | SRH + len | payload ^ head ^ macheader ^ data
Users of skbmacheader() get incorrect bytes until devqueuexmit() sets skb->macheader again. skbcowhead() reserves only len bytes. Thus the 16-bit offset skb->macheader can wrap. A push also changes the "not set" value. In both cases skbmacheader() points after the skb.
Move the MAC header too. Pass len + skb->maclen to skbcowhead(). Keep the "not set" value. The second Fixes tag is for this case. Since that commit an End.BPF prog can get an skb with skb->macheader not set.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch bpf: Move the MAC header in bpf_lwt_seg6_adjust_srh()
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the affected Azure Linux kernel package version 6.6.161.1-1 are exposed when they use an End.BPF program that calls bpf_lwt_seg6_adjust_srh(). The vulnerable path concerns packets whose MAC-header state is handled while Segment Routing Header adjustment is performed.
What is required to trigger the vulnerable behavior?
An End.BPF program must invoke bpf_lwt_seg6_adjust_srh(), which uses bpf_skb_net_hdr_push() or bpf_skb_net_hdr_pop() while skb->data points to the network header rather than the MAC header. The issue can also involve an skb whose mac_header is not set.
What indicates that the affected code path has been reached?
Code using skb_mac_header() can receive incorrect data before __dev_queue_xmit() resets skb->mac_header. In the affected cases, skb_mac_header() may point beyond the skb because the MAC-header offset is moved incorrectly, wraps as a 16-bit offset, or loses its not-set value.