On 12/07/2016 23:53, Rich Felker wrote:
There are very good reasons it's a syscall rather than a device: many
use cases require a never-fails entropy source, and with the device
node approach they're vulnerable to fd-exhaustion attacks. Most
existing bad code, when faced with such a situation, falls back to
some completely insecure seed like time(). The only reliable way to
prevent such idiocy was to provide an interface that can't fail.

 But what exactly is getrandom() going to do for existing bad code?

 If the answer is "bad code should be patched", then bad code could (and
should) also be patched in the absence of getrandom() - for instance, to
replace the insecure fallbacks with better ones. getrandom() makes the
patch easier for sure, but it's not stricto sensu *needed* for that case,
unless there's just no way to get a good seed without kernel help.

 Oh well. Now that it's here, I guess it's nice that we have a random
source that just cannot fail.

--
 Laurent

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to