geneve: fix header validation in geneve[6]_xmit_skb
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d13f048dd40e8577260cd43faea8ec9b77520197 · < 190d9efa5773f26d6f334b1b8be282c4fa13fd5e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
geneve: fix header validation in geneve[6]_xmit_skb
syzbot is able to trigger an uninit-value in geneve_xmit() [1]
Problem : While most ip tunnel helpers (like ip_tunnel_get_dsfield()) uses skb_protocol(skb, true), pskb_inet_may_pull() is only using skb->protocol.
If anything else than ETH_P_IPV6 or ETH_P_IP is found in skb->protocol, pskb_inet_may_pull() does nothing at all.
If a vlan tag was provided by the caller (af_packet in the syzbot case), the network header might not point to the correct location, and skb linear part could be smaller than expected.
Add skb_vlan_inet_prepare() to perform a complete mac validation.
Use this in geneve for the moment, I suspect we need to adopt this more broadly.
From the CVE record · Linux
The Linux kernel’s Geneve transmit path does not fully validate headers when a caller supplies a VLAN tag. A local caller sending a packet through an AF_PACKET socket can trigger use of an uninitialized value when the network header points to the wrong location.
Engineers running Linux kernels with Geneve networking should check their kernel versions; affected versions were not provided.