linux/drivers/net/vxlan
Eric Dumazet 9257f56ac4 vxlan: do not reuse cached ip_hdr() value after skb_tunnel_check_pmtu()
[ Upstream commit 7d9ef0cb27 ]

skb_tunnel_check_pmtu() can change skb->head.

Reusing old_iph afer skb_tunnel_check_pmtu() can cause an UAF.

Use instead ip_hdr(skb) as done in drivers/net/bareudp.c
and drivers/net/geneve.c.

Found by Sashiko.

Fixes: 4cb47a8644 ("tunnels: PMTU discovery support for directly bridged IP packets")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://patch.msgid.link/20260525203642.2389723-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-06-19 13:33:23 +02:00
..
Makefile vxlan: move to its own directory 2023-08-03 10:22:34 +02:00
vxlan_core.c vxlan: do not reuse cached ip_hdr() value after skb_tunnel_check_pmtu() 2026-06-19 13:33:23 +02:00