back to article GNU security library GnuTLS fails on cert checks: Patch now

The notion that open source software is more likely to be secure because anyone can look at the source code looks just a little less sound today, after a serious bug was discovered in the key GnuTLS security library, impacting hundreds of applications that use it. According to this Red Hat advisory: “It was discovered that …

COMMENTS

This topic is closed for new posts.
  1. Anonymous Coward
    Anonymous Coward

    >The notion that open source software is more likely to be secure because anyone can look at the >source code looks just a little less sound today,

    I know everything on the register is a bit tongue in cheek ... but this is just FUD.

    The reason this was fixed is because someone could look at the source, see that it was broken and fix it. These exact same bugs undoubtedly exist in closed source software but you have no chance of fixing the issue as a third party.

    The fact that someone didn't find it sooner just suggests that more code audits need to happen more often. If GnuTLS is important to you, your business etc maybe instead of whining about someone finding bugs and fixing them you should be putting your money where your mouth is and pay someone to audit the codebase for you.

    1. Charles Manning

      The only reason this is news worthy...

      Generally the many eyes principle works. This time it did not. Tha is the only reason it is news.

      Normally a bug like this would not last a month.

      The attemt to inject a back door into Linux in 2003 was rooted out in less than a day, admittedly partially due to tools detecting the issues rather than eyes.

      1. Anonymous Coward
        Anonymous Coward

        Re: The only reason this is news worthy...

        The number of eyes looking at Linux is going to be a few orders of magnitude greater than those looking at GnuTLS.. and there are even fewer people that are qualified to properly audit crypto suites.

        1. big_D Silver badge

          Re: The only reason this is news worthy...

          I was listening to Security Now today, where that was being discussed and Steve Gibson was going on about what a mess the GnuTLS code is, having grown organically over time - he also said OpelSSL wasn't much better.

          1. Tom 38 Silver badge

            Re: The only reason this is news worthy...

            I was listening to Security Now today, where that was being discussed and Steve Gibson was going on about what a mess the GnuTLS code is

            grc talking shit - film at 11?

            1. Anonymous Coward
              Anonymous Coward

              Re: The only reason this is news worthy...

              Um, there's a ten year old crypto buy in GnuTLS - how is he "talking shit" exactly?

              The fucking point of GnuTLS is to create something secure, and it has a ten year old vulnerability, that nobody white hat noticed? You think that's not a mess?

      2. Anonymous Coward
        Anonymous Coward

        Re: The only reason this is news worthy...

        OSS is clearly far more vulnerable to funded agencies influencing design to introduce deliberate weaknesses. Yes sometime it might be spotted, but they have the resources to obsfucate their activities to the highest degree possible and to repeat until they succeed. For instance when the FBI back doored the BSD IPSEC stack...

        1. Chemist

          Re: The only reason this is news worthy...

          "For instance when the FBI back doored the BSD IPSEC stack..."

          As I've already replied (and I suspect to you)

          "http://bsd.slashdot.org/story/10/12/15/004235/fbi-alleged-to-have-backdoored-openbsds-ipsec-stack"

          This alleged backdoor report is 4 years old AND refers to something that might have happened in ~2000 - is this really the best you can do ?

          1. Anonymous Coward
            Anonymous Coward

            Re: The only reason this is news worthy...

            How about the backdoor in OpenSSL RSA encryption?

            1. Michael Wojcik Silver badge

              Re: The only reason this is news worthy...

              How about the backdoor in OpenSSL RSA encryption?

              How about the what now? Do you have a citation?

              If you're talking about the bug in the Debian distribution of OpenSSL, that was a bug in the CPRNG, not in RSA encryption.

              If you're talking about Dual_EC_DRBG, that backdoor was in RSA's BSAFE library, not in OpenSSL; it actually didn't work at all in OpenSSL, and clearly had never been used.

              If you're talking about something else, how about a link?

      3. Michael Wojcik Silver badge

        Re: The only reason this is news worthy...

        Generally the many eyes principle works.

        Does it? I like open source (though I'm not a fan of militant openness), and I very much like having access to source - I've fixed more than a few bugs in Other People's Code myself, starting with 4.3 BSD in the late '80s. But do you have any actual evidence that "the many eyes principle" produces a statistically-significant difference in software quality, correcting for other factors?

        I'm not saying it doesn't, and the arguments in its favor are simple - perhaps deceptively so. But I've been in the industry for 30 years and I don't recall seeing any rigorous demonstration of an advantage of open source for code quality or security. Anecdotes, sure.

        1. eulampios

          A suggested list

          Evidence? Try taking similar proprietary product and the one with the source code freely available. Compare their performance, stability, popularity, security, scalability, versatility, flexibility, portability, availability, ease of use, ubiquity, adherence to the main principles of IT etc.

          Say,

          1) Linux kernel, Free,Open,NetBSD, Darwin vs. NT kernel

          2) vim, GNU Emacs vs notepad ;) okay, you can take Visual Studio editor

          3) a GNU Linux, a BSD distro vs. Microsoft Windows

          4) gnu bash, zsh etc vs. power shell

          5) Apache, nginx vs Microsoft IIS

          etc

          So what do we get here?

          1. Anonymous Coward
            Anonymous Coward

            Re: A suggested list

            "So what do we get here?!"

            Only a couple of obvious wins there:

            1) Windows kernel is a hybrid microkernel and more modern and secure, in design at least, than the competition.

            4) Powershell wins hands down - numerous advantages, far more powerful, flexible and secure.

            1. eulampios

              dubious advantage

              more modern and secure, in design at least

              theoretically speaking, there are advantages, though no one really knows how much of this theory is actually implemented. Once again, a proprietary product is pretty much a black box.

              Hard to compare the performance here. As far as popularity, number of supported architectures, portability, flexibility (options to turn on and off), modularity and interconnectivity, modular independence with other software (say Linux, FreeBSD kernels are tested to work for many different OS envelops), NT loses big time.

              PS is very fresh (2005) compared to the much wider and more thoroughly used and better documented POSIX/Unix shells. Think of portability again.

              So, no AC, unfortunately, the proprietary counterparts a more clear to lose than win in this case.

          2. Michael Wojcik Silver badge

            Re: A suggested list

            None of that is evidence to support the assertion that open-source code is superior in quality to closed-source. It's a list of suggestions for subjects that could be compared, though someone would need to devise a suitable methodology, and frankly it's hard to see how many of your suggested pairings could be normalized to account for other factors, since they're wildly different applications with wildly different requirements and feature sets. But in any event, as it stands it's mere speculation.

    2. Anonymous Coward
      Anonymous Coward

      open source just makes it easier to find the bugs.

      The difference is whether a bug is found by a good guy who wants to fix it, or a bad guy who wants to exploit it. Sadly there are probably more bad guys than good guys reading though open source crypto code.

    3. frymaster

      "The reason this was fixed is because someone could look at the source, see that it was broken and fix it"

      Last I heard it was supposed to be the same person that introduced the bug that found it, so no, in this specific case, open source gained no advantage.

  2. Chairo
    Paris Hilton

    Less secure than what?

    So how does this make open software less secure? With a closed sourced software this bug would probably go unpatched for just as long or longer. As an added bonus you then depend on the goodwill of some company to fix it in a reasonable time frame and for the software version you are using.

    A bug in a library? Good luck, finding out, which of your closed source software uses this library and is affected.

  3. solo

    Open source vs closed source

    "..looks just a little less sound today.."

    Someone patched up a 9 year old bug by spotting it?

    Open looks a little more sound to me today.

    1. James Hughes 1

      Re: Open source vs closed source

      A nine year old bug, that has been in open code for nine years, and has taken nine years for someone to spot even though the code has been available for nine years.

      Pretty much exactly the same as would happen with closed source code. Although one wonders if the exploit was only found because the code was open, and wouldn't have been found (by hackers) if it had been closed. Interesting question - do hackers find more exploits from browsing open code than they find in closed code by reverse engineering/trial and error?

      Aside from the kernel which has many eyes on it, so is a special case, I do wonder how many bugs are found in OSS code because it's open and people can view it vs bugs found by usage. The huge majority of issues are reported during usage to the developers (even on OSS code) rather than fixed by the finder who in general hasn't the vaguest idea how the code works.

  4. Paul J Turner

    Goto considered harmful

    Still with that old BS? I'll believe it when they make CPUs, GPUs and micro's of all stripes that don't have a 'Jump' or 'Unconditional Branch' instruction.

    I have seen the compiler outputs for code in various languages written to carefully avoid 'Goto'-like commands and they still produce machine code with jumps and/or unconditional branches.

    What's the difference?

    It seems that it's more down to the programmers inability to code correctly when Goto is available and that surely argues for better code verification tools rather than crippling a language for everyone because of some peoples difficulties.

    1. Anonymous Coward
      Anonymous Coward

      Re: Goto considered harmful

      I've been at a meeting at one of the big interwebs companies where it was stated that their coding standards forbid the use of increment and decrement operators.

      I guess their coders couldn't work out that the increment to the next unit and aren't += 1 or -= 1 in the case of pointers etc.. so instead of training or firing people they retarded their coding standard.

      It's the same thing with goto. goto can be very useful ... if you're forbidding it's use because people can make mistakes you might as well just forbid people from creating code as it's possible to make mistakes.

      1. Werner McGoole
        Joke

        Re: Goto considered harmful

        "if you're forbidding it's use because people can make mistakes..."

        You're dead right there. Otherwise we'd have to ban the apostrophe.

      2. William Towle

        Re: Goto considered harmful

        > I've been at a meeting at one of the big interwebs companies where it was stated that their coding standards forbid the use of increment and decrement operators.

        I've been at a company that insisted the same.

        Admittedly, they weren't outright verboten; it was due to inheriting some platform-portable C code containing `array[index++]= expr;`, which the compiler/assembler had optimised badly (as if it had seen `array[++index]= expr;`), causing an off-by-one error. Hence these constructions were disallowed.

        These things are almost always written from experience and then corrupted by Chinese whispers until people circulate some nonsensical bastardisation of what used to be sound advice :(

    2. Wzrd1

      Re: Goto considered harmful

      I've found that the gosub type routine tends to cause far more harm, as lousy coders then don't return from the subroutine properly and leave garbage in the stack to accumulate.

      Indeed, the errors I see in flash crap out there act the same way that older software did with crapped up stacks lousy with garbage.

      1. Destroy All Monsters Silver badge
        Headmaster

        Re: Goto considered harmful

        I've found that the gosub type routine tends to cause far more harm, as lousy coders then don't return from the subroutine properly and leave garbage in the stack to accumulate.

        KNOCK KNOCK!

        Who's there?

        IT'S THE TEES!

        The Tees who?

        THE SEVEN TEES!

    3. BlueGreen

      Re: Goto considered harmful

      from the wiki page ref <http://en.wikipedia.org/wiki/Considered_harmful#cite_note-dijkstra1968-2>

      "

      The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.

      "

      Note the use of the word 'unbridled'. I think that was his main point; unrestricted use of it.

      He also says, from the original <http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF>

      "

      Since a number of years I am familiar with the observation that the qualty of programmers is a decreasing function of the density of go to statements in the programs they produce

      "

      So he acknowledges iit's down to programmer quality more than the language.

      I guess the use of gotos may have indicated a failure of the language ie. lack of adquate error handling facilities. Modern languages are much better with their try/except (still not perfect I know).

      Goto is useful for generated code in HLL's though, such as lex/yacc.

    4. Michael Wojcik Silver badge

      Re: Goto considered harmful

      Dijkstra's CACM letter (given that title by the editor) makes a very reasonable and now uncontroversial1 argument about the limitations of human programmers to understand complex flows of control.

      It's also completely fucking irrelevant to this bug, or the Apple SSL/TLS bug, and Richard should not have dragged it into the discussion.

      The goto statements in question could have been refactored into helper functions that returned instead of performing gotos, and the same bug would have been present, because "return" is of course just a sugared goto. The problems with both bugs are 1) careless coding (or possibly failure to validate the merge, in Apple's case)2, and 2) not using the proper tools to do automatic verification of very sensitive code written in a very fragile language.

      1Excepting cranks and people who haven't actually read it, of course.

      2The GnuTLS bug is just stupid.

  5. Destroy All Monsters Silver badge
    Paris Hilton

    Damn that's some ... unbeautiful ... code.

    Missing braces, simultaneous assignments, jumpan 'round like a Russian fold dancer ....

    It's time dev teams apply some metrication and use the cattle prod when the results are that side of acceptable. Even if all the goodwill of the world went into the coding.

  6. Charlie Clark Silver badge
    Mushroom

    As is noted on this Hacker News thread, alternative security libraries such as OpenSSL are available and packages can be compiled against OpenSSL rather than GnuTLS. However, as a result of license incompatibilities, plenty of packages default to GnuTLS.

    Of course, if the FSF could get of its high horse then we could all work together to avoid bugs like this being around for so long.

    As it stands I've just updated my ports and got the new version of the library. Thanks to those who spotted, fixed it and pushed the changes to the various repositories.

    1. Chemist

      "Thanks to those who spotted, fixed it and pushed the changes to the various repositories."

      Update just arrived (OpenSUSE 13.1) - echo thanks to all involved

  7. Jonathan Richards 1 Silver badge

    Show us the code!

    The diffs are here [gitorious.org], if you want to see the details, and/or care enough to patch your library in advance of a distro update.

    CVE-2014-0092 is being tracked by Ubuntu here [canonical.com], which says Priority=Medium.

  8. Mark Solaris

    My train of thought is probably a sign of the times, but DDOS?

    While trying to retrieve the URL: ftp://ftp.gnutls.org/gcrypt/

    The following error was encountered:

    Read Error

    ftp://ftp.gnutls.org/ is there, just can't drill down. Sigh.

    1. Patchstream_William

      D-Link router?

  9. Phil Lord

    The bug was discovered by....

    "The bug was discovered by Nikos Mavrogiannopoulos of the Red Hat Security Technologies Team."

    Who is, co-incidentally, one of the co-authors of GnuTLS. Who would have thought it?

  10. Tom 38 Silver badge

    Danger of using GNU "standards"

    GnuTLS only exists because of extremist GNU zealotry. The rest of the world is perfectly happy with the BSD licensed OpenSSL, but this is not "free enough" for the GNU, and so we have GnuTLS, an SSL implementation for the lawyers.

    Coming soon, GnuPNG.

    1. eulampios

      there is a gnupg though

      a very popular product, even the diehard jobsians, BSD-only, gpl haters cannot live without. There is also a gcc that is still the best compiler. Those allergic to gpl, gnu and FSF are creating their own clang compiler....

      1. Michael Wojcik Silver badge

        Re: there is a gnupg though

        There is also a gcc that is still the best compiler.

        Technically, there is gcc, which is a front-end for GCC, the GNU Compiler Collection, which - as the name hints - is a set of more than one compiler.

        And while "best compiler" is a fool's game, note that GCC C does not issue a diagnostic for the GnuTLS or Apple SSL/TLS bugs even with "all" warnings enabled. In my book, it's a pretty poor "best".

        1. eulampios

          Re: there is a gnupg though

          Note that GCC C does not issue a diagnostic for the GnuTLS or Apple SSL/TLS bugs even with "all" warnings enabled.

          And which one that could compile them both would? For as many architectures?

          1. Michael Wojcik Silver badge

            Re: there is a gnupg though

            And which one that could compile them both would? For as many architectures?

            Non-responsive. The lack of a superior alternative does not justify GCC C's failure in this regard.

  11. g00se
    Go

    goto is goto keyword of sloppy coders (potentially)

    @ Paul J Turner

    >>What's the difference?<<

    The difference is that one goto was produced by a human and the other goto/jump was produced by a machine. The latter doesn't make mistakes.

    goto is deprecated not because it's inherently bad but because it can encourage sloppy spaghetti code

    1. Lars Silver badge
      Joke

      Re: goto is goto keyword of sloppy coders (potentially)

      I have found that I am at risk every time I go to somewhere.

  12. pacman7de
    Facepalm

    GnuTLS considered harmful ..

    "The notion that open source software is more likely to be secure because anyone can look at the source code looks just a little less sound today, after a serious bug was discovered in the key GnuTLS security library"

    Feb 2008: "The recent trouble in ITS#5361 prompted me to look into the GnuTLS code a little deeper .. the code is fundamentally broken .. All of its APIs would need to be overhauled to correct its flaws and it's clear that the developers there are too naive and inexperienced to even understand that it's broken"

    1. Destroy All Monsters Silver badge
      Trollface

      Re: GnuTLS considered harmful ..

      "The programmer put down his pen and looked at his last words in resignation.

      In the quiet night, a shot rang out, covered only by the lonely mooing of a gnu."

      1. Martin Maloney
        Trollface

        Re: GnuTLS considered harmful ..

        "What's a gnu?"

        "Oh, not much -- whatsa new with you?"

        You deserved that one, you know.

        (You can never find a wildebeest icon when you really really really need one!)

    2. Howard Chu
      FAIL

      Re: GnuTLS considered harmful ..

      Read ITS#5361 too: http://www.openldap.org/its/index.cgi/Incoming?id=5361

      Niko's rebuttal to my email http://nmav.gnutls.org/2011/05/is-really-gnutls-considered-harmful.html

      My followup: https://plus.google.com/112912252727709520367/posts/RGBXrLTh7oG

      None of this is a surprise.

This topic is closed for new posts.

Other stories you might like

Biting the hand that feeds IT © 1998–2022