lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 14 Sep 2019 15:32:46 -0700 From: Linus Torvalds <torvalds@...ux-foundation.org> To: "Theodore Y. Ts'o" <tytso@....edu> Cc: "Ahmed S. Darwish" <darwish.07@...il.com>, Andreas Dilger <adilger.kernel@...ger.ca>, Jan Kara <jack@...e.cz>, Ray Strode <rstrode@...hat.com>, William Jon McCann <mccann@....edu>, "Alexander E. Patrakov" <patrakov@...il.com>, zhangjs <zachary@...shancloud.com>, linux-ext4@...r.kernel.org, Lennart Poettering <lennart@...ttering.net>, lkml <linux-kernel@...r.kernel.org> Subject: Re: Linux 5.3-rc8 On Sat, Sep 14, 2019 at 3:24 PM Theodore Y. Ts'o <tytso@....edu> wrote: > > > > Also, we might even want to just fill the buffer and return 0 at that > > > point, to make sure that even more broken user space doesn't then try > > > to sleep manually and turn it into a "I'll wait myself" loop. > > Ugh. This makes getrandom(2) unreliable for application programers, > in that it returns success, but with the buffer filled with something > which is definitely not random. Please, let's not. You misunderstand, The buffer would always be filled with "as random as we can make it". My "return zero" was for success, but Alexander pointed out that the return value is the length, not "zero for success". > Worse, it won't even accomplish something against an obstinant > programmers. Someone who is going to change their program to sleep > loop waiting for getrandom(2) to not return with an error can just as > easily check for a buffer which is zero-filled, or an unchanged > buffer, and then sleep loop on that. Again, no they can't. They'll get random data in the buffer. And there is no way they can tell how much entropy that random data has. Exactly the same way there is absolutely no way _we_ can tell how much entropy we have. > For 5.3, can we please consider my proposal in [1]? > > [1] https://lore.kernel.org/linux-ext4/20190914162719.GA19710@mit.edu/ Honestly, to me that looks *much* worse than just saying that we need to stop allowing insane user mode boot programs make insane choices that have no basis in reality. It may be the safest thing to do, but at that point we might as well just revert the ext4 change entirely. I'd rather do that, than h ave random filesystems start making random decisions based on crazy user space behavior. Linus
Powered by blists - more mailing lists