From: Bernhard Reutner-Fischer
> Sent: 19 April 2022 09:32
> 
> On Tue, 12 Apr 2022 21:07:36 +0200
> "Jason A. Donenfeld" <[email protected]> wrote:
> 
> > Hi Bernhard,
> >
> > On Tue, Apr 12, 2022 at 8:37 PM Bernhard Reutner-Fischer
> > <[email protected]> wrote:
> > >
> > > Hi Jason!
> > > I'm a bit surprised that even if i give -n the seed is moved to
> > > seed.credit. The next boot/run will find the now creditable seed and
> > > happily add it, IIUC, despite i wanted it to not be credited?
> > > Is this intentional?
> >
> > Yes. You misunderstand the purpose of the utility. It creates a
> > creditable seed when the kernel is able to produce safe random
> > numbers. In that case, the creditability or non-creditability of the
> > previous seed does not matter.
> 
> So to go back to the underlying issue.
> In v8 we cannot guarantee that we really got a seed from
> the kernel, let alone trustworthy. It could have been data from about
> any file, including /dev/zero or other unhelpful, no-random data. I
> think that adding and crediting a block of 0 is not what we want.
> 
> Ignoring interference from other processes with CAP_SYS_ADMIN, to
> somewhat tighten this up, we'd need to open /dev/random once and do our
> stuff with this rnd_fd, including an fstat to ensure we are really
> reading from the random character device 1,8 or chardev 1,9 for
> urandom. [Can we ioctl on urandom to RNDADDENTROPY to the pool btw? ah
> yes, we can; only read is different in fops. That's handy and
> simplifies the flow.]

Does any of that matter at all?
If anything can change what the startup script/program does then they
can do something completely different instead.

The only 'problem' is the static one where someone has built a kernel
with an inappropriate set of options or is running the startup scripts
in the wrong order.
 
One thing I have noticed is that the first message about the rng not
being initialised comes (IIRC) from the udev script.
I think this means the S20 is too late to seed the rng.
(Or the used code shouldn't be trying to get random numbers.0

        David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, 
UK
Registration No: 1397386 (Wales)

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to