Conversation

The Linux kernel needs a strong CSPRNG in early boot. It doesn't have a real excuse for this being broken. There should be no issue with every program on the system using getrandom from early boot especially since the Linux kernel had important uses for the CSPRNG before PID 1.
1
6
For example, the Linux kernel has to use the CSPRNG for kernel and userspace ASLR bases, kernel and userspace SSP, memory tagging and other probabilistic mitigations. There are also many important and real use cases for generating keys and making secure network connections early.
1
2
Even if the persistent keys have already been previously generated, it's necessary to have a proper CSPRNG to create secure connections with those keys, due to how protocols are implemented with forward secrecy. A weak CSPRNG will compromise connections even with existing keys.
1
3
The baseline should be provided by a few things: regularly saving entropy and restoring that in early boot, passing gathered entropy from each boot stage to the following boot stage and obtaining it from hardware CSPRNG support. Kernel can also generate more than enough itself.
1
3
There are existing protocols for passing entropy to the kernel from the previous boot stage via the EFI RNG protocol or the device tree. Unfortunately, until recently, the Linux kernel made poor use of this. Using bootloaders like GRUB between UEFI and the kernel also breaks it.
1
3
It could also be doing a much better job at generating entropy itself. There's no good excuse for it simply blocking indefinitely and waiting for something else to generate entropy, which doesn't happen because the boot process is blocked. It can do work in that blocking call.
2
5
If anything, the security vulnerability in the /dev/urandom API should be fixed and the cargo cult /dev/random and GRND_RANDOM APIs should be deprecated and replaced with a meaningful API to approach VM cloning, an attacker leaking state, etc. by waiting for a full CSPRNG reseed.
4