OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH vz10 1/7] ms/vxlan: do not reuse cached ip_hdr() value after skb_tunnel_check_pmtu()
Date: Fri, 18 Sep 2026 10:50:08 +0000	[thread overview]
Message-ID: <178972860866.656887.542761779397137099.b4-reply@b4> (raw)
In-Reply-To: <20260831224850.1642265-1-eva.kurchatova@virtuozzo.com>

On 2026-09-01 01:48 +0300, Eva Kurchatova wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> 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: 4cb47a8644cc ("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>
> (cherry picked from commit 7d9ef0cb271555d8cf39fefe6c981e1493b25ecf)
> 

It doesn't apply. Please rebase

> https://virtuozzo.atlassian.net/browse/VSTOR-139651
> Feature: fix ms/net
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
> ---
>  drivers/net/vxlan/vxlan_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index 7c9d2450209a..700bee7e7733 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -2554,7 +2554,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
>  			goto out_unlock;
>  		}
>  
> -		tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
> +		tos = ip_tunnel_ecn_encap(tos, ip_hdr(skb), skb);
>  		ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
>  		err = vxlan_build_skb(skb, ndst, sizeof(struct iphdr),
>  				      vni, md, flags, udp_sum);
> @@ -2623,7 +2623,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
>  			goto out_unlock;
>  		}
>  
> -		tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
> +		tos = ip_tunnel_ecn_encap(tos, ip_hdr(skb), skb);
>  		ttl = ttl ? : ip6_dst_hoplimit(ndst);
>  		skb_scrub_packet(skb, xnet);
>  		err = vxlan_build_skb(skb, ndst, sizeof(struct ipv6hdr),
> -- 
> 2.55.0
> 
> _______________________________________________
> Devel mailing list
> Devel@openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
> 


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  parent reply	other threads:[~2026-09-18 10:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 22:48 Eva Kurchatova
2026-08-31 22:48 ` [Devel] [PATCH vz10 2/7] selftests: net: run the fdb and bind tests in their own netns Eva Kurchatova
2026-09-21 14:51   ` Vladimir Riabchun
2026-08-31 22:48 ` [Devel] [PATCH vz10 3/7] selftests: net: skip what this kernel and iproute2 do not have Eva Kurchatova
2026-09-21 14:51   ` Vladimir Riabchun
2026-08-31 22:48 ` [Devel] [PATCH vz10 4/7] selftests: net: make the veth GRO checks independent of host tunnels Eva Kurchatova
2026-09-21 14:51   ` Vladimir Riabchun
2026-08-31 22:48 ` [Devel] [PATCH vz10 5/7] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs Eva Kurchatova
2026-09-21 14:51   ` Vladimir Riabchun
2026-08-31 22:48 ` [Devel] [PATCH vz10 6/7] selftests: net: mark test_ingress_egress_chaining.sh executable Eva Kurchatova
2026-09-21 14:51   ` Vladimir Riabchun
2026-08-31 22:48 ` [Devel] [PATCH vz10 7/7] selftests: net: let the bridged PMTU tests take the ICMP they ask for Eva Kurchatova
2026-09-21 14:51   ` Vladimir Riabchun
2026-09-18 10:50 ` Vasileios Almpanis [this message]
2026-09-21 14:51 ` [Devel] [PATCH vz10 1/7] ms/vxlan: do not reuse cached ip_hdr() value after skb_tunnel_check_pmtu() Vladimir Riabchun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178972860866.656887.542761779397137099.b4-reply@b4 \
    --to=vasileios.almpanis@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=eva.kurchatova@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox