AZL-118640: CVE-2026-143350 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
bpf: lwt: Free the skb when bpfxmit() fails to expand the headroom
When an LWT xmit program returns BPFOK, bpfxmit() makes sure that the skb still has room for the link layer header. If pskbexpandhead() fails there, bpfxmit() returns -ENOMEM without freeing the skb. Its callers, lwtunnelxmit() and then ipfinishoutput2() or ip6finishoutput2(), take any return value other than LWTUNNELXMITCONTINUE to mean that the skb has been consumed, so nothing frees it.
Each such failure leaks the skb, together with what it holds: its dst and its charge to the sending socket, so the socket is never freed either. The other error paths of bpfxmit() (BPFDROP, an illegal return code, a changed protocol, a failed reroute) all free the skb.
Free it here too.
The leak was found with kbound, a static analysis prototype for ownership mismatches at kernel interfaces, on v7.2.12; it is present in mainline.
Build-tested with x8664 and arm64 allmodconfig (W=1, sparse): no new warnings. Run-tested on QEMU (x8664, KVM) with KASAN: a route through a dummy device with an LWT xmit program that pushes one byte with bpfskbchangehead(), so the headroom check has to expand the head, and failslab limited to allocations under bpfxmit(). Each of 10 pings then fails with ENOMEM. Without this patch each leaves a raw socket behind (RAW slab objects 6 -> 16); with it none does (6 -> 6), and nothing else is reported. Without injection both kernels go from 6 to 6.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for the leak to occur?
An LWT xmit BPF program must return BPF_OK, and bpf_xmit() must then fail to expand packet headroom through pskb_expand_head(). The affected transmit path treats the packet as consumed even though it is not freed.
What resources can remain allocated when the failure is triggered?
The packet buffer is leaked along with its destination reference and its charge to the sending socket. As a result, the sending socket may never be freed.