public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Eric Biggers <ebiggers@kernel.org>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Theodore Ts'o <tytso@mit.edu>, Jann Horn <jannh@google.com>
Subject: Re: [PATCH] random: allow writes to /dev/urandom to influence fast init
Date: Sun, 19 Jun 2022 18:56:15 +0200	[thread overview]
Message-ID: <20220619165615.GB3362@bug> (raw)
In-Reply-To: <CAHmME9p7k2Z2f3aYctHxV9oNwe_GKd62Sghh9Ck1-nRyPaEypA@mail.gmail.com>

Hi!
> > On Tue, Mar 22, 2022 at 01:14:36PM -0600, Jason A. Donenfeld wrote:
> >> For as far back as I can tell, writing to /dev/urandom or /dev/random
> >> will put entropy into the pool, but won't immediately use it, and won't
> >> credit it either.
> >
> > Did you check kernels v4.7 and earlier?  It looks like this actually changed
> > in
> > v4.8 when the ChaCha20 CRNG was introduced.  v4.7 would mix the data written
> > to
> > /dev/{u,}random into {non,}blocking_pool, which would immediately be
> > reflected
> > in reads from /dev/{u,}random, sys_getrandom(), and get_random_bytes().
> > Writes
> > to /dev/{u,}random didn't affect the input_pool, which was separate.
> 
> Oh, I suppose you might be right, actually, that v4.7 and below would
> hash the non blocking pool, and let /dev/urandom write directly into
> it, as something distinct from the input pool. This changed with v4.8,
> 6 years ago, and now there are no LTS kernels that old, with most
> small devices even having vendor kernels v4.9+. v4.8 apparently did

We are still maintaining 4.4 for -cip project, and people running android probably still 
maintain that, too.

> this while fixing a more extreme vulnerability of allowing unprivileged users to 
> bruteforce input bytes (in addition to allowing unbounded unprivileged lock contention). 

I assume this got fixed during the 4.4-stable series?

Best regards,
										Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2022-06-19 16:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 19:14 [PATCH] random: allow writes to /dev/urandom to influence fast init Jason A. Donenfeld
2022-03-22 20:42 ` Linus Torvalds
2022-03-22 23:54   ` Jason A. Donenfeld
2022-03-23  2:15 ` David Laight
2022-03-23  2:50   ` Jason A. Donenfeld
2022-03-23  8:43     ` Rasmus Villemoes
2022-03-24 14:12       ` Jason A. Donenfeld
2022-03-23 11:45     ` David Laight
2022-03-23  3:35 ` Theodore Ts'o
2022-03-23  4:00   ` Jason A. Donenfeld
2022-03-23 12:31     ` Theodore Ts'o
2022-05-23 17:59     ` Pavel Machek
2022-03-23  4:30 ` Alex Xu (Hello71)
2022-03-23  4:47   ` Jason A. Donenfeld
2022-03-23 14:01     ` David Laight
2022-03-23 19:53       ` Jason A. Donenfeld
2022-03-24 18:01         ` Eric Biggers
2022-03-24  3:18     ` Jason A. Donenfeld
2022-03-24 16:28       ` Alex Xu (Hello71)
2022-03-24 17:20         ` Jason A. Donenfeld
2022-03-24 19:03           ` Alex Xu (Hello71)
2022-03-24 18:26       ` Eric Biggers
2022-03-24 18:31         ` Jason A. Donenfeld
2022-06-19 16:44       ` Pavel Machek
2022-03-24 19:53 ` Eric Biggers
2022-03-24 20:25   ` Jason A. Donenfeld
2022-06-19 16:56     ` Pavel Machek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220619165615.GB3362@bug \
    --to=pavel@ucw.cz \
    --cc=Jason@zx2c4.com \
    --cc=ebiggers@kernel.org \
    --cc=jannh@google.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=linux@roeck-us.net \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox