vxlan: use pskb_network_may_pull() in route_shortcircuit()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e4f67addf158f98f8197e08974966b18480dc751 · < ee799977d7941dbfb11049e17edd9eaf4f8820f7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vxlan: use pskb_network_may_pull() in route_shortcircuit()
route_shortcircuit() currently calls pskb_may_pull(skb, sizeof(struct iphdr)) (or ipv6hdr), which checks if bytes are available starting from skb->data.
However, in vxlan_xmit(), skb->data points to the MAC header, so skb_network_offset(skb) is ETH_HLEN (14 bytes). Using pskb_may_pull(skb, 20) only checks 20 bytes from skb->data (which is 14 bytes MAC header + 6 bytes of IP header), leaving the rest of the IP header potentially un-pulled in non-linear frags. Subsequent dereferences of ip_hdr(skb)->daddr can read beyond the pulled linear buffer length.
Fix this by using pskb_network_may_pull(), which adds skb_network_offset(skb) to the length check to ensure the full network header is present in the linear buffer.
From the CVE record · Linux
The Linux kernel’s VXLAN route_shortcircuit() can check too few bytes when an IP header spans non-linear packet fragments. Processing such a packet can cause a read beyond the pulled linear buffer; the input does not establish whether an attacker can trigger this remotely or whether authentication or user interaction is required.
Engineers running Linux kernels with VXLAN should check whether their kernel includes this fix; affected versions are not specified.