Re: [PATCH] random: add blocking facility to urandom

Steve Grubb
2011-09-07T21:28:48Z

On Wednesday, September 07, 2011 05:10:27 PM Sasha Levin wrote:
> > > > > Something similar probably happens for getting junk on disks before
> > > > > creating an encrypted filesystem on top of them.
> > > >
> > > > During system install, this sysctl is not likely to be applied.
> > >
> > > It may happen at any time you need to create a new filesystem, which
> > > won't necessarily happen during system install.
> > >
> > > See for example the instructions on how to set up a LUKS filesystem:
> > > https://wiki.archlinux.org/index.php/System_Encryption_with_LUKS#Prepar
> > > atio n_and_mapping
> >
> > Those instructions might need to be changed. That is one way of many to
> > get random numbers on the disk. Anyone really needing the security to
> > have the sysctl on will also probably accept that its doing its job and
> > keeping the numbers random. Again, no effect unless you turn it on.
>
> There are bunch of other places that would need to be changed in that
> case :)
>
> Why not implement it as a user mode CUSE driver that would
> wrap /dev/urandom and make it behave any way you want to? why push it
> into the kernel?

For one, auditing does not work for FUSE or things like that. We have to be able to
audit who is using what. Then there are the FIPS-140 requirements and this will spread
it. There are problems sending crypto audit events from user space, too.

-Steve