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: <20240326115911.GQ403975@kernel.org>
Date: Tue, 26 Mar 2024 11:59:11 +0000
From: Simon Horman <horms@...nel.org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, Gaurav Jain <gaurav.jain@....com>,
	Boris Pismenny <borisp@...dia.com>,
	John Fastabend <john.fastabend@...il.com>,
	Jakub Kicinski <kuba@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net 2/4] tls: adjust recv return with async crypto and
 failed copy to userspace

On Mon, Mar 25, 2024 at 04:56:46PM +0100, Sabrina Dubroca wrote:
> process_rx_list may not copy as many bytes as we want to the userspace
> buffer, for example in case we hit an EFAULT during the copy. If this
> happens, we should only count the bytes that were actually copied,
> which may be 0.
> 
> Subtracting async_copy_bytes is correct in both peek and !peek cases,
> because decrypted == async_copy_bytes + peeked for the peek case: peek
> is always !ZC, and we can go through either the sync or async path. In
> the async case, we add chunk to both decrypted and
> async_copy_bytes. In the sync case, we add chunk to both decrypted and
> peeked. I missed that in commit 6caaf104423d ("tls: fix peeking with
> sync+async decryption").
> 
> Fixes: 4d42cd6bc2ac ("tls: rx: fix return value for async crypto")
> Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ