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]
Date: Mon, 10 Jul 2023 14:08:56 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: David Howells <dhowells@...hat.com>
Cc: syzbot <syzbot+689ec3afb1ef07b766b2@...kaller.appspotmail.com>,
	Paolo Abeni <pabeni@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, linux-crypto@...r.kernel.org,
	netdev@...r.kernel.org, linux-ext4@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: algif/hash: Fix race between MORE and non-MORE
 sends

On Fri, Jul 07, 2023 at 10:12:38AM +0100, David Howells wrote:
> The 'MSG_MORE' state of the previous sendmsg() is fetched without the
> socket lock held, so two sendmsg calls can race.  This can be seen with a
> large sendfile() as that now does a series of sendmsg() calls, and if a
> write() comes in on the same socket at an inopportune time, it can flip the
> state.
> 
> Fix this by moving the fetch of ctx->more inside the socket lock.
> 
> Fixes: c662b043cdca ("crypto: af_alg/hash: Support MSG_SPLICE_PAGES")
> Reported-by: syzbot+689ec3afb1ef07b766b2@...kaller.appspotmail.com
> Link: https://lore.kernel.org/r/000000000000554b8205ffdea64e@google.com/
> Signed-off-by: David Howells <dhowells@...hat.com>
> Tested-by: syzbot+689ec3afb1ef07b766b2@...kaller.appspotmail.com
> cc: Herbert Xu <herbert@...dor.apana.org.au>
> cc: Paolo Abeni <pabeni@...hat.com>
> cc: "David S. Miller" <davem@...emloft.net>
> cc: Eric Dumazet <edumazet@...gle.com>
> cc: Jakub Kicinski <kuba@...nel.org>
> cc: linux-crypto@...r.kernel.org
> cc: netdev@...r.kernel.org
> ---
>  crypto/algif_hash.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Patch applied.  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