Slashdot Mirror


Linux Kernel 2.6 Local Root Exploit

aquatix writes "This local root exploit (Debian, Ubuntu) seems to work everywhere I try it, as long as it's a Linux kernel version 2.6.17 to 2.6.24.1. If you don't trust your users (which you shouldn't), better compile a new kernel without vmsplice." Here is millw0rm's proof-of-concept code.

20 of 586 comments (clear)

  1. The sound you hear... by downix · · Score: 5, Funny

    And the next sound you shall hear are millions of nerds rushing into their offices to compile a new kernel on a sunday afternoon... along with the millions of cell phones ringing as the bosses read this...

    --
    Karma Whoring for Fun and Profit.
  2. jessica_biel_naked_in_my_bed.c ? by Anonymous Coward · · Score: 5, Funny

    I strongly suspect this code doesn't do what it says on the tin.

    1. Re:jessica_biel_naked_in_my_bed.c ? by LiquidCoooled · · Score: 5, Funny

      Thats because you are compiling it with the wrong target.

      You need to include justin_timberlake.h and link it with the millionaires library.

      --
      liqbase :: faster than paper
    2. Re:jessica_biel_naked_in_my_bed.c ? by BJH · · Score: 5, Funny

      realdoll_and_a_tube_of_lube_on_my_inflatable_mattress.c ?

  3. Thank God by Zoxed · · Score: 5, Funny

    Phew, lucky I run MS Windows then !!

    1. Re:Thank God by Anonymous Coward · · Score: 5, Funny

      That's like finding out there's a new 24-hour flu going around, and thanking God the AIDS will kill you first.

    2. Re:Thank God by monkeySauce · · Score: 5, Funny

      Phew, lucky I run MS Windows then !!

      I know what you mean. It's nice not having to freak out periodically like this since you live in a constant state of panic anyway.
  4. Re:Misleading by shadow42 · · Score: 5, Informative

    I just successfully used this exploit on a Fedora 7 box running 2.6.22.4. A bit out of date, yes, but a great deal of "home users" who are running Fedora, Debian, Ubuntu (especially Ubuntu), etc., either don't know how to compile their own kernel, or don't care enough to try. Not everyone who uses Linux is going to bother compiling a custom kernel in order to fix a problem like this, especially if they don't have the skills of a sysadmin.

  5. Re:For those that would rather write than read. by McDutchie · · Score: 5, Informative

    Nope, all you need is remote access to a local user account via ssh or something. Many users use weak passwords. Now you won't have to guess the root password.

    Yes, I just verified the exploit on Linux 2.6.17.13 (Slackware 11.0) and Linux 2.6.21.5 (Slackware 12.0) and it works as advertised.

  6. Re:Before the inevitable occurs: by RonnyJ · · Score: 5, Insightful

    The difference is that we know about this hole, and can now fix it
    We know about it now, but how long have some other people known about it? There's this quote from the code:

    This is quite old code and I had to rewrite it to even compile.

  7. Re:Misleading by fo0bar · · Score: 5, Funny

    This is not an universal problem. It only occurs for those kernels with a specific function compiled in that most installations won't need, and which halfway decent sysadmins won't have as part of the kernel anyhow when they don't need it.

    Yet another good example of why you shouldn't hire the sysadmins who blindly use what the vendors ship, but security and performance minded sysadmins who reduce installations to what's actually needed.

    Which reminds me, have you done your emerge -abuop6QvvvvVVvVVxz world yet today?
  8. Re:Misleading by Anonymous Coward · · Score: 5, Insightful

    The average home user that's not willing to put in the effort to compile a new kernel is the home user that doesn't have anyone but either themselves, or people with physical access to the machine using it.

    If the only people that have accounts on the machine have physical access to it, this exploit is a lot more work than just opening the box...

  9. Funny comments :) by K.+S.+Kyosuke · · Score: 5, Informative

    There are some pretty funny comments in the source code, regrettably, most people won't understand them. Hell, as a Czech, I *am* probably supposed to understand them, if it were not for the obscure north-eastern dialect of Czech that all the rest of our country finds hilarious (and incomprehensible at the same time).

    "Dovalim z knajpy a cumim ze Wojta zas nema co robit, kura." == something like "Just returned from the pub and saw that Wojta [a machine? Or a person? Unclear...] has nothing to do." [The last word might be a Czech expletive with a typo...?]
    "Gizdi, tutaj mate cosyk na hrani, kym aj totok vykeca." == something like "Here's something for you to play with, boys, ..." [last for four words utterly incomprehensible :)]
    "Stejnak je to stare jak cyp a aj jakesyk rozbite." == "Anyway, it's old as hell and somehow broken anyway"

    The style (no way am I able to render *this* in English :)) makes me think that had drunk quite a bit before he wrote these gems. Pity that I don't have a good dictionary of spicy English. I'm just rolling on the floor and seriously laughing. :) Oh, and the exploit works, which is not that *funny*.

    --
    Ezekiel 23:20
  10. Re:Beauty of OSS by Anonymous Coward · · Score: 5, Informative

    The problem is now known so I'm sure a fix is already on the way. Holy shit, no kidding - the form of an exploit which fixes the bug live in the kernel mem.
    nobody$ ./exploit
    [..]
    [+] mmap: 0xb7f29000 .. 0xb7f5b000
    [+] root
    root# ^D

    nobody$ ./disable-vmsplice-if-exploitable
    [..]
    Exploit gone!
    nobody$ ./exploit
    [+] mmap: 0xb7f34000 .. 0xb7f66000
    [-] vmsplice
    nobody$ no root for me anymore!


    By Morten Hustveit:
    "a modification of the exploit that finds the address of sys_vmsplice in the
    kernel (using /proc/kallsyms) and replaces the first byte with a RET instruction
    (using mmap of /dev/kmem)" from
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=464953#14

  11. Re:Misleading by Kjella · · Score: 5, Insightful

    You've got to be kidding me right? Like every sysadmin out there is supposed to know about every feature he doesn't use? Most of the time if you compile out something you'll end up breaking something you do want because you don't understand the internal kernel dependencies or what this really means in terms of functionality. Don't forget I now expect you on duty 24/7 to compile new kernels whenever there's a kernel patch available, particularly when you're sick and or vacation and whoever is filling in for you only knows apt-get/yum/whatever. Anyone that spent that much time on managing a Linux server would probably be fired because he'd be less efficient than a Windows server and an MSCE.

    --
    Live today, because you never know what tomorrow brings
  12. This flaw is CVE-2008-0600 by iamamoose · · Score: 5, Informative

    Upstream patch for the vulnerability tickled by that specific exploit is here
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=712a30e63c8066ed84385b12edbfb804f49cbc44

    Red Hat tracking bug (Enterprise Linux 5 is affected, but 4,3, and 2.1 are not)
    https://bugzilla.redhat.com/show_bug.cgi?id=432251

    Fedora tracking bug
    https://bugzilla.redhat.com/show_bug.cgi?id=432229

  13. Re:Misleading by kitgerrits · · Score: 5, Insightful


    You know, I haven't built my own kernel since 'make menuconfig' was the most advanced method around.
    I got rather tired of picking and choosing what I need, just to get faster boot times.

    That, and any time you need (professional) support for a third-party application, the first thing they ask you is wether you are running a stock kernel.
    I -want- to be able to tell MySQL and RedHat to fight it out amongst themselves if my database does not live up to expectations.
    I have better things to do with my time than to set-up and analyse endless system profiles, straces and stack dumps.

    Grow up, get a real job and see what the real world is like.
    You'll find that you no longer have the time to check SANS and packetstorm every day, just to see if your system is secure, spend days just to get that library to compile and then see the entire system go out the window, because it cannot be maintained (because you have be re-assigned to another project).

    --
    "I was in love with a beautiful blonde once, dear. She drove me to drink. It's the one thing I am indebted to her for."
  14. Ubuntu 7.10 generic kernel is affected. by ikarous · · Score: 5, Informative

    The poster who said that Ubuntu kernels are not affected was incorrect, at least partially. The exploit code works as advertised on my Ubuntu machines, both of which are running 7.10 with the latest generic kernel image.

  15. Re:Beauty of OSS by caluml · · Score: 5, Funny

    I don't think I'm the first of us to say "Ah shit". No, you are, you really are! Google confirms it!

    Your search - "Ah shit" - did not match any documents.
  16. This is incorrect by bconway · · Score: 5, Informative

    Vmsplice is part of the core kernel, it is not a configuration option. It is used all over the place.

    --
    Interested in open source engine management for your Subaru?