[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHmME9pcFkPysTHHUCiPwqO0rv-i8X4nzNvomaSnyxbx3nauig@mail.gmail.com>
Date: Mon, 21 Feb 2022 15:35:44 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Eric Biggers <ebiggers@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>,
Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [PATCH v2] random: tie batched entropy generation to base_crng generation
On Mon, Feb 21, 2022 at 5:13 AM Eric Biggers <ebiggers@...nel.org> wrote:
> > @@ -455,7 +453,7 @@ static size_t crng_fast_load(const void *cp, size_t len)
> > src++; crng_init_cnt++; len--; ret++;
> > }
> > if (crng_init_cnt >= CRNG_INIT_CNT_THRESH) {
> > - invalidate_batched_entropy();
> > + ++base_crng.generation;
> > crng_init = 1;
> > }
>
> This is an existing issue, but why doesn't crng_slow_load() do this too?
Because it's called by add_device_randomness(), which is mostly
ingesting static bytes, akin to what you get by running `dmidecode`
and such. The idea is that this is something that's good to mix, but
bad to credit. I think there was a CVE a few years back about this,
precipitating the change.
Jason
Powered by blists - more mailing lists