Slashdot Mirror


Serious Network Function Vulnerability Found In Glibc

An anonymous reader writes: A very serious security problem has been found and patched in the GNU C Library (Glibc). A heap-based buffer overflow was found in __nss_hostname_digits_dots() function, which is used by the gethostbyname() and gethostbyname2() function calls. A remote attacker able to make an application call to either of these functions could use this flaw to execute arbitrary code with the permissions of the user running the program. The vulnerability is easy to trigger as gethostbyname() can be called remotely for applications that do any kind of DNS resolving within the code. Qualys, who discovered the vulnerability (nicknamed "Ghost") during a code audit, wrote a mailing list entry with more details, including in-depth analysis and exploit vectors.

21 of 211 comments (clear)

  1. Switch back to original Linux libc? by BaronM · · Score: 5, Funny

    The libc -> glibc switch was so much fun, that I think we should do it again in reverse!

  2. Re:Open source code is open for everyone by Anonymous Coward · · Score: 5, Insightful

    I don't get it. Proprietary software has all sorts of serious vulnerabilities. Why is it that when a vulnerability is found in FOSS, you people all come out and mock it while ignoring all the incompetence of proprietary software?

    FOSS *is* more secure, and that's true even with the occasional vulnerability. You're extremely illogical to point to some vulnerabilities and conclude that it isn't more secure. How many vulnerabilities are not known about because no one can look at the source code?

  3. Re:Open source code is open for everyone by Wootery · · Score: 5, Insightful

    So long as we're writing in C, this kind of thing (buffer overflows in particular) will probably continue.

    (Lest I start a flame-war: C is awesome in its way, but more than almost any other language, it really does make it easy to miss things like this.)

  4. Re:Open source code is open for everyone by Serenissima · · Score: 3, Funny

    I don't get it......Why is it that when a vulnerability is found in FOSS, you people all come out and mock it while ignoring all the incompetence of proprietary software?

    I see that this is your first visit to Slashdot. Welcome!

    --
    Give a man a fire and he'll be warm for a day. But light a man on fire and he'll be warm for the rest of his life.
  5. Heartbleed by ArchieBunker · · Score: 3, Insightful

    How many years was Heartbleed around before anyone noticed? Apparently "many eyes" were not reading that bit of code.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
    1. Re:Heartbleed by Anonymous Coward · · Score: 4, Insightful

      How many years have various bugs been in proprietary software that no one has noticed (and most don't have a chance to notice)? This is just illogical thinking.

      Yes, we get it. Software is made by humans. Mistakes will be made, whether it's free/open source or not. The point is, FOSS provides more security by allowing more eyes to see the code and the ability to get anyone to publicly audit the code. Sometimes big vulnerabilities won't be discovered for a long time, but that applies even more to proprietary software; don't forget that.

    2. Re:Heartbleed by serviscope_minor · · Score: 4, Insightful

      Apparently "many eyes" were not reading that bit of code.

      Will you please actually read the quote rather than quoting an inorrect interpretation. The quote is:

      "given enough eyeballs, all bugs are shallow"

      It means that once a bug is found, it is shallow, i.e. quick and easy to solve for someone. It doesn't and never did mean that all bugs will be found.

      --
      SJW n. One who posts facts.
  6. From TFA by Cola+Junkee · · Score: 5, Informative

    " - We identified a number of factors that mitigate the impact of this bug. In particular, we discovered that it was fixed on May 21, 2013 (between the releases of glibc-2.17 and glibc-2.18). Unfortunately, it was not recognized as a security threat; as a result, most stable and long-term-support distributions were left exposed (and still are): Debian 7 (wheezy), Red Hat Enterprise Linux 6 & 7, CentOS 6 & 7, Ubuntu 12.04, for example. "

    So it's actually already been fixed. All that's needed here is for some distributions to push the fix out.

    --

    f u cn rd ths, u r prbbly a lsy spllr.

    1. Re:From TFA by XXeR · · Score: 4, Informative

      But .. but now it has a CVE number and everything - so it must be scary

      Written by somebody who clearly neither manages a large amount of hosts exposed to the Internet nor manages multiple environments in which there are some new hosts that are luckily patched along side other older hosts that have to run *slightly* older releases of distro's for one reason or another.

      This IS a big deal.

    2. Re:From TFA by msobkow · · Score: 3, Informative

      I just installed glibc updates for Debian, so I presume the fix has been pushed.

      --
      I do not fail; I succeed at finding out what does not work.
    3. Re:From TFA by phantomfive · · Score: 3, Informative

      Also, please note, it's not enough to call gethostby functions for this bug to be a vulnerability. For it to be a vulnerability, you need several things:

      1) A (more or less) specific sequence of function calls. Merely calling gethostby* itself won't do it.
      2) The eventual call to gethostby on a string supplied by a hostile user.
      3) Have another buffer hostile users to fill (not overflow).
      4) A weakness of your program structure that allows four bytes to reference the other buffer.
      5) Include a service that runs things on the command line.

      Exim allowed all of those. You might be able to get away without number 5 present, but the program would need some other weakness to make it exploitable.

      --
      "First they came for the slanderers and i said nothing."
  7. Re:Open source code is open for everyone by jythie · · Score: 5, Insightful

    I am suspicious of any C coder (myself included) who does not acknowledge this basic problem ^_^

  8. Not all code is vulnerable - getaddrinfo() is fine by tlhIngan · · Score: 4, Informative

    The affected call is gethostbyname() and friends, which have been deprecated by the more protocol-transparent getaddrinfo()/getnameinfo() set of APIs. If you use IPv6, getaddrinfo() is the only way (gethostbyname() and friends are AF_INET (IPv4) functions only), but they're protocol transparent ways to do DNS lookups (they can return AF_INET, AF_INET6 and any other valid address supported by the system and DNS).

    Deep down, if you look closely, they mention that code using getaddrinfo() is not vulnerable to the bug.

    Shortly after learning about getaddrinfo() I stuck to using it - far easier to use than gethostbyname() and less messy in the end. The only complication is having to call freeaddrinfo() when you're done.

  9. Think you're immune from attacks? by Rinikusu · · Score: 5, Funny

    Don't be so glib, see?

    I'll be here all night folks. Tip your servers. Make sure they're bolted in, though.

    --
    If you were me, you'd be good lookin'. - six string samurai
    1. Re:Think you're immune from attacks? by grcumb · · Score: 5, Funny

      Don't be so glib, see?

      I'll be here all night folks. Tip your servers. Make sure they're bolted in, though.

      Don't blow your stack if nobody applauds. It's just that we're overflowing with bad puns, and the funny bits get flipped around, and in the end all we see is some stupid zero on the stage who's only in it for the cache anyway.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
  10. Shallow bug doesn't mean non-existent. Fix obvious by raymorris · · Score: 5, Insightful

    In case you're unaware, "bugs are shallow" doesn't mean they don't exist.

    ESRs complete sentence is:

    "given enough eyeballs, all bugs are shallow; or more formally: Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix will be obvious to someone."

    In other words, someone will quickly quote Adam Savage and say "THERE'S your problem!". :)

    The difference between a deep bug and a shallow bug is is what happens after you notice a problem. A shallow bug is right there, at the surface. Function foo() is supposed to return x, but instead it returns x -1, and there is the line of the code that's the problem.

    A deep bug is one where you look at function foo(), which creates an instance of class Bar, which is subclassed from IEParser, which calls friend class HTML4Lexer, which has function TagAtrribute() - but TagAtrribute() returns the correct value, so how the heck is it wrong in Bar? Then when you found out WHY it's wrong, you can't come up with any way of fixing it without rewriting the HTML specification.

    Heartbleed is actually a great example. Many people looked at it right away and within an hour or so there was a patch available. Those may people discussed the three or four proposed long-term solutions and in about 24 hours we agreed on that Florian's solution was best. Florian was one of the many eyes, and the bug was shallow to him - "he fix will be obvious to someone", and that someone was Florian.

  11. Re:Open source code is open for everyone by myowntrueself · · Score: 3, Informative

    FOSS *is* more secure, and that's true even with the occasional vulnerability.

    Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooool.

    Its true *ESPECIALLY* with the occasional vulnerability because thats a vulnerability thats been found, publicised and fixed unlike in the proprietary shit where the vulnerability will be found by a limited group of people and kept secret so they can use it.

    --
    In the free world the media isn't government run; the government is media run.
  12. Raspbian vulnerable by redelm · · Score: 5, Informative

    According to directions side-thread, glibc versions prior to 2.19 are vulnerable. Checking my machines, Slackware-current and Lubuntu-14.10 are fine. Only my poor tiny Raspberry Pis are vulnerable (2.13). But they run slowly enough I can watch the gethostbyname() lookups myself :)

  13. Re:Open source code is open for everyone by myowntrueself · · Score: 3, Informative

    FOSS *is* more secure, and that's true even with the occasional vulnerability.

    Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooool.

    Its true *ESPECIALLY* with the occasional vulnerability because thats a vulnerability thats been found, publicised and fixed unlike in the proprietary shit where the vulnerability will be found by a limited group of people and kept secret so they can use it.

    Oh, you mean those nice folks over in Eastern Europe?

    and the intelligence network of the 5 main english speaking nations...

    --
    In the free world the media isn't government run; the government is media run.
  14. Re:Open source code is open for everyone by peppepz · · Score: 4, Informative
    In fact, the bug had already been audited and fixed, almost two years ago, when the security researchers found a way to exploit it. From TFA:

    We identified a number of factors that mitigate the impact of this bug. In particular, we discovered that it was fixed on May 21, 2013 (between the releases of glibc-2.17 and glibc-2.18)

    Current glibc release is 2.20. That's three relases without the bug already.

    Nothing to see here, move along.

  15. Re:Open source code is open for everyone by phantomfive · · Score: 5, Insightful

    Managed languages (like Java and C#) give you a "secure-by-default" memory and execution model that's a lot harder to accidentally mess up.

    If you think managed languages will prevent you from leaving security vulnerabilities, you are either not writing significant server software, or your software has vulnerabilities.

    The hardest security problems to solve aren't the overflows, it's the features given to users. Think of VB macro viruses, that spread wildly in a managed language. Wordpress is another example of software written in a managed language with tons of exploits.

    There are so many examples of exploits in managed systems that it's a display of ignorance to claim otherwise. .Net is especially bad in this regard, not because C# is inherently more insecure, but because the community applauds and encourages ignorance, and even makes people feel bad for knowing things. See this presentation for an example. Notice (for example) his micro-agressions against people who understand garbage collection. The implication is you don't need to think about it, C# will take care of memory.......which if you take seriously, means you'll be leaking crap all over the place and someone like me will have to come clean it up for you.

    --
    "First they came for the slanderers and i said nothing."