Earlier quoted context omitted.
> Plenty of things that applications that do this will have to have successfully dealt with. If I have a choice of accommodating broken applications that close all file descriptors (and you have still not named one) and having a system in which libraries can retain internal kernel handles, I'll take the latter. LibreSSL already breaks compatibility with OpenSSL in areas like FIPS compliance. Compatibility with broken…
>applications that close all file descriptors (and you have still not named one) elinks: https://github.com/yggi49/elinks/blob/master/src/protocol/fi... https://github.com/yggi49/elinks/blob/master/src/protocol/co...
LibreSSL's PRNG is Unsafe on Linux
141–150 of 151 posts
Re: LibreSSL's PRNG is Unsafe on Linux
#142This is just due to ignorance, Linux provides a AT_RANDOM auxv on process creation that could be used to seed the prng.
look at the code. AT_RANDOM is. used when it's avaible in the fallback function. For some reason, the devs don't seem to trust it much, according to the comment.
Re: LibreSSL's PRNG is Unsafe on Linux
#143Earlier quoted context omitted.
> Plenty of things that applications that do this will have to have successfully dealt with. If I have a choice of accommodating broken applications that close all file descriptors (and you have still not named one) and having a system in which libraries can retain internal kernel handles, I'll take the latter. LibreSSL already breaks compatibility with OpenSSL in areas like FIPS compliance. Compatibility with broken…
>applications that close all file descriptors (and you have still not named one) elinks: https://github.com/yggi49/elinks/blob/master/src/protocol/fi... https://github.com/yggi49/elinks/blob/master/src/protocol/co...
Re: LibreSSL's PRNG is Unsafe on Linux
#144Earlier quoted context omitted.
>applications that close all file descriptors (and you have still not named one) elinks: https://github.com/yggi49/elinks/blob/master/src/protocol/fi... https://github.com/yggi49/elinks/blob/master/src/protocol/co...
And example of what happens if you don't close all file descriptors: https://bugs.php.net/bug.php?id=38915
Re: LibreSSL's PRNG is Unsafe on Linux
#145Can we, please, have a syscall in Linux that returns random bytes from the system CSPRNG or blocks if not seeded yet and doesn't involve dealing with file descriptors? But even while one isn't available, why is LibreSSL trying to use a userland CSPRNG instead of always reading from /dev/urandom and aborting when that fails?
Yes. Actually, the relevant IETF list is now calling for that: Linux needs getentropy(2). I may cook up my own and submit it to LKML, or perhaps someone else can, but there's no way out of this one without kernel support. I don't know why the rest of the function even exists. It's the kind of cruft libReSSL is trying to get rid of. I am not entirely sure a PRNG should even exist in the library, and personally, I'd pa…
Theodore T'so isn't completely opposed to the idea, it seems.
Re: LibreSSL's PRNG is Unsafe on Linux
#146Given things like the Debian OpenSSL fiasco and Heartbleed, can we honestly put as much faith into open source crypto as it's well-funded proprietary counterparts? I honestly prefer open source and recognize the problem the author points out as clearly significant problem - as well as the benefits of LibreSSL, but I'm just not convinced there are enough eyeballs looking at open source crypto.
But reflect on this: we're looking at it now. There are more eyeballs looking at open-source crypto than closed source crypto. Reflect on that for a moment, and on the RSA BSAFE/NSA 'enabling' and the like, and remember that being well-funded didn't stop Apple's source-available implementation from going directly to fail.
I wonder, for example, what's really under the hood of, say, Microsoft SChannel/CAPI/CNG? I'm a reverse-engineer (which means I don't need no stinking source code, given a large enough supply of chocolate) so I may look in detail, when I get a large enough patch of free time. I've heard it's not as bad as it could be… but I know on this subject, for example it ships Dual_EC_DRBG as alternative in CNG (but uses CTR_DRBG by default from Vista SP1 onwards, thank goodness). The old RtlGenRandom wasn't too great, I know that much.
Re: LibreSSL's PRNG is Unsafe on Linux
#147Earlier quoted context omitted.
look at the code. AT_RANDOM is. used when it's avaible in the fallback function. For some reason, the devs don't seem to trust it much, according to the comment.
Is it guaranteed to at least be different for different processes? They could use that in addition to the PID test to know when to reseed.
Re: LibreSSL's PRNG is Unsafe on Linux
#148http://opensslrampage.org/post/91910269738/fix-for-the-libre...
Re: LibreSSL's PRNG is Unsafe on Linux
#149There's also pthread_atfork. Use that to reset the PRNG. It's a bad interface, but it'll work for this purpose. It bothers me when people very solemnly and seriously condemn systems for problems that are, in fact, amenable to reasonable solutions.
And there's a new tarball out: http://marc.info/?l=openbsd-tech&m=140548206911600&w=2
Re: LibreSSL's PRNG is Unsafe on Linux
#150OpenSSL allowed developers to interfere with RNG freely, so LibreSSL must do that, too? [Even if times have changed?](http://permalink.gmane.org/gmane.os.openbsd.cvs/129485)
Well, you can't really go at improving and cleaning up the library if you have to keep up all the old bugs and the whole crusty API around.
It's inconceivable to expect LibreSSL to be both better than OpenSSL, yet to have the exact same API and the exact same set of bugs and nuances as the original OpenSSL.
LibreSSL is meant to be a simple-enough replacement of OpenSSL for most modern software out there (http://ports.su/) — possibly with some minimal patching (http://permalink.gmane.org/gmane.os.openbsd.tech/37599) of some of the outside software — and not a one-to-one drop-in-replacement for random edge cases that depend on random and deprecated OpenSSL craft.