lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aTp8AI8qnXlIwFGV@secunet.com>
Date: Thu, 11 Dec 2025 09:08:32 +0100
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Jianbo Liu <jianbol@...dia.com>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>, <kuba@...nel.org>,
	Herbert Xu <herbert@...dor.apana.org.au>, David Ahern <dsahern@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon
 Horman <horms@...nel.org>, Sabrina Dubroca <sd@...asysnail.net>, Cosmin Ratiu
	<cratiu@...dia.com>
Subject: Re: [PATCH ipsec v2] xfrm: Fix inner mode lookup in tunnel mode GSO
 segmentation

On Thu, Nov 20, 2025 at 05:56:09AM +0200, Jianbo Liu wrote:
> Commit 61fafbee6cfe ("xfrm: Determine inner GSO type from packet inner
> protocol") attempted to fix GSO segmentation by reading the inner
> protocol from XFRM_MODE_SKB_CB(skb)->protocol. This was incorrect
> because the field holds the inner L4 protocol (TCP/UDP) instead of the
> required tunnel protocol. Also, the memory location (shared by
> XFRM_SKB_CB(skb) which could be overwritten by xfrm_replay_overflow())
> is prone to corruption. This combination caused the kernel to select
> the wrong inner mode and get the wrong address family.
> 
> The correct value is in xfrm_offload(skb)->proto, which is set from
> the outer tunnel header's protocol field by esp[4|6]_gso_encap(). It
> is initialized by xfrm[4|6]_tunnel_encap_add() to either IPPROTO_IPIP
> or IPPROTO_IPV6, using xfrm_af2proto() and correctly reflects the
> inner packet's address family.
> 
> Fixes: 61fafbee6cfe ("xfrm: Determine inner GSO type from packet inner protocol")
> Signed-off-by: Jianbo Liu <jianbol@...dia.com>

Applied, thanks a lot Jianbo!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ