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: Wed, 22 May 2024 15:53:23 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: NĂ­colas F. R. A. Prado <nfraprado@...labora.com>, 
	Eric Biggers <ebiggers@...nel.org>, Jarkko Sakkinen <jarkko@...nel.org>, 
	James Bottomley <James.Bottomley@...senpartnership.com>, Ard Biesheuvel <ardb@...nel.org>, 
	Linux Crypto Mailing List <linux-crypto@...r.kernel.org>, linux-integrity@...r.kernel.org, 
	keyrings@...r.kernel.org, regressions@...ts.linux.dev, kernel@...labora.com, 
	Tejun Heo <tj@...nel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, 
	Kees Cook <keescook@...omium.org>
Subject: Re: [v3 PATCH] hwrng: core - Remove add_early_randomness

On Tue, 21 May 2024 at 22:38, Herbert Xu <herbert@...dor.apana.org.au> wrote:
>
> In this particular configuration, the deadlock doesn't exist because
> the warning triggered at a point before modules were even available.
> However, the deadlock can be real because any module loaded would
> invoke async_synchronize_full.

I think this crapectomy is good regardless of any deadlock - the
"register this driver" should not just blindly call back into the
driver.

That said, looking at the code in question, there are other oddities
going on. Even the "we found a favorite new rng" case looks rather
strange. The thread we use - nice and asynchronous - seems to sleep
only if the randomness source is emptied.

What if you have a really good source of hw randomness? That looks
like a busy loop to me, but hopefully I'm missing something obvious.

So I think this hw_random code has other serious issues, and I get the
feeling there might be more code that needs looking at..

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ