Vulnerability record
bpf: lwt: Free the skb when bpf_xmit() fails to expand the headroom
In the Linux kernel, the following vulnerability has been resolved:
bpf: lwt: Free the skb when bpf_xmit() fails to expand the headroom
When an LWT xmit program returns BPF_OK, bpf_xmit() makes sure that the skb still has room for the link layer header. If pskb_expand_head() fails there, bpf_xmit() returns -ENOMEM without freeing the skb. Its callers, lwtunnel_xmit() and then ip_finish_output2() or ip6_finish_output2(), take any return value other than LWTUNNEL_XMIT_CONTINUE to mean that the skb has been consumed, so nothing frees it.
Each such failure leaks the skb, together with what it…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources