Slashdot Mirror


New Linux Kernel Vulnerability

Stop Or I'll Noop writes "Paul Starzetz writes, "A critical security vulnerability has been found in the Linux kernel memory management code inside the mremap(2) system call due to missing function return value check. This bug is completely unrelated to the mremap bug disclosed on 05-01-2003 except concerning the same internal kernel function code." Full scoop here." Update: 03/07 20:53 GMT by T : This vulnerability (and fixes) were mentioned briefly in an update to this earlier posting.

23 of 486 comments (clear)

  1. Many eyes, but wide open or tight shut ? by Space+cowboy · · Score: 5, Insightful
    I'm not sure whether this is a triumph of the distributed nature of the kernel, or a catastrophic failure of the whole model... The mremap() code was presumably
    looked at in great depth just recently, after a critical vulnerability was found. A few weeks go by and another hugely important hole is found...


    Since no special privileges are required to use the mremap(2) system call any
    process may use its unexpected behavior to disrupt the kernel memory management
    subsystem.

    Proper exploitation of this vulnerability leads to local privilege escalation
    giving an attacker full super-user privileges. The vulnerability may also lead
    to a denial-of-service attack on the available system memory.


    Now I know the consequences of a problem bear little relation to its root cause, but I am a little surprised at how this managed to find its way through all these eyes looking at the offending code a week or so ago. Actually making it work as a security hole looks to be reasonably complex, (which may be why it wasn't found, I guess), but if one piece of code can have 2 major vulnerabilities in as many weeks, maybe it's time to start worrying about when Linux *does* take over the desktop...

    I thought the automated 'Stanford Checker' (sp ?) was ideal for this sort of problem ? (Where the returned value from a function is ignored...) Perhaps it was flagged up but took some in-depth analysis for the kernel developers to realise it really was a problem...

    So, is this a master-stroke of the development model, with various people around the world all individually checking code and Hey! Someone found something, or is it a "failure" where all those people missed it the first time around, and it's a pure fluke it was found now.... I'm still not sure, but I'll give the benefit of the doubt to the model - hey, it's been fixed! :-)

    Simon
    --
    Physicists get Hadrons!
    1. Re:Many eyes, but wide open or tight shut ? by whig · · Score: 5, Insightful

      I'd be more inclined to call this a demonstration of the successful "many-eyes" approach. The latest mremap() vulnerability took only a few weeks to be discovered, and the folks publishing it are "eyes" that have alerted kernel developers to the problem.

      --
      Peace and love, y'all
    2. Re:Many eyes, but wide open or tight shut ? by Liselle · · Score: 5, Insightful

      In my humble opinion, it's an unavoidable part of making software. We have to be realistic: closed or open source, as a program gets more and more complex, more elaborate bugs come out, and some of them turn out to be exploitable. Having strict coding guidelines can help, having lots of eyes looking at the code helps, but ninja vulnerabilities will still stealth through.

      My thinking is that Linux on the desktop is going to need a contingency plan for a widespread vulerability, similar to what Microsoft does with Automatic Updates. I know it's not perfect, but I'll be damned if I can think of anything better. It's nice to think you can make a bullet-proof kernel, but also naive.

      --
      Auto-reply to ACs: "Truly, you have a dizzying intellect."
    3. Re:Many eyes, but wide open or tight shut ? by H4x0r+Jim+Duggan · · Score: 4, Insightful

      Yeh, but if you read the security report, this problem exists in *all* 2.2, 2.4, and 2.6 Linux's - so this local exploit has been sitting there for ~5 years before The Good Guys spotted it.

      That's a long time. Maybe some crackers have been using this exploit during that time (or, of course, maybe they haven't).

    4. Re:Many eyes, but wide open or tight shut ? by BlowChunx · · Score: 4, Insightful

      From the article: Proper exploitation of this vulnerability leads to local privilege escalation giving an attacker full super-user privileges.

      Now, I am not a hacker, but I think after I got local access via another exploit, I would use this current vulnerability to get root, install my back door/zombie code, etc. and leave quietly.

      Every exploit is serious.

    5. Re:Many eyes, but wide open or tight shut ? by Ironica · · Score: 4, Insightful

      You make a very salient point about why Open-Source software may be less vulnerable to attack than proprietary software. Basically, if you discover a vulnerability in a closed-source program, there is NO honorable way to get recognition or respect for your digging... the best you can do is quietly report it to the company and hope they fix it, knowing they will not usually acknowledge you for reporting it. With OS, you can gain respect and recognition for reporting the vulnerability to the community and helping them fix it. In *both* cases, you generally get no fiscal reward for your work, so the recognition and the fix are all you're motivated by. Therefore OS gives more motivation to report bugs, while proprietary software gives more motivation to exploit bugs.

      --
      Don't you wish your girlfriend was a geek like me?
  2. A lot of problems in mremap... by LucidityZero · · Score: 5, Insightful

    Wasn't there a (third) problem with mremap back around summertime too? These all sound like barebones, common mistakes. Who is contributing this source? Was it all the same person? Maybe we should be checking his/her code a bit more closely!

    --
    Sig.i>
  3. Damn by Broken_Windows · · Score: 4, Insightful

    I really did not want to spend my Sunday patching kernels.

  4. dupe by Feyr · · Score: 5, Insightful

    huu dupe? that thing was released over a week ago!

  5. Amazing what a one line oversight can do by Anonymous Coward · · Score: 5, Insightful

    Just compare the time and effort putting together the 3 page write up on the bug to the cost of reviewing and fixing the code in question when it was originally written. I believe the study that found that once the bug leaves the development shop to go to consumers it costs $9000 per line to fix. It's as true in open source as it is for closed source.

    1. Re:Amazing what a one line oversight can do by cperciva · · Score: 4, Insightful

      I believe the study that found that once the bug leaves the development shop to go to consumers it costs $9000 per line to fix.

      That figure depends largely upon how many customers you have and how sophisticated your patch-distribution system is. In pre-internet days, a critical problem might have meant shipping a floppy disk to each of your customers (of course, this reduced the chance of problems being classified as "critical"). Now, most security problems in FreeBSD can be fixed in two minutes using 50kB of bandwidth and binary patches. Most operating systems fall somewhere in the middle, distributing entire files, or even complete packages, every time a one-line security fix is necessary, with the effect of requiring a 50-fold (or more, in the case of packages) increase in bandwidth (and, over slow connections, time).

      Someone from Microsoft explained this to me as "we've got huge amounts of bandwidth, so we really don't need to save bandwidth by using patches"... it doesn't surprise me that Microsoft ignores the fact that delta compression would benefit their customers, but I expected better from Apple or the Linux community.

  6. i beg your pardon? by hot_Karls_bad_cavern · · Score: 5, Insightful

    "...And how do you avid windows-baiters react to it? How come you hypocrites just blow Windows bugs out of proportion while attempting to cover up Linux kernel holes?..."

    Um, the source code for the *fix* is listed *in* the article (you didn't read it did you?)

    i don't call posting fixed code and owning up to an exploitable coding error "covering up".

  7. Date format by mandrews · · Score: 5, Insightful
    disclosed on 05-01-2003

    OK time for me to tilt at a few windmills. Aside from the date being off by a year (the link quotes the date as 05-01-2004), is this supposed to be 1st of May or the 5th of January?

    In an international forum and for clarity, ISO 8601 dates. Therefore: 2004-01-05.

    Sorry for the rant, but I work for an international company, and have spent sizable parts of meetings trying to figure out which version of a document is "most recent", 2/3/04 or 3/2/04.

  8. MS vs Linux debugging. by innerweb · · Score: 5, Insightful
    If this had been a bug in MS, we may might not have heard about it for months or years unless someone on the outside published it. The crackers would have still had a good chance to have known about it.

    What winds up happening is I pay MS to produce a product that I have very little input on. I buy the off the shelf solution to then develop 50% of the solution anyway. And, then it crashes, the documents are incorrect (updates might be available on their web sites), and I have no way of figuring out what the issues are without paying more $s for something I paid for already. If I tried to pull the same trick, I would loose my client.

    Linux side is someone spots the issue, makes us aware of it in most cases. People have something more important than a paycheck at stake get to work on a fix for the problem. A, or multiple, potential fix(es) is(are) put up. Sometimes a fix goes straight in with minimal review (it works, most liked it), sometimes the fix gets kicked around to hash out any potential problems (in the full light of day, normally my apps do not break when the fix is rolled out.)

    I like the public knowledge aspect of OSS. Yep, hackers have access to it also, but closed source never seemed to stop them, it just stop me from protecting myself.

    Maybe we need to look at the next step for OSS? Maybe there is a better model for building OSS? Maybe companies might start providing more donations (like cheap lic fees) to a foundation that rewards freelance OSS programmers with cash for tackling certain problems (and does not pay until the code is peer reviewed and bug checked to a reasonable extent.) Maybe that would work better... Are certain organizations not starting to do that?

    Given how much OSS has accomplished in the past decade with its relative lack of fees and "structure", imagine what might happen if more companies started using their proprietary source software budget to put bounties out on features they needed in OSS. True, not all features would they want to make public, but enough they would wat to so as to dramatically cut everyone's costs (GNU lic is important because of this). Most companies actually have very close to the same needs. But, their money goes to legal and marketing fees more than it seems to go to actual development fees with off the sheld software. What an economic waste! Check out John Nash for a rather different rather OSS view of the world.

    In the end, you are left with a decision. The programmers at MS are very bright. The programmers in OSS are very bright. The real difference is the perceived safety of being able to blame MS (who you can not hold responsible yet - name one successful law suit against MS for the failure of their software to function as advertised) versus the cost effectiveness of not paying for huge legal and marketing fees (as well as other corporate overhead having very little to do with getting better or more code). I am not against programmers getting paid. I am against sloth and leeches in a corporate setting destroying the market in which programmers get paid.

    InnerWeb

    --
    Freud might say that Intelligent Design is religion's ID.
    1. Re:MS vs Linux debugging. by rruvin · · Score: 4, Insightful

      If this had been a bug in MS, we may might not have heard about it for months or years unless someone on the outside published it. And you didn't this time, either. This has been around since 2.2. How many years is that?

  9. eyes wide stupid? by EvilAlien · · Score: 5, Insightful
    The only thing separating local exploits from remote in impact is the cracker finding a way to get unpriviledged access to the host. Lots of remote but "trivial" exploits are discovered, and sysadmins like to write those off as unimportant if they don't involve priv escalation... and with the next breath, write off all local-only priv escalation vulns.

    You may trust your authorized users, but do you trust their passwords, habits in storing passwords ("You don't expect me to remember that, do you? Where are my post-it notes..."), and wisdom to not extend trust to ANYONE?

    Do you also trust users to not run a piece of malicious code that shows up purporting to be some groovy new Linux app that will do some groovy new thing? Afterall, it would only have to require a vanilla user account... and Linux never gets viruses, so why worry? ;)

    I think you see where I'm going with this. Local exploits need to be patched too, and sysadmins all too frequently think they don't because they are "only local".

    --
    perl -e 'print $i=pack(c5, (41*2), sqrt(7056), (unpack(c,H)-2), oct(115), 10)'
    1. Re:eyes wide stupid? by Anonymous Coward · · Score: 5, Insightful

      Exactly. In the real world, remote rooting in one step might earn style points, but as a general rule, it just doesn't happen that often. It can be hard work keeping everything patched up to the nines, but if your company has ever called in a (good) pen testing team, you will have experienced first hand how a chain of seemingly 'trivial' vulnerabilities (including for e.g. escalating to the 'games' group) can result in the compromise of most of your most important assets.

      Sysadmins who trivialize these 'moot' issues should realize that at some point, if not today, maybe next year, they are going to have to defend their judgement to an angry CEO who has just lost big money. I don't believe 'total security', even at the software can be attained. All we can do is to keep on patching, and to disclose these vulnerabilities in a responsible and efficient manner.

  10. Can't agree more by Craig+Ringer · · Score: 5, Insightful

    ISO dates are the way to go - for the sanity of everybody concerned. They sort lexically in a sensible way, they're in a reasonable order, and they're unambiguous (YYYY- not YY-).

    This, of course, is why nobody uses them.

    *sigh*

    As the evil dictator-like sysadmin, at work all my in-house intranet tools report ISO dates. I had a few people confused at first, but now it's the accepted format at work for things like archive directories (hundreds of directories named NN-NN-NN, NN.NN.NN or NNNNNN can get rather confusing - YYYY-MM-DD is so much easier).

    Now, if only the /rest/ of the world would change over.

    While we're at it, can we have the ISO paper sizes adopted by the few holdouts, too? (I only wish...)

  11. Re:"Windows users: want Security, install linux"?? by LO0G · · Score: 5, Insightful

    Umm.

    "On a Windows box, there would have been no peer review."

    I doubt that even Microsoft lets security fixes be released without having other Microsoft programmers review all the relevant code. A more accurate comment might be:

    "On a Windows box, there would have been no public peer review."

  12. Re:Important to Remember by KingOfBLASH · · Score: 4, Insightful
    When a Windows vulnerability is patched, it is proof that closed source software is evil.

    Wne [sic] a Linux vulnerability is patched, it is proof that open source software is wonderful.

    You know there are -- among the many, many, many open vulnerabilities out there -- two which are particularly problematic for Windows users. (There are many more out there, but I figure I'll focus in on these two for now.

    The first one allows an attacker to mask the real address of the site you're viewing in IE. So, go and open up a spam claiming that Paypal needs you to update your credit card number, and you'll actually see PayPal.com as the URL. The second one allows an attacker to crash IE and exploit arbitrary code when a user views a picture on a web page under IE.

    As a Computer Programmer, I understand how hard it is to create 100% bug free code. Any system as complex as Windows or Linux is bound to contain some bugs and / or vulnerabilities. However, when an exploit is found in Windows (to the best of my knowledge those two exploits have yet to be patched), it takes forever to get a fix to the public.

    On the other hand, as soon as I heard of the vulnerability in the Linux Kernel, I have the following options:

    1. Patch it myself and submit the patch for everyone elses benefit
    2. Disable the use of the system call that can be used to create the vulnerability until a patch is found.
    3. Help test patches created by someone else -- possibly with much stronger C skills then mine (Hey, Linus can outprogram anyone as far as I'm concerned. There's no dishonor in being outgunned by the best)

    Now, whereas I am pretty certain Slackware will have a package available for me to update my kernel in another 48 - 72 hours, and if it's absolutely urgent for me to fix it I can either disable it or fix it myself (something Windoze won't let you do -- although the nature of the vulnerability in the kernel may make disabling it impractical. But still, at least you have the option), Microsoft has not, to the best of my knowledge, fixed these vulnerabilities, even though it's been months.

    This is why Open Source Software is so great. Technically sophisticated users hold the destiny of the software in their own hands. And I haven't even begun to get started on how great it is not to submit annoying feature requests, but to make software do what you want it to do.

  13. judicial use of 'noexec' by Anonymous Coward · · Score: 4, Insightful

    this is why anywhere unpriviledged users can write (/home, /var, /tmp, etc.) should be on a partition mounted 'noexec'. If a cracker can get local access, but not execute their own code, they are limited as to what they can do. This is also another good use of chroot, although the BSD 'jail' is a more robust solution.

  14. Enough already ... Obscurity has its place by duck_prime · · Score: 4, Insightful
    this local exploit has been sitting there for ~5 years before The Good Guys spotted it.

    Well, I think this proves that the "security through obscurity" model is, at best, ineffective. If it has been so long there for anyone to see and the "good" guys didn't see it, what makes you believe that the "bad" guys would spot it?
    Well jeez, this actually sounds like an argument *for* security through obscurity. If it took so long to find the bug even with open source access, imagine how long it would have taken to find the exploit in a closed-source product.

    Don't forget ... security through obscurity (S.T.O) is not in itself a bad thing. If you don't know what you're looking for, you're unlikely to find it. The real problem with S.T.O. is that if you are relying solely on it, it is a 'brittle' defence: once an attacker is aware of the 'hidden secret' it's game over.

    So ... do you use a password on your accounts? After all, that's security through obscurity, right?
  15. Oh, yes, send me a binary... by hummassa · · Score: 4, Insightful

    Please. So, to run it I have to chmod +x it; ooh, but /home is mounted noexec, so I log as root, cp it to ... hmm ... /usr/local/bin ... nope, no /usr/local ... ok, /usr/bin it is ..., oops, it's mounted read-only, I'll have to mount -o rw,remount /usr then I'll chmod +x it, aaah ... now I go back to my regular account and execute it.
    How this compares to send me a fscking html-with-vbscript that will be executed while in the preview pane of Outlook Express and downloads another executable that has the power to install itself as a device driver and run in kernel mode?????
    Even if I have to click on the attachment, it will execute right away!!!!

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048