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]
Date: Tue, 20 Jun 2023 16:20:47 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: David Howells <dhowells@...hat.com>
Cc: netdev@...r.kernel.org,
	syzbot+13a08c0bf4d212766c3c@...kaller.appspotmail.com,
	syzbot+14234ccf6d0ef629ec1a@...kaller.appspotmail.com,
	syzbot+4e2e47f32607d0f72d43@...kaller.appspotmail.com,
	syzbot+472626bb5e7c59fb768f@...kaller.appspotmail.com,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Jens Axboe <axboe@...nel.dk>, Matthew Wilcox <willy@...radead.org>,
	linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] crypto: af_alg/hash: Fix recvmsg() after
 sendmsg(MSG_MORE)

On Tue, Jun 20, 2023 at 08:42:15AM +0100, David Howells wrote:
>
> Not so.  hash_recvmsg() will call crypto_ahash_init() first because ctx->more
> is false (hence why we came down this branch in hash_sendmsg()) and the result
> was released on the previous line (which you're objecting to).  If it goes to
> the "done" label, it will skip setting ctx->more to true if MSG_MORE is
> passed.

I see, yes it should work.

> However, given you want sendmsg() to do the init->digest cycle on zero length
> data, I think we should revert to the previous version of the patch that makes
> a pass of the loop even with no data.

Let's get this fixed ASAP and we can refine it later.

Acked-by: Herbert Xu <herbert@...dor.apana.org.au>

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ