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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 15 May 2020 09:53:49 +0200 From: Steffen Klassert <steffen.klassert@...unet.com> To: Xin Long <lucien.xin@...il.com> CC: <netdev@...r.kernel.org>, Herbert Xu <herbert@...dor.apana.org.au>, "David S. Miller" <davem@...emloft.net>, Sabrina Dubroca <sd@...asysnail.net> Subject: Re: [PATCH ipsec] esp6: calculate transport_header correctly when sel.family != AF_INET6 On Wed, May 13, 2020 at 06:38:54PM +0800, Xin Long wrote: > In esp6_init_state() for beet mode when x->sel.family != AF_INET6: > > x->props.header_len = sizeof(struct ip_esp_hdr) + > crypto_aead_ivsize(aead) + IPV4_BEET_PHMAXLEN + > (sizeof(struct ipv6hdr) - sizeof(struct iphdr)) > > In xfrm6_beet_gso_segment() skb->transport_header is supposed to move > to the end of the ph header for IPPROTO_BEETPH, so if x->sel.family != > AF_INET6 and it's IPPROTO_BEETPH, it should do: > > skb->transport_header -= > (sizeof(struct ipv6hdr) - sizeof(struct iphdr)); > skb->transport_header += ph->hdrlen * 8; > > And IPV4_BEET_PHMAXLEN is only reserved for PH header, so if > x->sel.family != AF_INET6 and it's not IPPROTO_BEETPH, it should do: > > skb->transport_header -= > (sizeof(struct ipv6hdr) - sizeof(struct iphdr)); > skb->transport_header -= IPV4_BEET_PHMAXLEN; > > Thanks Sabrina for looking deep into this issue. > > Fixes: 7f9e40eb18a9 ("esp6: add gso_segment for esp6 beet mode") > Reported-by: Sabrina Dubroca <sd@...asysnail.net> > Signed-off-by: Xin Long <lucien.xin@...il.com> Applied, thanks Xin!
Powered by blists - more mailing lists