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

 



Forgot your password?
typodupeerror
×
Security Hardware

Attacking Multicore CPUs 167

Ant writes "The Register reports that the world of current multi-core central processing units (CPUs) just entered is facing a serious threat. A security researcher at Cambridge disclosed a new class of vulnerabilities that takes advantage of concurrency to bypass security protections such as anti-virus software The attack is based on the assumption that the software that interacts with the kernel can be used without interference. The researcher, Robert Watson, showed that a carefully written exploit can attack in the window when this happens, and literally change the "words" that they are exchanging. Even if some of these dark aspects of concurrency were already known, Watson proved that real attacks can be developed, and showed that developers have to fix their code. Fast..."
This discussion has been archived. No new comments can be posted.

Attacking Multicore CPUs

Comments Filter:
  • Fast? (Score:5, Insightful)

    by JordanL ( 886154 ) <jordan.ledoux@gm[ ].com ['ail' in gap]> on Sunday September 16, 2007 @08:26AM (#20624867) Homepage

    and showed that developers have to fix their code. Fast...
    Ummm... no. In a world where the list of things that most developers need to fix is quite lengthy, some of which renders your average app unusable or even dangerous, fixing an exploit of a hardware configuration which has no proven virii in the wild is not at the top of the list.

    Yes, it's important to be proactive. No, such a difficult and obscure attack is not something that is priority one.
    • Re:Fast? (Score:5, Informative)

      by Anonymous Coward on Sunday September 16, 2007 @08:36AM (#20624949)
      "No, such a difficult and obscure attack is not something that is priority one"

      Thread one sends a command to the OS and knowing that it will take time x to complete

      Thread two waits (x-d) before overwriting the buffer used to store the command (after the OS has checked it for validity, but before the OS has actually processed it)

      what's obscure about that?

      • Re:Fast? (Score:5, Interesting)

        by Foolhardy ( 664051 ) <csmith32NO@SPAMgmail.com> on Sunday September 16, 2007 @01:00PM (#20627031)
        If that's all it is, Windows NT (and its later incarnations like XP and Vista) aren't vulnerable because kernel components facing user mode are always expected to make copies of user arguments before they're validated and used. Since the NT kernel is preemptable this would be a problem even on single CPU machines because the thread handling the syscall could be interrupted by the scheduler to execute another thread while the first was validating the arguments. Only data that is treated opaquely (e.g. a buffer to write to a file) can be accessed directly safely. This has been known and accounted for since NT was originally designed. Of course, that doesn't rule out the possibility of 3rd party developers not following the rules.

        From Common Driver Reliability Issues: User-Mode Addresses in Kernel-Mode Code [microsoft.com]

        Be prepared for changes to the contents of user-mode memory at any time; another user-mode thread in the same process might change it. Drivers must not use user-mode buffers as temporary storage, or expect the results of double fetches to yield the same results the second time.
        • Re: (Score:3, Insightful)

          by legirons ( 809082 )
          "Windows NT (and its later incarnations like XP and Vista) aren't vulnerable because kernel components facing user mode are always expected to make copies of user arguments before they're validated and used"

          So Windows has a coding standard that says this shouldn't happen. I don't see how it necessarily follows that Windows isn't vulnerable. You're assuming that all the kernel-mode code in Windows is following the standard/reccomendation that you refer to. Let's say that even one occurance of code that do
          • Re: (Score:3, Insightful)

            by Foolhardy ( 664051 )
            What I should have said is that the design of Windows NT isn't vulnerable. The article seems to be implying that this is a new sort of vulnerability, but it's not for NT because its preemptable nature has always required this to be done properly to be secure. No, I haven't personally verified the source code because I don't have access to it. Still, the core kernel team that writes such code has a good reputation for writing secure, correct code. Of all the security vulnerabilities I know of on Windows, onl
        • Re: (Score:3, Interesting)

          by adisakp ( 705706 )
          Since the NT kernel is preemptable this would be a problem even on single CPU machines

          From the Article (emphasis mine):

          "I was able to successfully bypass security in many system call wrappers by creating unmanaged concurrency between the attacking processes and the wrapper/kernel. This was possible on both uniprocessor systems and multiprocessor systems."
      • Re:Fast? (Score:4, Informative)

        by Tim C ( 15259 ) on Sunday September 16, 2007 @02:10PM (#20627611)
        Correct me if I'm wrong, but that sounds awfully similar to a race condition (it clearly isn't one, but it certainly *looks* like one), which would seem to me to mean that it would have all the same dependencies on the vagaries of system load. I'm not saying that this would be impossible to pull off, just difficult to do so consistently.

        Of course, depending on what you're actually trying to achieve, consistency may not be an issue.
      • Re: (Score:3, Interesting)

        by Wavicle ( 181176 )
        Thread two waits (x-d) before overwriting the buffer used to store the command (after the OS has checked it for validity, but before the OS has actually processed it)

        Could someone explain this to me some more. In order for thread2 to write to buffer1, there must be a page table entry mapping buffer1's physical address into thread2's virtual address space.

        Are the operating systems allowing thread2 to arbitrarily change its PTEs? That sounds like the problem right there.
      • It's obscure because, as far as I know, all the standard syscall implementations on both *nix and NT copy the contents of user-space buffers into kernel space before doing anything at all with them, including validation. From what I can tell from the article, the problem is limited to syscall wrappers, and how often are they even used? Sure, there are several implementations (all whose names I've forgotten), but how many people actually use them outside of doing research on them?

        The blurb mentions Anti-Vi

      • Re:Fast? (Score:4, Informative)

        by JoelKatz ( 46478 ) on Sunday September 16, 2007 @07:57PM (#20630673)
        This has nothing to do with multi-core CPUs. This exact same attack would work on the run-of-the-mill SMP systems that have been around for decades. Multi-core CPUs just make SMP systems more common.
        • Re: (Score:3, Insightful)

          by petermgreen ( 876956 )
          more common is a HUGE understatement, multicore CPUs have brought SMP from something servers and high end workstations sometimes had to something that all but the lowest end computers sold today have.
          • by ivan256 ( 17499 )
            "Almost" SMP.

            Two cores, one cache.

            Or sometimes, two cores, two L1 caches, two L2 caches, one L3 cache.... Either way, the only thing symmetrical about them are the execution units, and not the whole processor.
            • To me SMP means two processors which operate in the same way and have equal access to main memory. Whether they are on the same die and what cache is or isn't shared seems mostly irrelevent as long as there is a cache coherency system in place for any non shared caches.

              Do you have a different definition and if so what is it?
              • by ivan256 ( 17499 )
                I think we have largely the same definition. What you're saying is that NUMA is the opposite of SMP. I think that is a perfectly good definition.

                I was being a little more specific though, probably to a fault. To me, SMP implies that you can schedule workloads on the CPUs as equals. If you have two shared-cache multi-core packages in one system, however, the system has some NUMA-like scheduling behaviors.
    • Re:Fast? (Score:5, Insightful)

      by g0dsp33d ( 849253 ) on Sunday September 16, 2007 @10:39AM (#20625797)
      I agree. If you read the article, you'll notice that such attacks as "This was possible on both uniprocessor systems and multiprocessor systems." Also, it has been known since at least 1998. I'm guessing its not that big of a deal, because exploit code would be difficult, there are easier targets, and lastly because anti-virus software could probably still look for the code(not in real time, but only when its infected on disk or transit).
    • One day all developers will have to put a leash in every single electron that runs inside the computer.
  • by Anonymous Coward
    Does the system call wrapper run at kernel privileges (or some elevated level giving protection from the caller), or at the privileges of the calling process? If the latter, it is of course worthless. If the former, I'm not sure how you can modify values stored in privileged space before they're sent off to the original code.
    • Yeah, that'll be why the example exploit code fails.
  • Multicore? (Score:1, Insightful)

    by Anonymous Coward

    How much does the hardware platform affect the attack?
    Multiprocessor systems are marginally easier to exploit since they do not require forcing kernel context switches via paging or other techniques. However, I was able to successfully bypass the same wrappers on uniprocessor systems. I did my experimental work on Intel hardware, but they should work across a range of hardware architectures and configurations.
  • Again? (Score:5, Informative)

    by DeHackEd ( 159723 ) on Sunday September 16, 2007 @08:33AM (#20624933) Homepage
    Looks like a variation (or maybe a dup) of this [slashdot.org].
  • Damn it (Score:5, Funny)

    by Frogbert ( 589961 ) <frogbert@nOSpAm.gmail.com> on Sunday September 16, 2007 @08:36AM (#20624945)
    You see, Its these kind of computing professionals that make me feel like a fraud when people call me a computer genius.

    Stop raising the bar you tool!
    • Well, as a software developer, most laypersons would probably refer to me a computer genius, but compared to this guy, I am probably anything but. However, I can see how this happens. I'm not big on cars, but the mechanics who fix them seem to work wonders, and be car geniuses. Some of them anyway. There appears to be a lot of mechanics who all they can do is read the print out from the computer and then do a bad job at fixing it. Just like a lot of bad programmers. Anyway, that's another discussion.
      • Re: (Score:3, Funny)

        by Joebert ( 946227 )
        I'm not really a Nerd, but I did stay in a Holiday Inn Express last nite.
  • by Anonymous Coward
    (Insert Brand Name) Anti-Virus 2008: Multi-Core version (+$25 extra per core)

  • by perrin ( 891 ) on Sunday September 16, 2007 @08:49AM (#20625025)
    It seems that neither the submitter nor the slashdot editor read the article in question. The attack is not specific to multi-core systems, and it works only against programs that wrap system calls to add additional system protection. So it does not pierce through standard OS security, and you already need to have execution privileges. The writeup is just hype and FUD, IMHO.
    • by Joebert ( 946227 )

      It seems that none of the submitter, the slashdot editor, or three quarters of the people who comment, read the article in question.


      I fixed that for you.
    • by Richard W.M. Jones ( 591125 ) <richNO@SPAMannexia.org> on Sunday September 16, 2007 @09:22AM (#20625285) Homepage

      It's also old news [slashdot.org].

      The SELinux guys debunked it [livejournal.com] over a month ago.

      Rich.

      • Re: (Score:3, Informative)

        by Anonymous Coward

        He didn't debunk it; he agreed that system call wrappers have all kind of problems and described Watson's work as a "good paper". He then pointed out that SELinux doesn't use system call wrappers, so it doesn't have these problems. That doesn't mean the problems aren't real elsewhere.

        But I agree it's old news. It was old news ten years ago. Security has to be in the kernel. Period.

        • In other words, it's a problem if you use anti-virus software. Use of anti-virus software which hooks system calls is actually creating an attack vector.
    • and it works only against programs that wrap system calls to add additional system protection. So it does not pierce through standard OS security, and you already need to have execution privileges.

      Or one could look at it as standard OS security not being flexible or modifiable enough for the real world. The reason why these syscall intercepts in-process or in another process are used is because the system security doesn't do what is needed and can't be modified dynamically. The reason these things exist is because it is far easier to do these checks in user-space. I would certainly say it is a technical weakness that one has to be a skilled kernel developer and create a patch for the kernel and r

  • by A beautiful mind ( 821714 ) on Sunday September 16, 2007 @09:04AM (#20625153)

    to bypass security protections such as anti-virus software
    Anti-virus software isn't by any means "security protection", especially the type that works on a heuristical basis. They are simply long lists of known to be disadvantageous programs and a daemon that tries to match the list to data on the system.

    Sure, they might offer some kind of bandaid for systems operated by people who do not have the necessary knowledge to operate a computer, but it is first and foremost a security theater and it does more harm than good by providing a false sense of security.

    There are two solutions to the problem by the way. The former is educate the users and the latter is to switch to linux. No, seriously. The important part isn't linux, but switching away from a monoculture preferably to a desktop environment that is ruled by at least 3-4 systems that are different from each other and they are interoperating in well defined ways with each other. That way, you can get the platform (the systems it can possibly infect) down for a virus to a threshold where the percentage is simply too low for it to be able to spread.
    • by tgd ( 2822 ) on Sunday September 16, 2007 @10:11AM (#20625591)
      There's a billion PCs in the world -- if you think four OS's sharing 25% of that market makes it too small to be of interest to criminals, you're nuts.

      Monoculture is not the problem, although its a convenient flag to fly when "free as in beer" and "windows sux0rs" runs out.
      • Re: (Score:2, Insightful)

        You seem to be a bit confused as you missed the point entirely. The point is that if there is a monoculture then a single virus can infect and disrupt the entire market. On the other hand, if there isn't a monoculture, even if a virus spreads violently and wreaks havoc through one OS it will only affect that one OS's market share, leaving all the others unaffected. That would mean, in the 4 OS scenario, that a violent outbreak of some malware would only affect 25% of the entire computing universe.

        The point
        • Re: (Score:3, Insightful)

          by tgd ( 2822 )
          Nice try, but just FYI I ran Linux as my primary OS for over ten years until I switched to OSX, and still have a half dozen server boxes and three desktops with it here. There's one and only one Windows box in my house and thats my girlfriends' Dell which she has because a Mac was too expensive.

          Finding blind fan-boi-ism and ignorant arguments annoying doesn't make someone a Linux hater.
      • by A beautiful mind ( 821714 ) on Sunday September 16, 2007 @02:07PM (#20627581)
        Currently in this monopoly culture, the platform (systems a virus can infect) is around 35-40% at best. There are patched systems, way too old operating systems and incompatibilities between different versions of windows, so that even if Microsoft has an OS monopoly on the desktop PCs, it still does not translate into totally monolithic platforms a virus can spread from. (Paradoxically if everyone would run a subscription based OS with updates aka windows live it would make the security situation in IT much much worse. Possibly a doomsday kind of scenario for IT.)

        If an OS has 25% marketshare, it would translate to less than 10% of effective platform because of the incompatibilites between old and new versions, sane default settings and because at least some people patch their systems. As far as I know you only need to go below 10% or so to make it infeasible for a virus to spread. The virus would have to be very good at propagating in order to be able to spread at all. Think of the 10% as the number of pcs you could infect in theory, but of course if we for example talk about propagation by worm style or by spam, the real percentage is much lower since there are additional boundaries to pass, like spamfilters, even simple NAT home routers, etc. There are simply too many systems inbetween that the virus would waste time on trying to infect, so finding vulnerable systems is hard.

        Thinking about 25% in this sense suddently makes more sense doesn't it?
    • If you really think that such diversity is useful for security (you'd need to have several million type of operating system all incompatible with each others' code and scripting languages for it to be a useful block to worm transfer (and 50 different versions of redhat with the name changed doesn't count)) - then suddenly each OS has only a few users, so nobody to help you with problems on it, and nobody to write software for it.

      (you thought it was hard getting games to run on linux - try getting games to r
    • Would you say this if the monoculture was OpenBSD?
    • by trifish ( 826353 )
      especially the type that works on a heuristical basis. They are simply long lists of known to be disadvantageous programs and a daemon that tries to match the list to data on the system.

      I wonder why that incorrect post is modded +5.

      Heuristic scanning is the opposite of "long lists of known to be disadvantageous programs".

      It is a form of pro-active security analyzing the behavior and features of an unknown program WITHOUT any lists of known viruses. For example, does the program hook the keyboard and adds i
      • Heuristic scanning is the opposite of "long lists of known to be disadvantageous programs".

        I'm aware, the phrasing was maybe a bit confusing. I should have written something to the effect of "even the traditional list based method is quite inefficient and broken, but heuristic scanning even more so". The reason is because while in the case of lists it's trying to identify programs that cause harm, in the heuristic case it is trying to judge _intent_ of the programs.

        A virus is just simply a user mode appl

  • The article talks about wrapping OS calls to any process, and I don't think that's something Windows can really do. Yes, there is a limited hooking facility, but I don't believe there is anything that allows a user app with admin priviledges to effectively create a subsystem on top of a subsystem, which is what this application does. There are root kits that do this sort of thing on a single call, but arranging that is rather laborious. Really, the Windows kernel just isn't accessed with a single syscal
  • by davecb ( 6526 ) * <davecb@spamcop.net> on Sunday September 16, 2007 @09:51AM (#20625451) Homepage Journal
    It works on any multiprocessor, including an
    IBM 360/168 mainframe, where I first encountered it.

    --dave
  • News flash! (Score:5, Insightful)

    by achurch ( 201270 ) on Sunday September 16, 2007 @10:26AM (#20625713) Homepage

    In a multitasking system, you can read and write the same memory space at the same time! . . . Oh, I guess it's not news after all.

    Seriously, this is just Yet Another Race Condition. As long as you follow the rules of multithreaded programming (which for syscall wrappers means copying your arguments, since you can't negotiate mutexes with the caller), this is a non-issue.

    Neeext!

    • by phasm42 ( 588479 )
      Mod parent up.

      This is only a problem if your syscall wrapper didn't take this into consideration. If you're writing a syscall wrapper for security reasons, you don't pass parameters that the original caller still has write access to.
  • Parallelism (Score:3, Informative)

    by Peaker ( 72084 ) <gnupeaker.yahoo@com> on Sunday September 16, 2007 @11:22AM (#20626131) Homepage
    This should probably even work in a single-processor setup, with ordinary threads, because the user-space system call wrapper is most probably pre-emptable (How would it prevent preemption?) and thus a thread-switch can occur during the syscall wrapper code. It may be less probable, but careful timing and multiple attempts can probably achieve this same exploit on an ordinary single-processor setup.
  • Misleading article (Score:2, Informative)

    by Anonymous Coward
    From the title it seemed clear to me this article was *supposed* to be about exploits unique to SMP hardware. Yet all it really is about is generic software race conditions totally unrelated to SMP and its concurrency model.

    For those of you who didn't read the article:

    "I was able to successfully bypass security in many system call wrappers by creating unmanaged concurrency between the attacking processes and the wrapper/kernel. This was possible on both uniprocessor systems and multiprocessor systems."

    I wi
  • That summary made my head hurt. Stupid taco.
  • Rediscovered again (Score:3, Interesting)

    by kabdib ( 81955 ) on Sunday September 16, 2007 @12:16PM (#20626623) Homepage
    Nothing really new here.

    Other attacks include DMA into buffers already provided to the kernel (lots of fun with async disk and network I/O), GPU writes, OS callbacks (depends on the OS in question), and even plain vanilla threads.

    The kernel (or whatever secure subsystem you're talking about) needs to copy and verify parameters. This stuff has been known for decades. That doesn't stop weak software from being written, but it does give old farts like me a chance to kvetch :-)
  • FTA I was able to successfully bypass security in many system call wrappers by creating unmanaged concurrency between the attacking processes and the wrapper/kernel. This was possible on both uniprocessor systems and multiprocessor systems.

    What's this about attacking multi-core processors?

    The processors aren't broken, you could race a process in a uni and SMP system just the same. And in reality, your syscall security should be in there kernel itself, where any copies taken of data are passed internally to
  • Even if some of these dark aspects of concurrency were already known, Watson proved that real attacks can be developed...
    Elementary, my dear Watson.
  • Way back in the 1970's folks I worked with were hired by IBM to form a tiger team to attack VM/370. (Virtual machine OS's have been around since the 1960's.)

    They were able to crack the system by setting up a DMA based read. Then they called the kernel with some kernel call parameters. The kernel checked the parameters. And then the DMA input rolled new values onto those parameters.

    This, of course, took some careful timing.

    And it relied on kernel weakness - the weakness of leaving the user parameters in
  • I was able to successfully bypass security in many system call wrappers by creating unmanaged concurrency between the attacking processes and the wrapper/kernel. This was possible on both uniprocessor systems and multiprocessor systems.

    So, this doesn't protect UP systems at all. preempt already exposes you to these kind of concurrency issues, and one can only assume that pretty much any RT OS also is vulnerable.
  • While there are potential problems, he doesn't say which systems.

    The article mentions *nix based systems, but talks about Anti-Vir sw that layers on top of the
    OS. The layered AV SW, sounds like a windows problem.

    While there are race conditions possible with many security solutions due to the fact that they are not bound into the kernel, none of the problems are new with "multi-core" than with other "MP" machines (computers did have multiple "Cores" (CPUs) in the past -- just not on one chip).

    The article is

We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise. -- Larry Wall

Working...