Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Torvalds Creates Patch for Cross-Platform Virus 195

Newsforge is reporting that Linus Torvalds took a few minutes to review the cross-platform proof of concept virus covered yesterday and has proven that the virus does indeed not work with latest kernel version 2.6.16 and even released a patch in order to fix this "problem." From the article: "The reason that the virus is not propagating itself in the latest kernel versions is due to a bug in how GCC handles specific registers in a particular system call. [...] So the virus did a number of strange things to make this show up, but on the other hand the kernel does try to avoid touching user registers, even if we've never really _guaranteed_ that. So the 2.6.16 effect is a mis-feature, even if a _normal_ app would never care. It just happened to bite the infection logic of your virus thing."
This discussion has been archived. No new comments can be posted.

Torvalds Creates Patch for Cross-Platform Virus

Comments Filter:
  • Fix it? (Score:5, Informative)

    by gnuadam ( 612852 ) on Tuesday April 18, 2006 @05:20PM (#15152756) Journal
    I think you misunderstand. He fixed a flaw in the kernel that kept the virus from *working*. The patched systems should be vulnerable.
  • Re:Does this mean... (Score:5, Informative)

    by Anakron ( 899671 ) on Tuesday April 18, 2006 @05:23PM (#15152778)
    Yes. The kernel patch works around a bug in gcc. The patched systems are now *vulnerable*
  • Re:Does this mean... (Score:3, Informative)

    by Surt ( 22457 ) on Tuesday April 18, 2006 @05:34PM (#15152856) Homepage Journal
    This was marked funny, but unless I'm misreading the article, that is in fact what was done.
  • Incorrect title (Score:5, Informative)

    by cperciva ( 102828 ) on Tuesday April 18, 2006 @05:38PM (#15152874) Homepage
    Linus did not create a patch for the virus. Linus created a patch for the Linux kernel, to fix a bug which happened to have been discovered by looking at the virus.

    Of course, if the story had been submitted with the correct title of "Linus fixes bug in Linux", it probably would never have been posted.
  • by pclminion ( 145572 ) on Tuesday April 18, 2006 @05:43PM (#15152907)
    Are you an idiot? Linus patched the kernel so that the virus WOULD work. Why would he lie about it not working in the first place if he went ahead and fixed the problem?
  • Re:Incorrect title (Score:5, Informative)

    by Anonymous Coward on Tuesday April 18, 2006 @05:44PM (#15152915)
    Sorry, it was not a bug in the kernel either. A correct title would be "Linus patches kernel with workaround for GCC bug uncovered by cross platform virus". RTFA next time smartass, MMmmmkay?
  • Re:Incorrect title (Score:5, Informative)

    by cperciva ( 102828 ) on Tuesday April 18, 2006 @05:44PM (#15152922) Homepage
    So there was a bug to be fixed anyway, and the virus just happened to uncover it?

    Yes -- and it's quite possible that this bug was affecting other code, but with programs any more complicated than a virus, nobody debugged far enough to figure out that it was a kernel bug.
  • Re:mis-feature (Score:5, Informative)

    by dhasenan ( 758719 ) on Tuesday April 18, 2006 @05:50PM (#15152951)
    The virus in question apparently wasn't infecting system files--it didn't have an elevation-of-privileges feature, so it couldn't access /bin, /usr, etc. (And /etc, too, though that's not relevant.)

    So if a 'virus' is using standard OS features that legitimate applications also use, and suddenly the virus stops working, there's obviously been a change, and it breaks those legitimate applications.

    In short, Torvalds didn't want to remove a feature without prior discussion.
  • by dhasenan ( 758719 ) on Tuesday April 18, 2006 @05:57PM (#15152993)
    Linus created a patch because of the virus. Thus, he created the patch for the virus. That is the meaning used in the article title.

    What he patched was the Linux kernel. Thus, he created the patch for the kernel. You know this usage; however, it is not the only one. Your attempt at a correction was flawed.
  • Really now? (Score:2, Informative)

    by Anonymous Coward on Tuesday April 18, 2006 @06:18PM (#15153124)
  • Re:Incorrect title (Score:2, Informative)

    by aqfire ( 885545 ) on Tuesday April 18, 2006 @06:19PM (#15153128)
    You could say that Linus patched the Linux kernel "for" the virus, so that it would run better. ;)
  • Re:Incorrect title (Score:3, Informative)

    by Anonymous Coward on Tuesday April 18, 2006 @06:19PM (#15153132)
    Most specifically, GCC made an assumption about the kernel that should have been correct (won't touch user registers) but wasn't guaranteed to be correct, and as of 2.6.16 was no longer correct. The kernel was patched to restore the assumption to correctness, since it really was a reasonable assumption.
  • Re:Bug Virus? (Score:5, Informative)

    by after fallout ( 732762 ) on Tuesday April 18, 2006 @08:31PM (#15153931)
    AFIAK, there is no actual exploit in the code provided. The virus only does things that a regular program should be able to do, given the correct permissions.

    The virus, written in assembly, calls the kernel via a depreciated interface (int 0x80 instead of syscall). It happens to have a value in the ebx register that it needs after the (buggy) system call.

    The bug in the kernel is due to the fact that gcc assumes the system call doesn't change user registers (which the kernel isn't suppossed to as a policy) so gcc forms code to make the system call in less time (less instructions, less overhead) by not caring about user registers. The fix for the bug simply restores the value of the ebx register to what it was before the system call, hence the bug now works (as it has the correct value in the ebx register).
  • by dido ( 9125 ) <dido@imperiu m . ph> on Tuesday April 18, 2006 @10:11PM (#15154441)

    Basically, if I'm reading this correctly, the virus' correct operation depended on system calls to the Linux kernel keeping values of registers unchanged, which is the correct behavior. 2.6.16 broke this behavior, but since very little other code actually assumes this as well, we didn't get serious lossage, but we *might* for other code, and were the virus rewritten to not assume that register values were preserved by system calls, it might also work properly. At any rate, this virus would still have far less teeth on GNU/Linux than it would on Windows, unless someone was stupid enough to execute it as root. And well, if you're actually foolish enough to do something like that on GNU/Linux, then you're probably also foolish enough to enter rm -rf / or something equivalent as root at some point.

After a number of decimal places, nobody gives a damn.

Working...