Slashdot Mirror


Is the x86 Architecture Less Secure?

An anonymous reader asks: "Paul Murphy at CIO Today reports that a specific Windows buffer overflow vulnerability ' depends on the rigid stack-order execution and limited page protection inherent in the x86 architecture. If Windows ran on Risc, that vulnerability would still exist, but it would be a non-issue because the exploit opportunity would be more theoretical than practical.' And implies that other Windows vulnerabilities are actually facilitated by having an x86 chip." How does the x86 processor compare with other architectures when it comes to processor based vulnerabilities? How well have newer additions, like the Execute Disable Bit, helped in practical situations?

72 of 315 comments (clear)

  1. thats because by Anonymous Coward · · Score: 3, Funny

    all x86 processors have an evil bit

  2. PR as Journalism (not) by rossifer · · Score: 5, Interesting

    Paul Murphy, I'd like you to meet Paul Graham. What we have here is an Apple press release being printed up as a trade journal article.

    Good for Apple's PR firm. I guess.

    Not that I have anything against Macs or PowerPC hardware, I just don't like disengenuous authors (or their articles).

    Regards,
    Ross

    1. Re:PR as Journalism (not) by figleaf · · Score: 3, Interesting
    2. Re:PR as Journalism (not) by ErikTheRed · · Score: 5, Interesting

      Something about news articles in general (as I learned from one of my clients, a PR agency) - many "reporters" create "stories" by basically doing some light editing (if that) on a press release. If you want to get your product or service in a newspaper, magazine, etc., the best thing to do is to have a pre-written piece that the "reporter" can slap their name on. It's a reasonable bet, for instance, that any positive story in your local paper about some local business was written either by that business or their PR agency. That doesn't necessarily mean it contains untrue information, but it certainly colors whatever facts are included.

      This is the actual main reason for many people's complaints that news sources lean too far left or right or whatever - much of the "news" is generated by PR firms, advocacy groups, political parties, etc., given a very thin coat of paint, and slapped on the page. Some actual work is done on the editorial page, and in the reviews (although there have been some "reviews" done along these lines for things like restaurants - caveat emptor), but by and large you should take most newspaper and magazine stories with an appropriate grain of salt (unless you have a particularly high level of confidence in a specific writer or publication).

      --

      Help save the critically endangered Blue Iguana
  3. Happy Paul Murphy Day by Anonymous Coward · · Score: 5, Funny

    What, is there only one tech writer in the world? (See article two or three down on SCO)

  4. RISCy by FidelCatsro · · Score: 5, Insightful

    If windows Ran on a RISC arch then it would be just as insecure .
    The fact is not that this issue is an insecurity in X86 but the fact that windows uses it .If you know of a flaw in your architecutre then why are you programing
    to that flaw .

    --
    The only things certain in war are Propaganda and Death. You can never be sure which is which though
    1. Re:RISCy by nocomment · · Score: 5, Insightful

      Bingo. Well said. OpenBSD runs on x86, does it have this flaw?

      --
      /* oops I accidentally made a comment, sorry */
      /* http://allyourbasearebelongto.us */
    2. Re:RISCy by ArbitraryConstant · · Score: 2, Interesting

      Exactly.

      The security advantage of MacOS X is a lack of braindead design decisions, it has nothing to do with PowerPC.

      --
      I rarely criticize things I don't care about.
    3. Re:RISCy by Michalson · · Score: 5, Insightful

      Microsoft isn't the one relying on it, they just are supporting it to a degree because they understand the marketing importance of having backwards compatiblity for all the stuff people use (from a Joe user/Bob Company perspective, what's the point of "upgrading" to the latest version if suddenly your software/hardware stops working). Microsoft actually has got a lot of flak for making things tighter; a big one being the 9X->NT path that made a lot of API calls do a better job of checking parameters, resulting in sloppy programs being broken. More recently the SP2 update broke programs that mess with memory like a virus/exploit. So make up your mind - are they bad for maintaining backward compatiblity that is less secure/less stable, or are they bad for tightening things up and thus breaking a few badly written 3rd party programs people rely on.

    4. Re:RISCy by SpinJaunt · · Score: 2, Informative
      ...are they bad for maintaining backward compatiblity that is less secure/less stable, or are they bad for tightening things up and thus breaking a few badly written 3rd party programs people rely on...
      you obviously haven't seen the list: http://support.microsoft.com/default.aspx?kbid=884 130&product=windowsxpsp2/ more info: http://support.microsoft.com/default.aspx?kbid=842 242/ Enjoy..
      --
      /. is good for you.
    5. Re:RISCy by NutscrapeSucks · · Score: 3, Interesting

      To be fair, OpenBSD doesn't really care much about performance, and is willing to take a big speed hit for security. They have implemented workarounds for the architecture that have been deemed unacceptable elsewhere (Linux). All of this is pretty recent -- a few years ago, they had all the same fundemental problems as everyone else.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
  5. Is this the Astrodome? by winkydink · · Score: 5, Insightful

    2 articles in under 4 hours submitted by an "anonymous reader" that point to Paul Murphy at CIO Today. Hmmmm... Astroturf anybody?

    --

    "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    1. Re:Is this the Astrodome? by stevesliva · · Score: 2, Funny
      Draw dubious conclusions from circumstantial evidence that question the anti-wintel open source orthodoxy, get cited on Slashdot!

      Right this instant, I'm working on my "Windows better for pirating media files" opinion piece. It's a surefire winner.

      --
      Who do you get to be an expert to tell you something's not obvious? The least insightful person you can find? -J Roberts
  6. I gotta call bullshit on this one... by HotNeedleOfInquiry · · Score: 5, Informative

    Blame the machine or blame the programmer? You can write x86 code without buffer overflows, period. That you can be more sloppy on other architectures and not get overflows seems silly. Like "everyone should drive Volvos cause they are safer."

    Lots of things can be laid at the feet of x86 architecture, but not that it seduces programmers into writing code with buffer overflows.

    --
    "Eve of Destruction", it's not just for old hippies anymore...
    1. Re:I gotta call bullshit on this one... by Anonymous Coward · · Score: 2, Insightful

      Blame the machine or blame the programmer?

      How about blaming both?

      A machine can make it more difficult for extremely common types of attack to be successful. If it doesn't, then it shares some of the blame.

      A programmer can avoid troublesome functions and coding styles, can test with bad data more thoroughly, and can use automated tools to catch these problems before they are a security issue. If they don't, then they share some of the blame.

      A programming language can mitigate these issues by providing standard library functions that aren't vulnerable to being misused in this way, bounds-check, provide higher-level libraries, etc. If it doesn't, then it shares some of the blame.

      A manager can reduce risk by giving the programmers the resources to do their jobs properly, mandating safer languages, instituting code reviews, pushing back schedules instead of skipping QA, etc. If they don't, they share some of the blame.

      Security is only as strong as the weakest link, and nobody in the chain is ever perfect.

    2. Re:I gotta call bullshit on this one... by AaronD12 · · Score: 3, Insightful
      You are correct that you can write x86 code without buffer overflows. I've always thought that dynamically-assigned buffers were trouble since I first learned them.

      What the author of this article is saying is that PowerPC-based computers would only have a 1-in-6 chance of being able to execute code arbitrarily spilled over actual code via buffer overflow.

      Moreover the way that data and code "segments" (I'm using the x86 word here) just don't work the same way on PowerPCs. This essentially prevents arbitrary code from being executed on this particular RISC processor.

      This is not a Mac-specific thing. Any computer (RS6000, AS/400, IBM xSeries, etc.) with a PowerPC family processor will have this benefit.

      Windows might still be insecure, but it would be less insecure running on a PowerPC RISC processor.

      -Aaron-

    3. Re:I gotta call bullshit on this one... by Anonymous Coward · · Score: 2, Interesting
      This is complex. Simply adding NX to x86 doesn't mean much, the platform still has to know when heap is code and when it's heap and when it switches from one to the other and it's not easy to retro fit in, x86 platforms would be different, probably not substantially but still different and there'd be no legacy, had NX been there a long time ago.


      As for bugs, I agree with you but I also know how easy and how common it is. We need to use multiple tools, just saying hire better coders or something to that effect is a cop-out. We need to use programming technologies that are better suited for the problems and less prone to these kinds of defects, we needs platforms that take security seriously and provide different mechanisms for enforcing policy and then ultimately hardware that allows those platforms to be created and operate correctly. Sure, we can take plain old x86 and write bug free code and make it more "secure," unfortunately, that's just not practical or affordable.


      I'd rather have my buggy code produce a segfault and cause a process to be restarted than expose sensitive data or allow an attacker to execute arbitrary code on my machines. I'd really like it to be completely bugfree but that's just not very realistic, in the mean time I'd rather deal with a DoS than a full root compromise..

  7. Funny... by scovetta · · Score: 5, Insightful

    If Windows ran on Risc, that vulnerability would still exist, but it would be a non-issue because the exploit opportunity would be more theoretical than practical.

    Funny how exploits that are "just theoretical" don't stay that way forever...

    --
    Wer mit Ungeheuern kämpft, mag zusehn, dass er nicht dabei zum Ungeheuer wird. --Nietzsche
    1. Re:Funny... by kasperd · · Score: 3, Interesting

      Funny how exploits that are "just theoretical" don't stay that way forever...

      I always liked this phrack article about how to exploit an appearently unexploitable bug. After reading this, I would be very cautious about clasifying a bug as unexploitable.

      --

      Do you care about the security of your wireless mouse?
  8. Stack by Sloppy · · Score: 4, Interesting
    The x86 has always been known to be inferior. But the most blatant problem isn't lack of execution permission bits by page, or anything subtle. The biggest problem is something so huge and obvious, that people have stopped being able to see it, because they're completely immersed in it.

    On x86, the stack grows backwards. Backwards! A stack overflow ought to overwrite unallocated space, not earlier stack frames and return addresses. It's totally insane.

    But I guess when you live with insanity year after year, you get used it.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    1. Re:Stack by kernel_dan · · Score: 2, Insightful

      The stack goes backwards and the heap goes upwards. They grow in opposite directions to minimize wasted space. You would prefer heap overflows to overwrite the stack frames and return addresses?

      Careful programming when dealing with memory in a language without builtin bounds checking is the solution to this problem.

      --

      Illegal? Samir, This is America.
    2. Re:Stack by Sloppy · · Score: 2, Insightful
      why would up equal non-allocated?
      Well, some direction needs to be unallocated.
      Overflowing memory is bad, period.
      Hey, I can't say "bugs are ok." It's just a question of how catastrophic you want the bugs to be. Maybe having them always be a distaster (because return address gets overwritten) has some advantages, in that it makes bugs less subtle so the developer will more likely find them. But according to history, that seems to have not worked out, given that even non-programmers now know what "buffer overflow" means.
      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    3. Re:Stack by CajunArson · · Score: 5, Interesting

      Bzzztt.... wrong, Thankyou for playing. As I learned firsthand when coding buffer overflows in a security class, it is a simple, easy, and wrong assumption to think that the stack growing down is the main reason you can do buffer overflows. The main reason is that you are allowed to write where you're not supposed to, not matter what direction the stack grows. Hint: Remember what a stack is exactly... a buffer overflow can just as easily write up into another function's space and execute the overflow from there.
      It actually turns out that a bunch of the random relocation and offset tricks while helpful, can still be defeated, so simply growing the stack in a different direction is not a real solution.

      --
      AntiFA: An abbreviation for Anti First Amendment.
    4. Re:Stack by pclminion · · Score: 5, Insightful
      A stack overflow ought to overwrite unallocated space, not earlier stack frames and return addresses. It's totally insane.

      Not really. You assume that all buffer overflows overflow in the "upward" direction. It's just as easy, in C, to code a loop that progresses backward through memory. I've had many reasons and occassions to do it. Simply making the stack grow upward instead of downward won't solve the underlying basic issue, which is that without proper bounds checking, the program can overwrite memory it's not supposed to.

      Besides, it's incredibly convenient for the stack to grow downward. Program code and data starts at the bottom of virtual memory, and the stack starts at the top. You just map in new page frames as necessary. If the stack grew the other direction, it would either have to be limited in size, or you'd have to shift it in memory if it grew too large. Shifting it is practically impossible, since you'd have to find all program pointers into the stack and update them all to reflect the new stack. Gad, I don't even want to think about it.

    5. Re:Stack by leshert · · Score: 4, Informative

      But why I ask is the OS allowing one process to overwrite memory of another.

      It doesn't--that's not what an overflow attack is.

      An overflow attack causes a process to overwrite its _own_ memory, with instructions carefully chosen by the attacker. The attacker's code is executed by the attacked process itself.

      Think of it like the old Bart Simpson gag of calling up Moe's and asking for "Mr. Butz, first name Seymour". If you can get Moe (the process under attack) to repeat what you say (the attack payload), he's as good as yours.

    6. Re:Stack by Lemming+Mark · · Score: 2, Informative

      > But why I ask is the OS allowing one process to
      > overwrite memory of another.

      It's not allowing a process to directly overwrite another process's memory. Buffer overflows basically "trick" a program into overwriting bits of its own memory that the author didn't expect.

      > Is it just that the stack is limited?

      It's something that you have to code carefully to avoid, since C lacks various checks that avoid the programmer having to worry about this. Lots of languages do have these checks but they're less popular.

      Stacks on x86 grow downwards (i.e. to lower memory addresses). Each time you call a function, the top of the stack gets *lower* in virtual memory.

      Suppose we have a function "foo":

      void foo()
      {
      char[12] filename; ...does...stuff...here...
      return;
      }

      It allocates a 12 character array *on the stack*. If we can trick foo() into writing more than 12 characters into the "filename" array, then it'll continue to write the data into higher and higher addresses *overwriting earlier data on the stack*.

      The process is overwriting its own memory so there's nothing the OS can do to protect against it. The trouble is that if the data foo() read is not only too large but contains some malicious code, the application may be tricked into running that code when the function exits. If the application was running as root (or if the code was part of the kernel) then that malicious code now has control of your system :-(

      > As another posted said is it a hangover from
      > days of tightly limited system resources
      > and no swap?

      Not really, it's something that just happens. Writing code which allows buffers to be overflowed in this way is sloppy - the coder got it wrong.

    7. Re:Stack by ebuck · · Score: 3, Insightful

      Up and down mean nothing in a computer, that is, they mean just as much as the stack growing left to right, or right to left. Or even upper-right corner to lower-left corner, diagonally.

      0x00000000 isn't the math number 0, nor is 0xFFFFFFFF unless you assign that meaning to it. A perfect example is in floating point numbers, which mean something totally different that the same sized integer, which is totally different that the same sized memory address.

      As others have already said. It's not the direction, it's the ability to do something that you shouldn't be able to do.

  9. Maybe I'm missing something here... by HotNeedleOfInquiry · · Score: 2

    But doesn't pretty much everyone use a compiler. And doesn't the compiler pretty much insulate you from such issues? What am I missing?

    --
    "Eve of Destruction", it's not just for old hippies anymore...
    1. Re:Maybe I'm missing something here... by Locke2005 · · Score: 2, Insightful

      The issue is whether the stack grows downwards (from higher memory address to lower) or upwards (from lower memory addresses to higher). If the stack grows downwards, then overrunning an array allocated on the stack (due to missing bounds check, which is bad programming) can overwrite a return address on the stack. Then the function can return to an arbitrary address. If the stack grew upwards, this would not be possible. No, the compiler cannot insulate you from basic CPU design. On the other hand, not bounds checking array accesses should always be considered a "bug".

      --
      I've abandoned my search for truth; now I'm just looking for some useful delusions.
  10. RISC isn't the solution by ikewillis · · Score: 5, Informative
    I administrate dozens of Solaris/SPARC systems over the years. While implementing a buffer overflow on this architecture may be less trivial, I can't tell you how many buffer overrun patches I've installed over the years in various patch clusters.

    The real disadvantage of x86 over a RISC architecture like SPARC is that it doesn't have page protections (not to be confused with real mode segmentation which essentially disables the protected mode i386 MMU) where pages containing data and code are marked differently, so data pages are non-executable. sparcv9 implements a non-executable user stack per default, whereas it's a configurable option for sparcv8 binaries.

    This has all changed with x86-64/AMD64/EM64T/x64/WHATEVER, which has brought a noexec bit to memory pages and allows hardware buffer overflow protection similar to SPARC. This still isn't a silver bullet for buffer overflows, but it's certainly better than nothing.

    1. Re:RISC isn't the solution by ArbitraryConstant · · Score: 2, Informative

      Interestingly, PowerPC lacks a per-page execute disable as well. It has nothing to do with whether an architechture is RISC or not.

      --
      I rarely criticize things I don't care about.
  11. Well... by autocracy · · Score: 3, Funny
    F00FC7C8

    Still here? Dammit...

    --
    SIG: HUP
  12. big deal.. by pixas · · Score: 2, Funny

    ..so what if I have 0.999997 viruses in my CPU?

  13. 1993 called - they want their flamewar back by nosferatu-man · · Score: 5, Funny

    Thanks, Slashdot -- I actually read that boatload of ignorant gibberish, and now I'm measurably dumber than I was before I clicked the link. Keep this up and I too will be making specious arguments about "RISC" and "CISC".

    --
    To spur "enterprise Linux," Big Bang, the distributed two-phase commit.
    1. Re:1993 called - they want their flamewar back by HotNeedleOfInquiry · · Score: 2, Insightful

      I admire a troll that's not afraid to tell a troll that he's trolled a troll.

      --
      "Eve of Destruction", it's not just for old hippies anymore...
  14. Not the fault of the OS at all! by carcosa30 · · Score: 4, Funny

    SO! We now know the truth: Microsoft is blameless for the shoddy security of their products. It's all the fault of the x86 architecture.

    After all, how could Microsoft be expected to learn the intricacies of their primary platform and write code that does what it's supposed to?

    We have been lied to.

    --
    Intolerance for ambiguity is the mark of the authoritarian personality.
  15. This guy doesn't know what he's talking about. by ArbitraryConstant · · Score: 4, Insightful

    For starters, Windows does run on RISC.

    The stack behaviour of PowerPC is just as predictable as x86, and it's just as easy to perform a buffer overflow attack on vulnerable code.

    PowerPC doesn't offer more per-page protection than x86, and it offers less than x86-64, as x86-64 can disable execution on a per-page basis.

    It's possible to do things on both architechtures like add a random offset to the stack or load libraries at random locations. This makes attacks much more difficult, and OSes like OpenBSD do them on both architechtures. OSes like Linux or MacOS don't do them on any architechtures. Stack protections like propolice are a compile-time option and can be used on any OS on any architechture.

    The mainstream architechtures of today do very little to distinguish themselves from each other security wise. One of the the few features that is different from one architechture to another, per-page execute protection, is not available on PowerPC.

    This guy doesn't know what he's talking about.

    --
    I rarely criticize things I don't care about.
    1. Re:This guy doesn't know what he's talking about. by Ann+Elk · · Score: 2, Interesting
      OSes like Linux or MacOS don't do them on any architechtures.

      Linux does support limited stack and library randomization. However, there are questions as to the effectiveness of these techniques.

    2. Re:This guy doesn't know what he's talking about. by EventHorizon · · Score: 2, Interesting

      This guy doesn't know what he's talking about.

      Probably. Dunno since I stopped RTFAs a while ago.

      However, the IBM PowerPC 970FX aka Apple G5 processors have had NX for a while. Partial Linux support already exists. Check it out.

      http://lwn.net/Articles/126862/

      I like the 970FX (apart from its tiny cache). Shame Apple has a monopoly on the desktop systems, and you have to buy their OS to run Linux on one.

    3. Re:This guy doesn't know what he's talking about. by lamont116 · · Score: 2, Informative

      This got +5? Mods don't know what they are reading about.

      PowerPC does not store the return address on the stack; it shows up in the link register (LR), and is generally copied to a GPR when your function calls another function (because the call will overwrite the LR). That GPR may or may not wind up on the stack, depending on the number of GPRs needed by the callee. The architecture does not require that it ever be placed on the stack, which is totally defined by the ABI and not by the hardware anyway. There is absolutely no reason why PowerPC-based operating systems could not define a separate stack for data and return addresses, if the OS designers chose to do so.

    4. Re:This guy doesn't know what he's talking about. by pammon · · Score: 5, Insightful

      > The stack behaviour of PowerPC is just as
      > predictable as x86, and it's just as easy to
      > perform a buffer overflow attack on vulnerable
      > code.

      No it's not.

      For example, here's a function vulnerable to a classic buffer overflow:

      void security_hole(char* s) {
      char buff[128], *ptr = buff;
      while (*s++ = *buff++);
      }

      It's more difficult to turn this buffer overflow into arbitrary code execution on PowerPC because the link register isn't spilled to the stack (so you have to overwrite some function's return address higher up in the call chain) which takes more work and requires a larger payload, larger instruction sizes means you need a still larger payload, larger instruction sizes mean it's trickier to build an instruction stream with no zero bytes, and in any case you may have to flush the instruction cache to force it to see your changes - no easy task.

      Leaf functions, functions that take advantage of tail-call optimizations, and functions that move the link register into a GPR rather than the stack don't let you overwrite the return address at all, which is never the case on x86.

  16. I doubt x86 inherently flawed by rice_burners_suck · · Score: 4, Informative
    In all, I don't think the processor is really responsible for most of these problems. I think it is the design and implementation of software. Things simply must be done correctly, or computers will go haywire no matter what kind of processor they have.

    Linux, BSD, and other *nix systems are reasonably well protected through the design of the system and the widespread use of common server programs, which are checked and re-checked for these problems by a variety of people and organizations. Also, GCC provides ProPolice, which can help lock things down a bit more. I think this particular problem mostly applies to systems running Windows.

    Microsoft's business problem in this regard is that they have no control over the applications running in Windows, and they provide a default Windows install that is quite open and vulnerable. Locking down the ports and getting rid of the most dain-bramaged policies in Windows is only one part of the solution. Vulnerabilities in application programs can still be used to break into these systems, and Microsoft will ultimately be blamed.

    Perhaps the best thing Microsoft can do is integrate something like ProPolice into the C and C++ libraries used to compile programs for Windows. This would make a big difference in protecting the stack of running programs that are not designed with security as a priority.

    If x86 really is less secure by nature, it probably wouldn't hurt if they'd put their virtualization engine (similar in function to VMware but not even half as good) right into the core OS. Under such a design, only the Windows kernel would run directly on the processor; the rest of the operating system and all of the application programs would run with the same x86 instruction set, but through the virtualization engine. There, checks could be made to prevent the most common vulnerabilities of the x86 processor from being utilized.

    1. Re:I doubt x86 inherently flawed by Anonymous Coward · · Score: 2, Informative

      No, the processor isn't responsible, but the processor eases the facilitation.

      Buffer overruns are caused purely by sloppy coding in languages which let you. They exist on all CPUs, but they are easier to exploit on x86 due to the orientation of the stack (placing the return address of a function at the end of the stack) and lack of memory security options (until x86-64 introduced the NX bit all memory is executable.)

      Buffer overruns are incredibly common problems and plague all development. Debian has announced 33 buffer overrun vulnerabilities in their distribution so far for 2005. All it takes is one. The architecture is only relevant insofar as to the amount of damage that can be performed once the binary has been exploited, and would be just as contained on a properly administrated Windows computer as on a properly administrated Linux computer.

      Microsoft has been working on this issue fairly diligently. For the past three years their C++ compilers have included buffer overrun protection by placing code in the prologue of the function to save the return address in a "cookie" and then validate the return address in the epilogue with that "cookie" to ensure that it has not changed. This will catch the more common errors which account for easily 90% of all buffer overruns. All code produced by Microsoft since has been compiled with this option. Microsoft has issued several code libraries which provide bounds checking for buffers to aid the developer in avoiding these problems. Microsoft has added DEP to Windows XP SP2 and Windows 2003 SP1 which are a software attempt, in kernel mode, to catch buffer overruns. And finally, Microsoft has added support for the NX bit in the x86-64, which is the only way for the CPU to enforce that data pages be non-executable. Unfortunately this last method is the only method through which this problem can be fully mitigated.

  17. NX bit by BinaryJono · · Score: 2, Interesting

    while the NX bit can help prevent the execution of malicious code on the stack after a buffer overflow, it doesn't solve the security problem posed by overflows. return-into-libc attacks can easily be executed and will become much more prevelant as NX-enabled PCs filter into the mainstream. address space randomization can help make rilc attacks harder on 64-bit architectures but is pretty useless on 32-bit archs.

  18. Re:Aieeee by Laura_DilDio · · Score: 2

    Paul, let me explain how to be an industry analyst... 1) NEVER NEVER NEVER refer to anything that puts Microsoft in a bad light. After all, they pay the bills. 2) NEVER NEVER NEVER mention pinko-commie-bastard linux without mentioning how the TCO is lower on Windows, reliability is a myth, and security is virtually non-existent. 3) Lastly, land a gig working for a real tech think-tank, like the Yankee Group (TM). CIO Today? Who reads that rag anyway? You get more press from these slashdot lusers than you do from a bunch of clueless pointy-haired bosses. Love, Laura Groom of the Stool to Lord Bill

  19. Not so... by dhowells · · Score: 4, Insightful

    Althought the insecurity of code that is only 'theoretically' exploitable ought to be fixed (we all prefer bug free code, right?) many theoretical exploits will never be practically exploited for technical reasons.

    There is a distinction here which needs to be made between code which is exploitable but for which no public exploit code or method has been released -- in which cases it 'wont stay that way for ever' -- and code wherein the calculation of an arbitrary or runtime offset (e.g for a buffer overflow) is impossible and guesswork is impractically unlikely. Theoretical insecurities of the latter type are very likely to 'stay that way for ever'

    --
    use Blunt::Instrument;
  20. ms supporter? by Blitzenn · · Score: 3, Insightful

    Did you happen to actually read the article? The guy ends by blatantly stating that there is no sane reason to choose a PC over a mac. How can you possibly see this guy as an MS supporter,.. unless of course you didn't really read the article.

  21. Re:virtulization by Anonymous Coward · · Score: 2, Insightful

    Except by VMware and Virtual PC. Oh wait, I guess it can be virtualized!

  22. Windows doesn't take advantage of the hardware by wiredbuddy · · Score: 2, Interesting

    I just read this article recently in Embedded Systems Programming magazine. http://www.embedded.com//showArticle.jhtml?article ID=55301875 After a detailed explanation of the hardware protection features built into the x86 (since the 80386), the author makes the following statement towards the end of the article: "Too bad Microsoft doesn't use this feature. Windows has been plagued by buffer-overflow bugs that could easily be prevented by the processor's segmentation features. Alas, even though these features have been built into every x86 chip for more than 15 years, Microsoft has never used them. Instead, Windows creates a "flat" memory system with no segmentation, no tasking, no bounds checking, and no privilege protection, and then struggles to duplicate all those features in software. The result has been famously ineffective."

  23. Old New Thing by geo.georgi · · Score: 2, Informative
  24. This is actually a pretty good point, but... by mbessey · · Score: 2, Interesting

    Using a segmented address space, where the Stack and Code are kept in what are effectively different address spaces, would do much to mitigate the effect of buffer overruns. On the other hand, the NX bit on x86-64 accomplishes basically the same thing, without the overhead of having to use long pointers to access data on the stack.

    Neither of them are really all that robust though, since any time you can overwrite the return address on the stack, you can cause execution to veer off to somewhere else. Maybe you won't be able to insert shellcode into the program's address space, but if you can cause a function to "return" to something in the C standard library, like remove(), you can still cause havoc.

    A more secure solution would split the stack such that function arguments and return addresses are not stored in the same space. This would give you a somewhat Forth-like runtime model, where return addresses are stored on one stack, and data values on the other. In that case, a buffer overrun in one function would still allow you to overwrite the arguments to another function, which is sub-optimal.

    If you combine a split stack with growing the stack in the non-obvious direction, then you're probably as secure as you're going to get without eliminating the use of a stack altogether.

    -Mark

  25. Re:Bad analogy by leshert · · Score: 2, Funny

    Anyway, you forget, this is slashdot - car analogies get mod points.

    Yes, but only cdr analogies get +1, Funny.

  26. Bollocks! by EmbeddedJanitor · · Score: 4, Informative
    On many/most RISC you can grow the stack in any direction. By convention, most ARM code runs a down-growing stack,

    The stack direction has nothing to do with security. You can still have stack protection running up or down stacks. Once you have a reasonable MMU, all further problems are due to software design.

    --
    Engineering is the art of compromise.
  27. Virus Execution Coprocessor by skingers6894 · · Score: 2, Funny

    I think a future version of X86 should have virus execution assistance in hardware.

    Given that you just can't stop the things, why not offload the burden of running them from the processor?

    BIPs (Bots Infected per Second) could be the metric for performance.

  28. PowerPC doesn't prevent buffer overflow exploits by Branka96 · · Score: 5, Interesting

    CAN-2004-1134 is a buffer overflow issue. The Mac is susceptible to buffer overflows.
    Take e.g. the iSync issue. Apple doesn't go into details, but if you do a Google search on "isync vulnerability" you will find:
    "The vulnerability is caused due to a boundary error in the handling of the "-v" and "-a" command line options. This can be exploited to cause a buffer overflow by supplying an overly long argument (over 4096 bytes). Successful exploitation allows execution of arbitrary code with the privileges of the mRouter application."
    A proof of concept exploit can be found at. It opens a root shell.
    When the PowerPC jumps to a subroutine, the return address is stored in the lr register. The first thing the prolog code in the subroutine does, is to put the address on the stack (freeing up the register for further function calls). So, a would-be hacker can overwrite the return address. For a description of how to take advantage of buffer overflows on the Mac, see "Smashing The Mac For Fun & Profit".

  29. Media Watch by xixax · · Score: 4, Informative
    Our public broadcaster has a show calledMedia Watch that routinely busts journalists for plagiarising press releases. Not to mention even more forward things like running advrtisements as news.

    Xix.

    --
    "Everything is adjustable, provided you have the right tools"
    1. Re:Media Watch by Nutria · · Score: 2, Insightful

      if the press release is well enough written, balanced and has correct facts

      What's the point of a balanced press release?

      If you're not pumping your "side", you're not doing a good job.

      --
      "I don't know, therefore Aliens" Wafflebox1
  30. Re: Biased (not) by screenrc · · Score: 2, Insightful

    Nowday, what I see on the news are stories
    about Michael Jackson, Mrs. Stuart, and the Pope.
    This is what is passed as "news". Is the
    media biased towards the left or towards the
    right? When all they do is talk about
    the unimportant, the media is not biased at
    all! They are just silly.

  31. These "insecurities" not only limited to CPU type. by Anonymous Coward · · Score: 4, Interesting
    Every once in a while there is somebody who claims a certain CPU type, operating system, etc. is more secure simply by its basic structuring. The main point made here is that x86 is less secure because of its process memory layout. Lets take a look at a few known and popular high impact vulnerabilities and examine the reasons why they could be exploited:
    • The telnetd AYT heap overflow (2002) could be exploited on x86/*BSD systems specifically because of their memory layout and little-endianess, while MIPS and SPARC systems were saved by their big-endian, 64bit addresses. Yet, on x86/Linux it was not exploitable, because of a different memory layout within the heap.
    • The Solaris login heap overflow (2001) could be exploited on both x86 and SPARC. The reason were that addresses are created by the vulnerable code itself.
    • The SSH1 CRC32 overflow (2000), has been exploited on every known architecture, x86, SPARC, MIPS, etc. because the data used to overwrite memory with were created by the vulnerable code itself, hence endianess and order did not matter.
    Now, there are cases where RISC architecture makes exploitation more difficult to impossible. But there are around an equal amount of cases where x86 is saved. But the reason is not to be found within the architecture alone, but within differences in the whole chain from CPU to process memory layout to ABI and runtime environment. The following are especially important to determine if a vulnerability could be exploited on a given system:
    • CPU, word width and endianess
    • process address layout
    • stack frame handling and layout, how registers are saved (register windows?) order of registers/parameters/locals/alloca
    • heap handling (i.e. what malloc allocation system is used. For example, most *BSD systems use an out-of-chunk management to control the heap structure itself, while glibc uses an inband management, which is by nature more likely to allow exploitation)
    • compiler optimizations, eg. if small functions are inlined omitting stack frames, etc.
    • ...
    Speaking with more than eight years of exploit development experience, there is much more to consider than just the CPU type.
  32. this is a known issue by jbltgz · · Score: 2, Interesting

    it's a known issue that the intel x86 platform is vulnerable to stack-based buffer overflow exploits. the amd64 architecture is addressing this by providing hardware page protection which prevents code from being illegally executed off the stack. netbsd has enabled this feature by default in netbsd 2.0. i look at the x86 platform like training wheels and amd64 like a nice racing bike... ;-)

  33. The problem is C, not the hardware by Animats · · Score: 4, Interesting
    It's certainly possible to build machines which prevent buffer overflows. Burroughs did that from 1958 to about 1990, quite successfully. Every array is in its own segment. Memory addresses aren't numbers; they're a sequence of descriptors, more like a pathname than a pointer. The last element of the pathname is the array subscript. A descriptor that goes off the end of an array generates a subscript-out-of-range exception.

    But it's tough to run C on that kind of architecture. C wants pointers to be addresses. The "array is a pointer" convention is a bad fit to a true segmented architecture. You can run Pascal just fine, but running C is tough. It can be done, but basically requires allocating all the variables in one big "array" at the hardware level, so you lose the protection. When C came in, the Burroughs machines (by then the Unisys A series) died off.

    So it's quite possible to fix this, but you have to dump C. This may happen as Java and C# get more traction.

    C++ doesn't help. It's part of the problem.

  34. Dissemination of this information is encouraged by 44BSD · · Score: 4, Informative

    http://cvs.openbsd.org/papers/auug04/

    Theo talks about how OpenBSD uses various available processor features to increase system attack resilience, w/minimal performance impact. The design choices made for architectures with differing degrees of per-page protection are presented. The concepts are not at all OpenBSD-specific, although the implementation discussed is, of course, OpenBSD.

  35. And wire services... by jfengel · · Score: 2, Informative

    You'll tend to see rewritten press releases in the business section. The front page of most newspapers originates in wire service articles: AP, Reuters, AFP, sometimes big national papers like the Washington Post or the New York Times.

    If you click through a news story from a news aggregator like Google News, you'll note that many of them have identical text, because they're literally repeating the AP wire service story, crediting the original AP writer and all.

    Actual reporters are used primarily for local news; very few newspapers have staff anywhere else. Most don't even have reporters in Washington, much less Paris/Jakarta/Darfur.

    The bias comes not so much from the writers as from the editorial choices of which press releases and wire reports they're running and what page they put them on.

    Either way, they rarely get the skeptical eye you'd really hope they get before receiving the imprimatur of being printed in the newspaper. Even a few phone calls would be nice.

  36. Operating Systems and C by betasam · · Score: 2, Insightful

    It looks like most operating systems like relying on C. Wouldn't C# or Java require a VM and hence a little shakedown on the OS architecture? And wait, what would the VM be implemented with? There seems to be a strong case that a good hardware architecture can only be of help. The bad one, irrespective of what runs on top of it might always provide a source for trouble. Application developers have always tried to rely on a nice language + compiler + framework as they are evolving.

    --
    No Greater Friend, No Greater Enemy! (Lucius Cornelius Sulla)
  37. No Buzz word languages by krischik · · Score: 2, Interesting

    True, C# and Java would need a VM. However there are traditional (non VM) languages which have build in buffer protection. Fortran was mentioned by another poster - I would add Ada to the list.

    Unlike common believe they are suitable for low level system programming. They are also not old and outdated - both Ada and Fortran have current (not older then 10 years) ISO standards and will get a new ISO standarts soon.

    The only problem is that the names are not common buzz words.

    Martin

  38. Re: Biased (not) by Martin+Blank · · Score: 2, Informative

    The Catholic Church counts some 1.1 billion members, give or take, so about the size of China, or perhaps a little less. Islam is the second-largest religion with about 850 million adherents, though this does not include sects such as Sunni and Shi'ite, which the Catholic Church basically is.

    --
    You can never go home again... but I guess you can shop there.
  39. Strange nobody mentions this by haggar · · Score: 2, Interesting

    I would have said that the most obvious hardware-specific feature, that would protect against stack overflows, is Harvard architecture (vs. Von Neumann, present in almostall CPUs today).

    In Harvard architecture, data and program memory are separate and separately accessed. This has a speedup benefit, as you can access the data in the same cycle you access the program memory, but the other advantage is, a stack overflow will not corrupt your program. For an example, the Atmel AVR risc microcontroller family uses Harvard architecture.

    --
    Sigged!
  40. Re:Administrate isn't a word by tricorn · · Score: 2, Interesting

    Sometimes you have to do that, but I prefer instead to make sure that all uses of that buffer don't assume it is zero-terminated unless I can guarantee that it is.

  41. Windows, Mac, and Linux by Glock27 · · Score: 2, Interesting
    The author of the cited article is clueless on several fronts, but he does have a good basic point: if you're choosing between Windows, Mac and Linux for the "best" computing platform, Mac is looking awfully attractive these days.

    In another article on Slashdot today it's mentioned that Eric Raymond recommends Microsoft "open document formats" and "adhere to standards". Document formats aren't really an issue with Apple, but Apple is doing a very nice job of adhering to open standards these days. BSD Unix, Java, OpenGL, PDF, TCP/IP, X11...Apple is much more programmer friendly than it has ever been. The G5 machines are also very competitive on performance.

    If you need access to commercial applications, or would rather spend money instead of time to accomplish your computing tasks, Mac makes a lot of sense compared with Linux. Windows, for me, is a distant third due to the time lost dealing with security issues, and a general distaste for programming something that inelegant. Besides, I can target Windows using Java with very little pain.

    Just my $.02.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  42. I call BS by mangu · · Score: 2, Insightful
    FORTRAN, even FORTRAN 77, is perfectly suited to development in a modern environment.


    Oh, yeah? Try getting data from an Oracle database in FORTRAN. They used to have something called, IIRC, pro*fortran, but no more. It took me about six months of interaction with people deeper and deeper in the Oracle organization to find out that that product is "deprecated" and no longer supported. Have you ever tried porting a FORTRAN program from VAX/VMS to whatever modern environment you use? Or from a PDP-11? So here is one reason why FORTRAN is dead: important software companies no longer support it.


    Another reason: try finding programmers who are experienced in it. Where I work they have a 20-year-old system entirely written in FORTRAN. In the last twelve months, three junior engineers have quit their jobs because an old dinosaur insists that they must keep doing everything in FORTRAN instead of calling the old functions from C programs. What's the point of having "FORTRAN" in your resume, if the job market for that skill is so restricted?


    But these are practical reasons, you wanted technical reasons, I guess. So try this: how do you do string manipulations? Functions that are one-liners in C become two pages long in FORTRAN. Or how about dynamic memory allocation?


    I have used FORTRAN a lot in the past. I have seen its long and slow agony. I have seen the countless different standards, the many people and organizations who have said, "sure, you can do that in FORTRAN, do it like this" and have come with a solution that's incompatible with everything else.


    Maybe FORTRAN could have evolved differently, if it wasn't so much a "commercial" software. All companies did incompatible improvements to FORTRAN so their marketing people could say "ours is the best FORTRAN in the market". Endless forking while C evolved in a standardized way. Today, to link a VAX FORTRAN library with an Oracle-accessing FORTRAN program originally written in AIX, for instance, is so hard that the easiest solution is to rewrite everything in C.


    But I know people like you who believe FORTRAN is still the solution. As I mentioned, they are running through junior engineers at a fast rate. Luckily, that's not my department, here we do everything in either C/C++ or PHP.

  43. NX provides little protection by generationxyu · · Score: 2, Insightful
    Yes, it's true, NX will protect you from the simple char buf[512]; strcpy(buf, untrusted_data). But that doesn't mean it's secure. What if the return address the attacker supplies isn't on the stack? What if it's in a predictable malloc() buffer? Ok, set NX on malloc()s. What if it's in the code segment? You can't make that NX. What if it's in libc? Once again, can't make that NX. Lots of undesirable stuff can be done without executing stack code.

    Random offsets won't help much -- they'll help some, but what if you can write a LOT of data into that buffer? Give it a LARGE NOP sled.

    Detect when a process is doing a lot of NOPs in a row and kill it? Ok. Use "AIAIAIAIAIAIAIAI..." 'A' = 0x41 = inc %ecx, 'I' = 0x49 = dec %ecx. Together, they are an effective NOP. Hell, most of the time, "AAAAAAAAA..." is an effective NOP. Does an attacker really care what's in ECX?

    The problem is NOT the architecture, NOT the OS, and NOT the language. It's not a problem with libc, stdio, strcpy, or anything else. If you haven't figured this out by now, you might want to read about computer architecture -- computers do what you tell them to. I can write secure code in which I strcpy() from untrusted data into a static buffer on the stack, on an x86 running Windows with no NX. Hell, I'll even do it in real mode.

    I'm not a DJB fanboy, but he does have quite a few good points. Programmers are lazy. Write secure code.

    --
    I mod down pyramid schemes in sigs.
  44. Re: Biased (not) by Martin+Blank · · Score: 2, Informative

    Sunni and Shi'ite sects make up the significant majority of Muslims, but there are other sects. I know of the Druze, Alawi, and Ismali (Ismaeli?), but there are others, though even combined they are a very small percentage of the overall religion.

    --
    You can never go home again... but I guess you can shop there.