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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZFzxdfc0tRdoluyn@corigine.com>
Date: Thu, 11 May 2023 15:45:25 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: tariqt@...dia.com, netdev@...r.kernel.org
Subject: Re: [RFC / RFT net 2/7] tls: rx: strp: set the skb->len of detached
 / CoW'ed skbs

On Wed, May 10, 2023 at 06:20:29PM -0700, Jakub Kicinski wrote:
> alloc_skb_with_frags() fills in page frag sizes but does not
> set skb->len and skb->data_len. Set those correctly otherwise
> device offload will most likely generate an empty skb and
> hit the BUG() at the end of __skb_nsg().
> 
> Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  net/tls/tls_strp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/tls/tls_strp.c b/net/tls/tls_strp.c
> index 955ac3e0bf4d..90b220d1145c 100644
> --- a/net/tls/tls_strp.c
> +++ b/net/tls/tls_strp.c
> @@ -56,6 +56,8 @@ static struct sk_buff *tls_strp_msg_make_copy(struct tls_strparser *strp)
>  		offset += skb_frag_size(frag);
>  	}
>  
> +	skb->len = len;
> +	skb->data_len = len;

len doesn't seem to exist until patch 5/7.

>  	skb_copy_header(skb, strp->anchor);
>  	rxm = strp_msg(skb);
>  	rxm->offset = 0;
> -- 
> 2.40.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ