{"id":"CVE-2026-143350","summary":"bpf: lwt: Free the skb when bpf_xmit() fails to expand the headroom","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: lwt: Free the skb when bpf_xmit() fails to expand the headroom\n\nWhen an LWT xmit program returns BPF_OK, bpf_xmit() makes sure that\nthe skb still has room for the link layer header. If\npskb_expand_head() fails there, bpf_xmit() returns -ENOMEM without\nfreeing the skb. Its callers, lwtunnel_xmit() and then\nip_finish_output2() or ip6_finish_output2(), take any return value\nother than LWTUNNEL_XMIT_CONTINUE to mean that the skb has been\nconsumed, so nothing frees it.\n\nEach such failure leaks the skb, together with what it holds: its dst\nand its charge to the sending socket, so the socket is never freed\neither. The other error paths of bpf_xmit() (BPF_DROP, an illegal\nreturn code, a changed protocol, a failed reroute) all free the skb.\n\nFree it here too.\n\nThe leak was found with kbound, a static analysis prototype for\nownership mismatches at kernel interfaces, on v7.2.12; it is present in\nmainline.\n\nBuild-tested with x86_64 and arm64 allmodconfig (W=1, sparse): no new\nwarnings. Run-tested on QEMU (x86_64, KVM) with KASAN: a route through a\ndummy device with an LWT xmit program that pushes one byte with\nbpf_skb_change_head(), so the headroom check has to expand the head, and\nfailslab limited to allocations under bpf_xmit(). Each of 10 pings then\nfails with ENOMEM. Without this patch each leaves a raw socket behind\n(RAW slab objects 6 -\u003e 16); with it none does (6 -\u003e 6), and nothing else\nis reported. Without injection both kernels go from 6 to 6.","modified":"2026-12-03T11:02:03.504988618Z","published":"2026-12-03T09:22:07.726Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143350.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/02315d8352c9dc80075a6cfa493f62369324ec4c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/28aaef6f21fe0288bd7f0472af07df30df89647d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5e96760b25fdedbbf9312827f1f237d6b18b03e8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5fe7b2bdf2784d5b3614208d4f9d0c37a5137f9a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e874c6f8d3dd0369764b44db40b01011821cfadc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eeb76b21f13aea28d9123feaeaf03cde7db681c0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143350.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143350"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2"},{"fixed":"28aaef6f21fe0288bd7f0472af07df30df89647d"},{"fixed":"e874c6f8d3dd0369764b44db40b01011821cfadc"},{"fixed":"02315d8352c9dc80075a6cfa493f62369324ec4c"},{"fixed":"5fe7b2bdf2784d5b3614208d4f9d0c37a5137f9a"},{"fixed":"eeb76b21f13aea28d9123feaeaf03cde7db681c0"},{"fixed":"5e96760b25fdedbbf9312827f1f237d6b18b03e8"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143350.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.10.0"},{"fixed":"5.10.276"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.227"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143350.json"}}],"schema_version":"1.9.2"}