lkml.org 
[lkml]   [2022]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] random: tie batched entropy generation to base_crng generation
On Mon, Feb 21, 2022 at 5:13 AM Eric Biggers <ebiggers@kernel.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

\
 
 \ /
  Last update: 2022-02-21 19:23    [W:0.057 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site