Re:Problems emerge for a unified /dev/*random
by yxhuvud on Wednesday March 30, 2022 @12:33AM
(#30851507)
Also,the problems seems mostly to be around Linux running in a VM rather than on actual hardware. Would it be possible to have the host urandom show up as a hw random number generator to the VM and then use that for initiating things? Seems less hacky than having to fiddle with seeds. Dunno how possible that is though.
Re:Problems emerge for a unified /dev/*random
by pm215 on Wednesday March 30, 2022 @05:53AM
(#30853198)
You can do that where for instance the VM has PCI and can plug in a virtio RNG device. But a lot of the QEMU setups Guenter Roeck reported issues with are emulating real (usually old) hardware which didn't have a PCI bus, or any other hardware RNG interface.
Re:Problems emerge for a unified /dev/*random
by mjevans on Wednesday March 30, 2022 @06:19AM
(#30853340)
Also lighter systems such as routers (E.G. many OpenWRT targets)
Re:Problems emerge for a unified /dev/*random
by AnssiH on Wednesday March 30, 2022 @05:18AM
(#30852978)
Yes, and that is commonly used.
But Linux must continue to work even on VMs without that, and that is the hard part.
Re:Problems emerge for a unified /dev/*random
by loeg on Wednesday March 30, 2022 @10:46AM
(#30855935)
The VMs described in the article are (faithfully) emulating real hardware lacking unpredictable timers or other sources of entropy. It’s not exclusively a VM problem; it’s a weird/old hardware problem, too.
Re:Problems emerge for a unified /dev/*random
by cperciva on Tuesday March 29, 2022 @09:19PM
(#30850483)
an entropy credit system, an idea that's more or less discredited now
... no pun intended, I'm sure.
Re:Problems emerge for a unified /dev/*random
by tptacek on Tuesday March 29, 2022 @09:45PM
(#30850627)
Nope, just coming off a migraine and not catching stuff like that. :)
Re:Problems emerge for a unified /dev/*random
by rocqua on Wednesday March 30, 2022 @04:31AM
(#30852694)
> userland RNGs are essentially the source of all practical CSPRNG vulnerabilities in the past 2 decades
Is your point that CSPRNGs should not be implemented in userland, but instead should just read from /dev/random or do the equivalent on non-linux opperating systems?
Re:Problems emerge for a unified /dev/*random
by loeg on Wednesday March 30, 2022 @10:48AM
(#30855957)
Yes, that’s been Thomas’s position for many years[1]. And I mostly agree with him on that.
[1]: https://sockpuppet.org/blog/2014/02/25/safely-generate-rando...
Re:Problems emerge for a unified /dev/*random
by raverbashing on Wednesday March 30, 2022 @06:22AM
(#30853350)
> What's hard is accurately surveying the last 15 years of systems built on top of Linux's needlessly-complicated LRNG and making changes that don't violate the expectations of those systems.
Sounds like they need a compatibility or feature (cmdline) flag.
Add the flag and you can use the new improved system. Establish dates for when the old method will not be the default anymore (but can be used with the flag) and when it will be deprecated for good
Re:Problems emerge for a unified /dev/*random
by larusso on Wednesday March 30, 2022 @06:39AM
(#30853447)
That won‘t align with the never break the user mantra. And honestly I hate these timebomb solutions some API vendors put up. In a never breaking system you can‘t remove anything only add things or change stuff internally to make it work like before. They never said to get rid of /dev/random or /dev/urandom just that both would practically be the same. From reading about the problem and the different usecases and expectations it looks like it will stay like this for another decade or more.
Re:Problems emerge for a unified /dev/*random
by amelius on Wednesday March 30, 2022 @05:26AM
(#30853034)
> Nobody should be running "jitter entropy daemons" in userland (userland RNGs are essentially the source of all practical CSPRNG vulnerabilities in the past 2 decades), but people do, and if those systems exceeded some threshold of security before Donenfeld's patches, you can't merge those patches if they push security below that threshold.
Why not break their code? Seems justified in this case.
What's hard is accurately surveying the last 15 years of systems built on top of Linux's needlessly-complicated LRNG and making changes that don't violate the expectations of those systems. Nobody should be running "jitter entropy daemons" in userland (userland RNGs are essentially the source of all practical CSPRNG vulnerabilities in the past 2 decades), but people do, and if those systems exceeded some threshold of security before Donenfeld's patches, you can't merge those patches if they push security below that threshold.
It's a really irritating problem.