Slashdot Mirror


30-Day Status Update On LibreSSL

ConstantineM writes: "Bob Beck — OpenBSD, OpenSSH and LibreSSL developer and the director of Alberta-based non-profit OpenBSD Foundation — gave a talk earlier today at BSDCan 2014 in Ottawa, discussing and illustrating the OpenSSL problems that have led to the creation of a big fork of OpenSSL that is still API-compatible with the original, providing for a drop-in replacement, without the #ifdef spaghetti and without its own "OpenSSL C" dialect.

Bob is claiming that the Maryland-incorporated OpenSSL Foundation is nothing but a for-profit front for FIPS consulting gigs, and that nobody at OpenSSL is actually interested in maintaining OpenSSL, but merely adding more and more features, with the existing bugs rotting in bug-tracking for a staggering 4 years (CVE-2010-5298 has been independently re-discovered by the OpenBSD team after having been quietly reported in OpenSSL's RT some 4 years prior). Bob reports that the bug-tracking system abandoned by OpenSSL has actually been very useful to the OpenBSD developers at finding and fixing even more of OpenSSL bugs in downstream LibreSSL, which still remain unfixed in upstream OpenSSL. It is revealed that a lot of crude cleaning has already been completed, and the process is still ongoing, but some new ciphers already saw their addition to LibreSSL — RFC 5639 EC Brainpool, ChaCha20, Poly1305, FRP256v1, and some derivatives based on the above, like ChaCha20-Poly1305 AEAD EVP from Adam Langley's Chromium OpenSSL patchset.

To conclude, Bob warns against portable LibreSSL knockoffs, and asks the community for Funding Commitment. The Linux Foundation has not yet committed support, but discussions are ongoing. Funding can be directed to the OpenBSD Foundation."
Update: 05/18 14:28 GMT by S : Changed last paragraph to better reflect the Linux Foundation's involvement.

17 of 164 comments (clear)

  1. Video of the presentation by ConstantineM · · Score: 4, Informative
    1. Re:Video of the presentation by Anonymous Coward · · Score: 5, Interesting

      Go go go LibreSSL, you guys have my complete support!!! I've filed four bugs and two enhancements with OpenSSL over the years, and all of them have been ignored by the OpenSSL devs. That's lame. I knew OpenSSL was a festering crock of shit, but what were we to do. Now we have LibreSSL and I would encourage everyone to send support, even if only just a pizza, and use LibreSSL.

  2. Re:Multiplatform? by _merlin · · Score: 4, Informative

    They removed support for OpenVMS, Pyramid, Tandem classic MacOS, and other stuff like that. I don't know if they removed Windows and OSX support, but it'd be pretty silly if they did.

  3. Throwing out all compatibility hooks makes it easy by warrencparker · · Score: 4, Informative

    The goals of LibreSSL include preserving API/ABI compatibility (keeping LibreSSL as a drop-in replacement).

  4. Its easy to be critical by MegOnWheels · · Score: 5, Insightful

    The thing about OpenSSL et al is that everyone who used it had exactly the same opportunity to review the code and make a decision about its use.
    What actually happened was that, for the most part, was that it was just used blindly as its the case with most cryptographic systems and API's.
    Whatever the motivators for the OpenSSL group were, whatever the decisions that were made or not made, the simple fact of caveat emptor still applies.

    Its good that LibreSSL is getting created, and thanks.. Seriously though, stop bashing the OpenSSL project, it is just as much the product of its community as its developers.

  5. Re:"OpenSSL C dialect" by ConstantineM · · Score: 5, Informative

    OpenSSL has basically wrote their own version of libc, and all the functions they've introduced differ is some very subtle ways from what appears in libc used by the rest of the world.

    Rest assured, OpenBSD is no stranger to portable code. Just take a look at the number of platforms they support -- http://www.openbsd.org/plat.ht....

  6. Re:"OpenSSL C dialect" by cbhacking · · Score: 5, Informative

    Yep. In fact, this was actually one of the reasons Heartbleed was so bad. Normally, anybody repeatedly attempting to read 64k chunks of heap space would hit an unallocated page pretty quickly, causing a crash alerting the victims to something being wrong. However, OpenSSL uses their own funky versions of malloc and free which pre-allocate large chunks of memory from the OS (as in, many pages), then implement their own in-process memory management on top of that. They don't free those pages back to the OS either, at least not anywhere near as soon as a sane memory manager would. This doesn't actually mean huge amounts of wasted memory - the library can mostly re-use the memory it has already requested, rather than grabbing more from the OS - but it does mean that just because something is freed doesn't mean it isn't still mapped into that process. The end result is that Heartbleed had no externally-visible evidence for the vast majority of its victims, so people didn't even know there was something to look for until the news broke.

    --
    There's no place I could be, since I've found Serenity...
  7. Re:"OpenSSL C dialect" by tlambert · · Score: 5, Informative

    What is this "C dialect" of which you speak?

    The code is largely in a subset of C; there are certain language features that make it intrinsically harder to do static analysis and checking, and which you avoid in order to avoid introducing certain classes of problems into the code. Examples include unspecified array lengths for arrays declared at the ends of structures (a c99 feature first defined with a slightly different syntax by gcc), use of function pointers that don't end up with a const qualifier after initialization, serialization and deserialization of data objects containing pointers, variant length arrays, varradic functions, with or without in-band format strings for interpretation of arguments subsequent to the format strings, etc.. For a given compiler technology, it can also include dynamic scoping, locally scoped variable, and basic block replications which introduce issues when using some code constructs. Typically, there is also a requirement for single entry/single exit, and similar techniques that can use runtime assertions (statically or optionally compiled in) in order to test on larger data sets, although by definition, such things are relative Ad Hoc, and therefore not provable in terms of code coverage.

    Similar dialects are defined by standards, such as "MISRA C" (Motor Industry Software Reliability Association), but of course, it costs money to get that standard, and it's not disclosed, so there's no open source compliance checkers, and there's no open source static analysis tools that can check the compliant code based on compliance related assumptions. One of the disclosed requirement is use of sized type everywhere, so fundamental C types are eschewed in favor of them; so you don't use "char", "short", "int", "long", and "long long", you use things like "uint8_t" and "int32_t", and so on. Another is that there are limits to allowed cyclomatic complexity, as determined by static analysis tools.

    What it pretty much comes down to is that C by itself lets you get away with things that, if you are allowed to get away with them, makes the outcome of running the program indeterminate. It's still not possible to solve/prevent the halting problem in these dialects, but it's easier to avoid getting into a situation where you have to, if you use the constrained dialect and programming style in your code.

    It's really be handy if some day MISRA or something similar became an open standard so that we could raise the level of discourse on these things, particularly as they apply to life support systems, since some people place both privacy, security of financial transactions, and so on, on an equal footing with straight life support.

  8. Re:Multiplatform? by radarjd · · Score: 5, Informative

    It does indeed appear to be OpenBSD only at present (from http://www.libressl.org/ ):

    Multi OS support will happen once we have

            Flensed, refactored, rewritten, and fixed enough of the code so we have stable baseline that we trust and can be maintained/improved.
            The right Portability team in place.
            A Stable Commitment of Funding to support an increased development and porting effort.

  9. Re:Multiplatform? by Anonymous Coward · · Score: 5, Informative

    Partially true but...
    A key issue is that the LibreSSL developers have a different approach to portability than OpenSSL has.
    - OpenSSL keeps support for very very old platforms, old compilers, old platform and compiler bugs, etc, etc.
    - OpenSSL implements this support by sprinkling the code with different code paths, depending on which platform it's being compiled to.

    LibreSSL, like OpenSSH, takes a different approach:
    - Aim at a modern platform (OpenBSD) and a modern C dialect.
    - Support other platforms by providing implementations of whatever functions are missing on those platforms.

  10. Re:Multiplatform? by thegarbz · · Score: 5, Informative

    It's in the slides. They stripped out code supporting Win16 (which won't run on modern Windows anyway), and they dropped support for pre OSX versions of Mac OS.

    That said currently they are cleaning up and perfecting the code with one and only one sane target in mind, OpenBSD. The goal is to have a very good very secure fork of OpenSSL running on OpenBSD that is fully POSIX compliant. Once that has been achieved porting should be relatively pain free.

    Give them time.

  11. Re:The Linux Foundation is not actually that evil by Anonymous Coward · · Score: 5, Informative

    Yes, I am extremely annoyed at the misquoting of my presentation, and my slides, by the person who wrote this summary for Slashdot. As I said in the talk, and in the slides, the Linux Foundation has not *yet* committed to support us. Discussions with them are ongoing. Saying that they have somehow "Ignored" us is both slanderous and wrong, and shows exactly what is wrong with Slashdot when they let garbage like this go up. If you have some sort of beef with the Linux Foundation, please take it up on your own time, and use your own name. Don't use mine, or LibreSSL's.

    But hey, it's slashdot, everybody expects you to be a dumbass...

    -Bob Beck

  12. Re:Throwing out all compatibility hooks makes it e by the_B0fh · · Score: 5, Insightful

    They are re-writing LibreSSL for *OPENBSD* across all the hardware platforms OpenBSD runs on.

    Once they have stabilized it, another team, the Portability team, will then add a portability layer for other OSes.

    What is so difficult to understand, and why is everyone getting their knickers up in a bunch over it?

    If you like OpenSSL, continue to use it. If you want a safe, secure ssl implementation, you wait for them to finish LibreSSL and use OpenBSD. If you want a safe, secure ssl implementation on other OSes, you wait for the Portability team to finish its work. To help speed it up, donate $$ so that they can bring in more programmers.

    Any other bitching just shows what an idiot you are (not saying you're bitching, just pointing that out to the general peanut gallery).

  13. Please ensure you are actually quoting directly by WayCool · · Score: 5, Informative

    I was in this talk, actually the person behind this camera and at no time did Bob state the following above:

    Linux Foundation is turning a blind eye to LibreSSL

    This is totally incorrect and should be removed. The slide doesn't even state that. Slashdot editorial committee needs to review their posts a lot closer prior to posting in a public space.

  14. Re:Throwing out all compatibility hooks makes it e by serviscope_minor · · Score: 5, Insightful

    Good idea.. I think I'll donate to the OpenSSL team who created and maintained the project for all these years.

    You mean the ones that made the heartleed bug and let bug fixes and reports rot in the tracker for 4 years?

    Personally I have no reason to believe BSD is any more capable considering laundry list of CVE's for OpenSSH including an insane PAKE credential bypass.

    To which CVE do you refer?

    Also turned off by lack of professionalism. Too many commit comments are childish reflecting lack of discipline I am uncomfortable seeing applied to a project of this type.

    Well, here's something you'll hate even more. You know that the mathematiians that develop the underlying crypto algorithms also have a sense of humour and sometimes say things/crack jokes in frustration? Basically the jokes on you. Because the "unprofessionalism" goes all the way down to the maths and you can't escape it.

    You have weird ideas of professionalism, by the way to the extent where I suspect you're a suit. It seems you consider cracking jokes in commit messages and on a project mailing list to be more important indications of professionalism than, say, letting bugs rot in a bug trcker for years and coding up and effective anti exploit mitigation layer in a crucial security library.

    --
    SJW n. One who posts facts.
  15. Re:Multiplatform? by serviscope_minor · · Score: 4, Insightful

    using /dev/*.random instead, which has many issues[1]

    I must say, I really, really don't understand most of those issues, or more specifically, most of them seem like pointless fussing non issues.

    So a large number of them are "what if someone fucks with /dev/random". Since those are protected by permissions that basically translates as "what if someeone gets root and fucks with /dev/random" which to me translates as "what if someone gets root". My general answer to that would be "j00 r pwn3d!". As far as I can see, if someone gets root, you're completely fucked anyway, since the can do something like:

    * Simply read the local unencrypted data you're trying to send or are saving
    * Open /prov/pid/mem and read your program memory
    * Same, but writing it to compromise the RNG
    * Do the same to the /dev/kmem to compromise the RNG for builtin crypto
    * Load a kernel module
    * Screw with /vmlinuz or whatever and reboot
    * Replace the binary you believe you are running with one with compromised crypto
    * Monkey with LD_PRELOAD to bring in a compromised libcrypto
    * Replace the dynamic loader so you're not running the binary you believe you are.

    and so on. In other words it seems that once the person has the ability to compromise /dev/random, you're already fucked six ways to sunday.

    But I'm not 100% sure I've missed something in my assessment.

    --
    SJW n. One who posts facts.
  16. Re:Throwing out all compatibility hooks makes it e by gnasher719 · · Score: 5, Insightful

    If you clear out the various multi-platform work for OpenSSL, _of course_ it can progress more quickly and more securely. The multi-platform work is where so much of the work has been done.

    As a person making their living writing software for MacOS X and iOS, do I care about this code running in MacOS 9? I don't care one bit.

    They explain it very well: You don't need to be "multi-platform" if you are standard. Instead of "we have thirteen implementions of SSL_memcpy that run on a dozen completely outdated platforms that nobody cares about", they use memcpy and say "if your platform doesn't support a standard C function correctly, fuck you and your platform". Which is the correct approach.