Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Linux Kernel Back-Door Hack Attempt Discovered

Posted by simoniker on Thu Nov 06, 2003 12:37 AM
from the intrigue-and-skullduggery dept.
An anonymous reader writes "The BitKeeper to CVS gateway was apparently hacked in an attempt to add a root exploit back door to the Linux kernel, according to the linux-kernel archive. The change was in the file kernel/exit.c and changed the user ID of a process to root under the guise of checking the validity of some flags. The core Linux BitKeeper kernel repository was not at risk, and in fact it was the BitKeeper CVS export scripts that detected the unauthorized modifications to CVS. The changes were falsely attributed in CVS to long-time Linux developer davem (David Miller). Users of the BKCVS repository should resync their trees to remove the offending code if they had replicated it since yesterday."
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • Well well (Score:5, Insightful)

    by toddhunter (659837) on Thursday November 06 2003, @12:39AM (#7404305)
    Good to see the system works. You would wonder what would happen if said hacker was working for a company on a similar closed source program. Would it have been detected?
    • Re:Well well by Anonymous Coward (Score:1) Thursday November 06 2003, @12:41AM
    • Re:Well well (Score:5, Interesting)

      Good to see the system works. You would wonder what would happen if said hacker was working for a company on a similar closed source program. Would it have been detected?

      You mean like Borland's Interbase? The compiled in backdoor [cert.org] wasn't discovered until after the database opensourced.

      My favorite quote from the advisory is:

      "This vulnerability was not introduced by unauthorized modifications to the original vendor's source. It was introduced by maintainers of the code within Borland. The back door account password cannot be changed using normal operational commands, nor can the account be deleted from existing vulnerable servers [see References]."

      How long was it in there? "These security holes affect all version of InterBase shipped since 1994, on all platforms."

      The advisory dates from 2001 -- you do the math.
      [ Parent ]
    • Re:Well well (Score:4, Funny)

      by Anonymous Coward on Thursday November 06 2003, @12:53AM (#7404408)
      You would wonder what would happen if said hacker was working for a company on a similar closed source program. Would it have been detected?


      Well the 12 backdoors I put into the Windows XP kernel haven't been detected yet.

      [ Parent ]
      • Re:Well well by soliaus (Score:1) Thursday November 06 2003, @03:55AM
        • Re:Well well by jaavaaguru (Score:2) Thursday November 06 2003, @05:36AM
          • Re:Well well by You're All Wrong (Score:1) Thursday November 06 2003, @07:05AM
            • Re:Well well by jaavaaguru (Score:2) Thursday November 06 2003, @08:36AM
              • Re:Well well by IWannaBeAnAC (Score:1) Thursday November 06 2003, @09:10AM
              • Re:Well well by You're All Wrong (Score:1) Thursday November 06 2003, @09:45AM
              • Re:Well well by Pharmboy (Score:2) Thursday November 06 2003, @07:37PM
              • Re:Well well by RichardX (Score:2) Thursday November 06 2003, @08:38PM
              • Re:Well well by You're All Wrong (Score:1) Sunday November 09 2003, @03:10PM
              • 2 replies beneath your current threshold.
            • Re:Well well by fafaforza (Score:1) Thursday November 06 2003, @10:02AM
              • Re:Well well by Trepalium (Score:1) Thursday November 06 2003, @11:41AM
          • Re:Well well by jaavaaguru (Score:2) Thursday November 06 2003, @08:38AM
            • Re:Well well by Pharmboy (Score:2) Thursday November 06 2003, @07:45PM
            • Re:Well well by Baggio (Score:1) Friday November 07 2003, @12:15AM
            • 2 replies beneath your current threshold.
          • 1 reply beneath your current threshold.
      • Re:Well well by toddestan (Score:2) Thursday November 06 2003, @06:48PM
        • Re:Well well by toddestan (Score:2) Monday November 10 2003, @11:27PM
        • 1 reply beneath your current threshold.
      • 2 replies beneath your current threshold.
    • Re:Well well (Score:5, Interesting)

      by Narphorium (667794) on Thursday November 06 2003, @01:03AM (#7404469)
      Although I see where you're going with this, I think a lot of people might ask whether this shows vulnerability in OSS instead. Sure, you and I appreciate this as a validation of the system but is that really how the media is going to portray it?

      All I'm saying is that I certainly won't be surprised when closed source vendors start using this in their anti-OSS campaigns.

      [ Parent ]
    • Re:Well well (Score:5, Insightful)

      by The Munger (695154) on Thursday November 06 2003, @01:04AM (#7404480)
      (http://www.alexandsuze.com/)
      Good to see the system works.

      And what if we just haven't discovered the code that got through yet...

      You've got to ask - assume nothing.

      +5, Tin-foil hat.
      [ Parent ]
      • Re:Well well (Score:4, Insightful)

        by Geek of Tech (678002) on Thursday November 06 2003, @01:22AM (#7404570)
        (http://www.geektownhall.com/ | Last Journal: Friday November 28 2003, @09:26PM)
        Well, I guess that means all the closed source developers have the same problem. And I guess they probably don't know either.

        [ Parent ]
      • Re:Well well by Filik (Score:3) Thursday November 06 2003, @05:40AM
        • Re:Well well by fafaforza (Score:1) Thursday November 06 2003, @10:05AM
          • Re:Well well by Random832 (Score:1) Thursday November 06 2003, @02:41PM
        • 1 reply beneath your current threshold.
      • Re:Well well (Score:4, Insightful)

        > And what if we just haven't discovered the code that got through yet...

        1. We know that SCO have been looking very closely at the Linux source code.

        2. We also know that none of the Linux boxes which serve major anti-SCO websites have been hacked into.

        3. We can deduce therefore that SCO have not found any backdoors in the Linux source code.

        While given their general level of (in)competence this doesn't amount to proof that there aren't any, it's probably a fairly safe bet.
        [ Parent ]
        • Re:Well well by MikeyO (Score:2) Thursday November 06 2003, @09:57AM
          • 1 reply beneath your current threshold.
        • 1 reply beneath your current threshold.
      • Re:Well well by sameerds (Score:1) Thursday November 06 2003, @07:32AM
      • Re:Well well by Anonymous Coward (Score:3) Thursday November 06 2003, @07:49AM
        • Re:Well well by catenos (Score:2) Thursday November 06 2003, @10:48AM
          • 1 reply beneath your current threshold.
        • Re:Well well by Greedo (Score:3) Thursday November 06 2003, @12:52PM
      • Re:Well well by Valar (Score:2) Thursday November 06 2003, @09:12AM
      • Re:Well well by dublin (Score:2) Thursday November 06 2003, @12:35PM
    • Re:Well well by Mr Europe (Score:1) Thursday November 06 2003, @01:07AM
    • Re:Well well (Score:5, Interesting)

      by blair1q (305137) on Thursday November 06 2003, @01:24AM (#7404588)
      (Last Journal: Thursday October 17 2002, @10:28AM)
      It was only detected because software found a discrepancy.

      This would happen at any closed-source shop that had the same software.

      No human eyes discovered the problem, and if someone hadn't installed the checks, it might not have been discovered for months or years or ever.
      [ Parent ]
      • Re:Well well (Score:5, Insightful)

        by danheskett (178529) <danheskett@@@gmail...com> on Thursday November 06 2003, @01:38AM (#7404652)
        Not only that, but imagine this. The hackers (in the real sense, not the TV-movie sense) who write the real low-level stuff that makes various OS's work - for example in Linux people like Alan Cox, Linus, RMS, ESR, davem, and the other regular kernel contributors submit a lot of code. Well, those people dont necessarily but a lot of code is in the kernel.

        Can anyone tell me for 100% certain that between GCC, the kernel, and various compile chain tools there isn't a subtle backdoor that creates an overrun, or a weak key, or anything like that somewhere along the line? Maybe what looks like an innocent bug or flaw or even stylistic change in one source combines with a similiar item in another source to create an exploit or a weak scheme.

        These people - real hackers - are so clever (I mean serously, writing and maintain an OS for fun puts these programmers in the top 1% of all advanced systems programmers) that what is to say that they couldn't dupe everyone even with the source available to all?

        I can imagine a situation where a corrupted/corruptable individual works hard to gain legitimate comitt access to certian tools that are widespread. GCC, the kernel, a shell or two, OpenSSL. That person starts making small changes that when aggregated expose a large exploit but when examined piece-mail are completely benign, or even benficical.

        Does anyone doubt that its technically possible? How could any automated system or person ever discover this? I am a fairly competent programmer in some areas and there have been numerous times that I've had to dissect large pieces of code painstakingly over the course of days or weeks to trace back a nasty bug. Can anyone say that its not possible that this is *already* happening in the OSS world today?
        [ Parent ]
    • Re:Well well by Senior Frac (Score:2) Thursday November 06 2003, @01:27AM
    • Re:Well well by Johnno74 (Score:3) Thursday November 06 2003, @01:44AM
      • Re:Well well by The Evil Muppet (Score:2) Thursday November 06 2003, @10:13AM
    • Re:Well well by rixstep (Score:2) Thursday November 06 2003, @04:54AM
    • Re:Well well by TrombaMarina (Score:2) Thursday November 06 2003, @09:30AM
      • Re:Well well by DaveAtFraud (Score:2) Thursday November 06 2003, @04:41PM
    • Re:3 cheers for monolithic kernals by nathanh (Score:2) Thursday November 06 2003, @12:59AM
    • Re:3 cheers for monolithic kernals by _Sprocket_ (Score:3) Thursday November 06 2003, @01:17AM
    • Re:3 cheers for monolithic kernals by TMacPhail (Score:2) Thursday November 06 2003, @02:57AM
    • Re:3 cheers for monolithic kernals by saforrest (Score:2) Thursday November 06 2003, @03:18AM
    • Re:Well well (Score:5, Interesting)

      by DunbarTheInept (764) on Thursday November 06 2003, @03:44AM (#7405122)
      (http://slashdot.org/)

      Kinda proves Steve Ballmer's comments about the lack of security in Open Source development, doesn't it?!

      No. I just proves you're a posturing idiot. The crack was detected as soon as it was attempted to be inserted, in the experimental development version of the code that hadn't even made it into any final distributions yet.

      And here's another example of your idiocy:

      If it happened in a software company, the hacker would be fired and probably charged with some kind of "espionage" charge and arrested.


      This wasn't an "inside" job. If this happened at a company, to fill the analogy, it would have been an external person, NOT someone they could fire.

      [ Parent ]
    • Re:Well well (Score:5, Insightful)

      by ajs318 (655362) <sd_resp2@earthsh ... o.uk minus punct> on Thursday November 06 2003, @05:10AM (#7405402)
      Yeah, but anybody who feels the need to use stuff like this, probably updates often and checks stuff as a matter of course anyway, and possibly even sandboxes test kernels - so the damage is self-limiting. If you always want the sharpest blades, you have to understand you can cut yourself. Ordinary mortals mostly run stock kernels, from their distributor or kernel.org. Somehow, I can't see such an obvious exploit finding its way into a major distro.

      And really, it's just more evidence that the Open Source model works. There is really nothing wrong with making a mistake, as long as you learn something from it and share what you learned with other people so they don't have to make the same mistake. Pretending you never make mistakes is another matter entirely .....
      [ Parent ]
      • Re:Well well by Pflipp (Score:2) Thursday November 06 2003, @11:34AM
    • Re:3 cheers for monolithic kernals by fuzzybunny (Score:2) Thursday November 06 2003, @06:04AM
    • 5 replies beneath your current threshold.
  • Daaaammmmmnnnn.. (Score:4, Funny)

    by NegativeK (547688) <(tekarien) (at) (hotmail.com)> on Thursday November 06 2003, @12:40AM (#7404310)
    (http://maihem.net/)
    Someone has some damned big balls to do something like that...

    Let's hope they're cut off.
  • Microsoft (Score:3, Funny)

    Anybody point fingers at Microsoft yet? SCO?

    • Re:Microsoft (Score:5, Funny)

      by Cobralisk (666114) on Thursday November 06 2003, @12:43AM (#7404339)
      No, but I'd like to see them claim copyright infringement on back-door code.
      [ Parent ]
      • Re:Microsoft by hpavc (Score:2) Thursday November 06 2003, @12:55AM
        • I wonder why not a remote root hack (Score:5, Informative)

          by Krellan (107440) <(krellan) (at) (krellan.com)> on Thursday November 06 2003, @05:53AM (#7405531)
          (http://www.krellan.com/ | Last Journal: Friday July 11 2003, @04:52PM)
          The vandal who put this in the CVS code tree obviously had a lot of skill.

          It's a clever backdoor, and might have gone unnoticed, if not for those those good automated checks in the BitKeeper-to-CVS gateway. Notice that the particular coding style is a common C gotcha (using "=", assignment, instead of "==", comparison). At first glance it looks like the value of uid is being compared with 0, when in actuality it is being assigned the value of 0: root! The gcc compiler is good about warning for this, except that this too has been defeated: as mentioned on the mailing list, notice the unusual high number of parenthesis around this expression. That high number of parenthesis has the effect of suppressing the gcc compiler warning.

          So, whoever did this obviously knew what they were doing and tried to obfuscate it. As somebody else mentioned on the kernel mailing list, if somebody is going to put in a backdoor like this, why not make it a remote root hack?

          As it is now, the above hack is only locally exploitable. A process on the local system still has to call the wait system call with that particular combination of flags, in order to trigger the exploit and get root. To my knowledge, no known applications do this, because the combination of flags is supposed to be invalid.

          If a spammer or somebody else was trying to backdoor the Linux kernel in order to gain a large number of machines to infest, then one wonders why they didn't put in a remote root exploit. It seems strange to go to all the trouble. Since this backdoor attempt has been caught and blocked, security will now only become tighter, and they might not ever get another chance like this.

          Maybe it was intended to be used with another application, also backdoored in the same manner? It might be insightful to scan other open source applications and search for this particular usage of flags to the wait system call.

          In any case, I'm glad this hack was caught!
          [ Parent ]
      • Re:Microsoft by mirthworks (Score:1) Thursday November 06 2003, @02:53AM
        • Re:Microsoft by rocket97 (Score:1) Thursday November 06 2003, @10:20AM
      • 2 replies beneath your current threshold.
    • Re:Microsoft by rlowe69 (Score:2) Thursday November 06 2003, @12:47AM
      • Re:Microsoft by PurpleBob (Score:2) Thursday November 06 2003, @01:39AM
    • Re:Microsoft by Malcontent (Score:2) Thursday November 06 2003, @12:47AM
      • Re:Microsoft by hummassa (Score:1) Thursday November 06 2003, @05:55AM
        • 1 reply beneath your current threshold.
      • 2 replies beneath your current threshold.
    • Re:Microsoft by MrLint (Score:3) Thursday November 06 2003, @12:49AM
      • Re:Microsoft by despistao (Score:1) Thursday November 06 2003, @05:03AM
        • Re:Microsoft by You're All Wrong (Score:1) Thursday November 06 2003, @08:54AM
    • Nah by Greyfox (Score:1) Thursday November 06 2003, @12:53AM
      • 1 reply beneath your current threshold.
    • Re:Microsoft by goranb (Score:1) Thursday November 06 2003, @12:59AM
    • Re:Microsoft (Score:5, Insightful)

      by iabervon (1971) on Thursday November 06 2003, @12:59AM (#7404445)
      (http://iabervon.org/~barkalow/ | Last Journal: Saturday May 31 2003, @02:01AM)
      The actual lines of code and the method by which they got there were far too clever for either Microsoft or SCO. In particular, it looked like a check for an invalid combination of flags by root, but would actually set the process to root in the case of the invalid combination of flags (and the error return value would be overwritten).

      The intent was probably that a CVS user get the bad version, work on other stuff, and send the diff (including the bad lines) to a maintainer in an otherwise good patch. However, the BKCVS gateway got confused by someone other than it changing the CVS, and complained, and Larry McVoy pointed out the issue, someone asked what the lines were, and other people figured out what they'd do. Now, of course, if someone had gotten that bit accidentally and submitted it to a maintainer, they'd notice, so the attempt seems to have failed.

      Linus pointed out a benefit to using BK: even if the official BK repository were changed, he doesn't pull from it (because his local copy has all of his changes), and he would get an error the next time he pushed to it. The repository that would have to be attacked is actually his local disk, behind a firewall and not set up for anyone else to access at all.

      If RMS wants to rant about revision control systems, he'll need to say that CVS needs to be replaced with a more functional alternative (Subversion, perhaps), not BK.
      [ Parent ]
      • Re:Microsoft by coolfrood (Score:1) Thursday November 06 2003, @01:14AM
      • Re:Microsoft by lspd (Score:2) Thursday November 06 2003, @02:09AM
        • Re:Microsoft by Wesley Felter (Score:2) Thursday November 06 2003, @02:19AM
          • Re:Microsoft by lspd (Score:2) Thursday November 06 2003, @02:37AM
        • Re:Microsoft by iabervon (Score:2) Friday November 07 2003, @11:40PM
      • Re:Microsoft (Score:5, Informative)

        by Tailhook (98486) on Thursday November 06 2003, @03:13AM (#7405022)
        The actual lines of code and the method by which they got there were far too clever for either Microsoft or SCO

        It was a subtle change but I think it would have been caught if it had been submitted to Linus. He does review code and often catches mistakes. In this case assignment was used in a condition. To good C programmers this is bad taste. I noticed that right off and I haven't written a line of C in about 6 years. Linus isn't just a good C programmer. After half a decade of watching him catch stuff like this in just his public LKML messages, I'm convinced he would have seen this if he were reading braille hardcopy of it from across the room while drunk.
        [ Parent ]
        • Re:Microsoft by adamruck (Score:2) Thursday November 06 2003, @08:54AM
        • Re:Microsoft by that _evil _gleek (Score:1) Thursday November 06 2003, @10:30AM
          • Re:Microsoft by Tailhook (Score:2) Thursday November 06 2003, @03:08PM
        • Re:Microsoft by Error27 (Score:2) Thursday November 06 2003, @10:43AM
        • Re:Microsoft by iabervon (Score:2) Friday November 07 2003, @11:53PM
        • Re:Microsoft by theLOUDroom (Score:2) Thursday November 06 2003, @02:19PM
        • 1 reply beneath your current threshold.
      • Re:Microsoft by velco (Score:1) Thursday November 06 2003, @03:26AM
      • BK by dolson (Score:2) Thursday November 06 2003, @03:27AM
      • Re:Microsoft by black mariah (Score:2) Thursday November 06 2003, @05:08AM
      • Cryptographic CVS? Monotone. by jonabbey (Score:2) Thursday November 06 2003, @10:31AM
      • Re:Microsoft by penguin7of9 (Score:2) Thursday November 06 2003, @05:26PM
      • 5 replies beneath your current threshold.
    • Re:Microsoft by Geek of Tech (Score:2) Thursday November 06 2003, @01:27AM
    • This is a BAD thing from SCO's perspective... by scsirob (Score:2) Thursday November 06 2003, @03:16AM
    • Re:Microsoft by BogWart (Score:1) Thursday November 06 2003, @03:27AM
    • 1 reply beneath your current threshold.
  • Bad News by MikeDawg (Score:1) Thursday November 06 2003, @12:41AM
  • by Mipsalawishus (674206) on Thursday November 06 2003, @12:42AM (#7404325)
    This is the reason I trust open source software. The power of peer review (in one form or another) catches these kinds of things before they are sent into the wild.
  • !!! rag (Score:3, Funny)

    by VAXGeek (3443) on Thursday November 06 2003, @12:42AM (#7404326)
    (http://slashdot.org/)
    Imagine if this had sneaked into some Longhorn code right before shipping. Many eyes make few mistakes.
    • Re:!!! rag by Makoss (Score:1) Thursday November 06 2003, @01:04AM
    • Re:!!! rag by Timesprout (Score:2) Thursday November 06 2003, @01:12AM
    • Re:!!! rag (Score:5, Funny)

      by LordLucless (582312) on Thursday November 06 2003, @01:30AM (#7404613)
      No, you don't understand. This exploit was disguised as error checking code. It'd stick out in Longhorn like a sore thumb.
      [ Parent ]
      • Re:!!! rag (Score:4, Funny)

        by Ripplet (591094) on Thursday November 06 2003, @05:25AM (#7405450)
        That's right, if it was just something like:
        /* need to be administrator here for temporary */
        /* hack, must remember to change it back again */
        /* later */
        set userLevel = administrator;
        Nobody from MS would have batted an eyelid.
        [ Parent ]
        • Re:!!! rag by Nucleon500 (Score:2) Friday November 07 2003, @02:10AM
      • Re:!!! rag by peragrin (Score:1) Thursday November 06 2003, @06:35AM
        • Re:!!! rag by You're All Wrong (Score:1) Thursday November 06 2003, @09:00AM
      • Re:!!! rag by HoldmyCauls (Score:1) Thursday November 06 2003, @09:27AM
  • hmm (Score:4, Funny)

    by Anonymous Coward on Thursday November 06 2003, @12:43AM (#7404333)
    Sounds like a plan to get the dirty GNU/hippies to upgrade to the real BitKeeper instead of using the communist CVS gateway.

    That McVoy is a smart one!

    Did you know his programmers need to feed their families and pay their mortgages? Very sad situation, I hope everybody buys 10-15 licenses ASAP.
    • 1 reply beneath your current threshold.
  • more reason to sign patches? (Score:5, Insightful)

    by tomstdenis (446163) <tomstdenisNO@SPAMgmail.com> on Thursday November 06 2003, @12:43AM (#7404344)
    (http://libtom.org/)
    Why not just establish a web-o-trust and sign patches?

    That way people who hack in won't be able to send in signed patches to the system [e.g. even if they physicially update the tree others can trivially spot the unsigned patches].

    That would of course, require people to actually think about security in terms of "oh sure people won't hack it because it hasn't been done...much...before."

    Tom