Slashdot Mirror


AMD Could Profit from Buffer-Overflow Protection

spin2cool writes "New Scientist has an article about how AMD and Intel are planning on releasing new consumer chips with built-in buffer-overflow protection. Apparently AMD's chips will make it to market first, though, which some analysts think could give AMD an advantage as the next round of chips are released. The question will be whether their PR department can spin this into a big enough story to sell to the Average Joe."

171 of 631 comments (clear)

  1. The could profit from overflows too... by ebuck · · Score: 5, Funny

    Especially if the buffer is their banking account.

    1. Re:The could profit from overflows too... by doorbot.com · · Score: 5, Funny

      Especially if the buffer is their banking account.

      Your account might profit too, if your account is next in sequence after AMD's...

    2. Re:The could profit from overflows too... by makapuf · · Score: 3, Funny

      just hope they stored it on unsigned ints ...

    3. Re:The could profit from overflows too... by BillX · · Score: 3, Funny

      "Stop overwriting my money, you bastards!"

      --
      Caveat Emptor is not a business model.
    4. Re:The could profit from overflows too... by Tony-A · · Score: 2, Funny

      just hope they stored it on unsigned ints ...
      gives a new meaning to overdrafts ;)

  2. AMD needs better marketing by Anonymous Coward · · Score: 5, Insightful

    Like IBM with OS/2, they have the better product. They now just need to convince ordinary consumers that this is the case. For some reason, people love that little Intel jingle.

    1. Re:AMD needs better marketing by ebuck · · Score: 5, Insightful

      I think it was the Intel inside marketing campaign that really did the trick.

      Nobody knows if Intel is better, but they don't want a computer that "lacks" Intel inside. They simply guess that if it's inside, it's better than not having it inside.

      It is brilliant. It can't be copied or AMD looks like a "me too!" player. It can't be contested because it's just vauge enough to not claim that the machine is any better for having Intel inside, but implies that anything else is somehow inferior.

    2. Re:AMD needs better marketing by ackthpt · · Score: 5, Insightful

      Don't overdo it. The software has to be compiled to take advantage of this (hence the new version of XP), so just buying a new PC with "WOW! BUFFER OVERFLOW PROTECTION" will generate negative press as people complain, "Hey! I've still got worms! er.. my computer does, not me!" Such gaffes are what competitors live for.

      --

      A feeling of having made the same mistake before: Deja Foobar
    3. Re:AMD needs better marketing by Vancorps · · Score: 5, Informative

      AMD processors have both of those features. AMD has done well at matching Intel feature for feature. Take a look at Opteron for servers. It doesn't help right now that there are a lot of Intel boards that shipped defective. I was replacing backplanes for a solid month just before the New Year. The latest Xeon's really aren't that impressive either. There was a time the Xeon was an incredible processor worthy of running a NOC but now they are hot enough that Opteron and other players look real nice again.

    4. Re:AMD needs better marketing by Anonymous Coward · · Score: 2, Interesting

      Like IBM with OS/2, they have the better product.

      And like IBM with OS/2 their 3rd party vendor support is poor. Bottom line is that they are still plagued with inconsistent chipsets and motherboard makers. AMD should offer an AMD manufactured motherboard with an AMD chipset just like Intel. That would be a big boost to their reputation for stability.

    5. Re:AMD needs better marketing by Karamchand · · Score: 2, Funny

      We don't support that... is the solution ;-)

    6. Re:AMD needs better marketing by Vancorps · · Score: 5, Informative
      Well just last night my AMD based laptop shut off on me because it got too hot, something stuck in the fan.

      As for the other features you mention. You are comparing Desktop processors and server processors. You might note the lack of the Opteron processor in the third party tests you linked to.

      Bout two months ago someone came to me with a motherboard and processor, Athlon XP 2600+. They couldn't get it to boot. I took one look at it and realized the heatsink was on backwards, it shut it self down as soon as it got hot enough. I put the heatsink on correctly and the thing booted right up.

      As for the PCI locking its a bit harder to vouch for since I don't see a whole lot of information about it, but I sure do recall seeing tests involving the Opteron, if I could find it right now I would, except I'm on dialup now for the first time in six years and its annoying the hell out of me.

    7. Re:AMD needs better marketing by Kenja · · Score: 2, Interesting
      The current AMD chips have an on board thermal diode. However it is up to the motherboard to do anything when the CPU overheats.

      PCI clock locking is to prevent the bus speed from drifting. Seems that most current AMD systems are running a 33mhz PCI buss +/- 3.3Mhz. Thats enough to cause crashes. True you see this in overclocked systems more then anything else. However over time the PCI buss speed can change in non locked systems due to thermal expansion of the circuitry etc. These are not big issues. In fact for home users they are non issues. However when I need my server farm to be up 24/7 and dont realy NEED the extra speed the AMD chips just dont look to good.

      --

      "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
    8. Re:AMD needs better marketing by Anonymous Coward · · Score: 5, Funny
      Nobody knows if Intel is better, but they don't want a computer that "lacks" Intel inside. They simply guess that if it's inside, it's better than not having it inside.

      I always thought "Intel Inside" was a warning label.

    9. Re:AMD needs better marketing by Anonymous Coward · · Score: 5, Insightful

      Intel Inside is a minor part - what cemented Intel was Cyrix. People saw a low cost CPU and got burned for it - then there was no alternative to Intel until the original Athlon which meant that the Pentium and Pentium II were unchallenged.

      To this day, the legacy of Cyrix shadows AMD with marketting using the supposed clockspeed rather then actual.

      Fact of the matter is that Intel has so much branding, even being behind AMD on a few releases isn't going to do enough to displace Intel from being #1. All AMD is good for is the consumer so that there isn't a monopoly, and competition leads to innovation - otherwise Intel wouldn't have brought x86-64 to the general consumer for years. Not that I blame their logic, but then there wasn't a need to jump to Pentium either - the 486 had a lot still to offer at the time.

    10. Re:AMD needs better marketing by Neil+Watson · · Score: 5, Interesting

      It's frightening that even vendors believe in marketing. I meet with vendor one day to discuss supplying us with generic computers. I told them that most of our desktops were Durons. They gasped and stated they could not recommend such things. Stating that they would quote us Intel to "ensure stability". I asked them to cite proof that AMD systems were unstable. They could not but implied that it was common knowledge.

    11. Re:AMD needs better marketing by beerman2k · · Score: 3, Informative

      That's not true at all. Only the OS needs a new version. The OS simply marks pages allocated to the stack as "No Execute", and voila, programs can't use a buffer overrun to execute code.

    12. Re:AMD needs better marketing by stanmann · · Score: 2, Funny

      Shouldn't this be MPU +.99038238 Funny?

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
    13. Re:AMD needs better marketing by helzerr · · Score: 5, Insightful
      Stating that they would quote us Intel to "ensure stability".

      I bet it had more to do with ensuring their profit margin.

    14. Re:AMD needs better marketing by Loki_1929 · · Score: 4, Insightful

      " However when I need my server farm to be up 24/7 and dont realy NEED the extra speed the AMD chips just dont look to good."

      Yeah, Ok.

      How easily we all forget just how many times Intel's chips and boards have been junk-in-a-box. What good is a feature when you can't even keep the machine up and running? What kind of uptime does your server farm have when you're sending recalled CPUs back to the manufacturer? Or perhaps, in the case of Compaq's Itanium customers, the server simply doesn't arrive because it's determined to be defective from the get-go?

      Whoops.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
    15. Re:AMD needs better marketing by CoolVibe · · Score: 3, Insightful
      It's not a cure-all solution.

      There are other trampolines available. Merely making stack pages non-executable doesn't prevent return-into-libc exploits for example where you use the global offset table to jump into arbitrary code by overwriting the entry for a library call like printf(3).

    16. Re:AMD needs better marketing by Tony+Hoyle · · Score: 2, Informative

      Mozilla doesn't work in Linux with the NX protection on either... it's doing some really dodgy self modifying stuff when it starts up I think.

      SP2 will break a *lot* of code and it's well worth downloading the beta and testing your stuff with it - your boss will thank you for it :)

    17. Re:AMD needs better marketing by Barlo_Mung_42 · · Score: 3, Informative

      "It's not a cure-all solution."

      Nor will there ever be IMO. But this combined with good practices like not running as admin when we don't need to (reading email, web browsing, game playing for example) will be a huge leap forward.

    18. Re:AMD needs better marketing by mcbevin · · Score: 4, Insightful

      You never considered the possibility that there might just be some basis for that belief other than Intel marketing? That while AMDs are not so bad now, older versions would for example melt if you removed the cooling (whereas Intels even back then would simply slow down).

      Also, I suspect AMD possibly suffers from the poor reputations of previous Intel competitors who truly did have unreliable, inferior products. I for one had trouble for a while remembering which of AMD and Cyrix was the one to avoid, thus for the average consumer choosing the always reliable Intel makes some sense.

      AMD still needs some time to build up the reputation Intel has. If they can continue building reliable products without cutting too many corners as they have done in the past to keep up in the race against the giant, they may eventually obtain such a reputation, but such things take time.

    19. Re:AMD needs better marketing by dgatwood · · Score: 5, Insightful
      Wait just a second here. Do you mean to tell me that Intel and AMD still don't have no-execute flags for their page tables? Wow, I guess I should be really impressed by the foresight of Motorola and IBM, who put that feature in the PowerPC series of chips back in 1994 (beginning in the PowerPC 603).

      I'm actually surprised that there are chips out there that don't have such a feature. In a perverse way, I hope IBM has a patent on it.... :-)

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    20. Re:AMD needs better marketing by Krondor · · Score: 4, Interesting
    21. Re:AMD needs better marketing by Loki_1929 · · Score: 3, Insightful

      "they would quote us Intel to "ensure stability"."

      "I asked them to cite proof that AMD systems were unstable. They could not but implied that it was common knowledge."

      You can take this one step further - simply go through the articles I found and posted over a year ago. Show them the articles and then tell them that you cannot accept anything other than AMD quotes, in the interest of 'ensuring stability'.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
    22. Re:AMD needs better marketing by ckaminski · · Score: 2, Funny

      Right. Which is why it's continually packed every single performance for nearly 6 years straight (in boston).

      Right...

    23. Re:AMD needs better marketing by Luminous+Coward · · Score: 2, Informative
      Wait just a second here. Do you mean to tell me that Intel and AMD still don't have no-execute flags for their page tables?
      You need to pay attention. AMD's Opteron has been available for 10 months now. Processors that support the AMD64 instruction set architecture (e.g. Opteron) do have a per-page no-execute bit.

      See AMD64 Architecture Programmer's Manual Volume 2: System Programming
      5.6.1 No Execute (NX) Bit (page 173)

    24. Re:AMD needs better marketing by edwdig · · Score: 4, Informative

      32 bit x86 chips have the write and execute flags combined in the page tables. The segment descriptors have seperate bits for them. Intel basically expected people to use segmentation on the 386 rather than paging, so the original paging implementation was a little subpar.

      Segmentation offers much finer control over memory (allocations can be sized to the exact byte, with a fault generated on any out of bounds access) and a larger virtual address space (48 bits, accessed in segments up to 4 GB). The problem with segmentation is the kernel memory management becomes a lot more complicated, so OS developers have avoided using the segmentation. x86 chips are the only ones to provide segmentation support, so developers of portable OS's avoided the feature as well.

      When AMD designed the x86-64 architecture, they had to design new page tables to deal with 64 addresses. While making that change, they also seperated the write & execute permission bits.

    25. Re:AMD needs better marketing by Hoser+McMoose · · Score: 2, Interesting

      The problem was never so much the processors as it was the motherboards. Cyrix chips were great on boards that supported them well. Unfortunately the cheap processors were almost always stuck on dirt-cheap motherboards using a POS power supply and every other crappy component people could find. This was especially bad when Cyrix was trying to push technology forward by using 75MHz bus speeds when Intel was only using 66MHz bus speed.

      Crappy motherboards continued to plague AMD for ages, even up to today where VIA still hasn't figured out how to write drivers properly. Fortunately for AMD they now have nVidia laying all of the older chipset vendors to shame by doing a better job on their first shot than Intel/VIA/ALi/SiS managed after 10 years.

      As for the clock speed thing, AMD just replaced one totally meaningless number (MHz) with another totally meaningless number (model number). It was a termendously successful idea though, boosted their sales a lot because most people like big meaningless numbers better than small meaningless numbers (compensating for something?).

    26. Re:AMD needs better marketing by BillyBlaze · · Score: 2, Interesting
      I don't know exactly how this will be implemented, but it's quite possible that it will only take a kernel change. (I'm assuming here that the executable formats include enough information to determine what areas of memory shouldn't be executed.) So with assistance from Microsoft (and a small patch for Linux), it could work.

      This could still break some apps which rely on executing some area of memory that they didn't mark as such, but you could just make an exec-time option to run that program without protection.

    27. Re:AMD needs better marketing by freeweed · · Score: 4, Insightful

      AMDs are not so bad now, older versions would for example melt if you removed the cooling

      I've always been of the opinion that if you're in the habit of removing your heatsink from a running processor, you have deeper problems than worrying about whether or not it will melt. Tom's sure managed to keep a lot of people I know from buying AMD, which is pretty funny considering how much cooler AMD chips run these days compared to Intel.

      --
      Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
    28. Re:AMD needs better marketing by RzUpAnmsCwrds · · Score: 5, Insightful

      "versions would for example melt if you removed the cooling"

      And, why, exactly, would you remove the heatsink from a CPU while it is running?

      Moreover, this was not a flaw in the Athlon. The Athlon, since Athlon XP, has contained a thermal diode to enable safe thermal shutdown. The motherboard that Tom's Hardware used did not have the thermal protection circuitry.

      Losing a CPU to "thermal death" was a rare occurance. Most CPUs that experienced "thermal death" had improperly installed thermal solutions (e.g. the clip was not installed properly). A fan failure or failure to use thermal compound (e.g. a pad or grease) would likely not cause damage to the CPU, even without thermal protection. Only a lack of die to heatsink contact (e.g. with an improperly installed shim or a poorly installed heatsink that detached during movement) would likely cause the Athlon to experience "thermal death" ass shown in the Tom's Hardware video.

      "whereas Intels even back then would simply slow down"

      The Tom's Hardware Guide video was a fake. The CPU temperature never exceeded 30C (look at the thermal probe). Thermal throttle-down on the P4 occurs when the CPU hits 85C. And, yes, the system will crash or simply become completely unusable if the heatsink is removed.

      "without cutting too many corners as they have done in the past"

      Right. Intel has never cut corners, particularly not with major logic bugs in the Pentium, PII, PIII, P4, and Itanium.

      Look, CPUs are not flawless. But the CPU thermal issue you speak of really is not a huge issue. With a properly installed heatsink (like the heatsinks on a computer you would buy from HP or eMachines), it never was an issue. And today every new motherboard has thermal protection.

      Tom's Hardware did a disservice to the community and to AMD by taking a relatively minor issue that affected a small number of people and blowing it out of proportion to a huge flaw.

      If you read Tom's Hardware for as long as I have, you begin to notice a pattern: Tom is an egotistic nut. He posted one editorial stating that the performance war between Intel and AMD was bad for consumers (hmmm... my $90 Athlon XP 2600+ would seem to refute that, as would sub $200 P4 3.0GHz CPUs). He also says that people buying AMD64 systems are giving AMD a "no intrest loan" because of the lack of availibility of AMD64 operating systems and applications. Apparently, no one told Tom that the Athlon 64 3000+ is *cheaper* than its similarly performing P4 counterpart (in IA-32 applications). And, apparently, no one told Tom that Intel has adopted the same instruction set for its Pentium 4 based 64-bit systems.

      I have lost respect for Tom and his publication. Between his hate-filled articles filled with vague statements and mistruths, his constant bashing of AMD (he compared the Athlon XP 3400+, a $450 CPU, to the P4 Extreme Edition, a $900 CPU, and decreed the P4EE the victor because it was marginally faster in 3/4 of the tests), and his suing of other tech websites, Tom has struck out. I only hope that [H]ardOCP doesn't suffer the same fate.

    29. Re:AMD needs better marketing by Sycraft-fu · · Score: 4, Insightful

      Hey, they fall off sometimes, or a fan fails, or the AC fails. Shit happens. Happened to a friend of mine, friend one of his CPUs, though the board was ok thankfully.

      Also AMDs much larger problem was motherboards. VIA chipesest used to suck hard, and AMD's own were almost as bad. I remeber when the Athlons were fairly new it was time for me to upgrade so I decided to get one based on price. I got a 700mhz slot Athlon and a top-of-the-line Abit board with VIA chipset. I then proceeded to fight with my system for two weeks. I could not make it work in either 98 or 2000. It just would not play nice with my GeForce or my pro audio card. I finally sent it back, got a 440BX and an Intel P3 700 which I then used for like 2 years.

      Now I know the situation is completely different today, but that sort of thing sticks with many companies and OEMs. Trust is a thing that is easy to loose, hard to regain. Not fair, but that's how the world works.

      Only receantly have I started recommending ATi video cards. Why? Well becuase I supported ATis in many situations and their drivers were trash. 2d was fine but try and 3d and you were asking for BSODs. That's now changed, their drivers are in every way as solid as nVidia's and their hardware is better. But it took time for me to trust that. I had to use the cards and see them used in a number of different environments before I was ready to declare them stable enough for use in production systems.

      Also the PR numbers aren't helping. Many people see it as dishonest, espically since they haven't need consistent (some of the more receant chips haven't performed at the level their PR would infer). This again hurts crediblity in the eyes of some people.

      It's not fair per se, but it is the way of the world. You burn me, it takes time for me to trust you won't do it again.

    30. Re:AMD needs better marketing by Loki_1929 · · Score: 5, Informative
      "I for one had trouble for a while remembering" ... remembering a lot of things.

      Like the PIII Coppermine CPUs that wouldn't even boot sometimes.

      Or the randomly rebooting PII Xeons.

      Or the voltage problems with certain PIII Xeons.

      Or the memory request system hang bug in the PIII/Xeon.

      Or the PIII's SSE bug whose 'fix' killed i810 compatability.

      Or the MTH bug in the PIII CPUs that forced Intel customers to replace boards and RAM.

      Or the recalled, that's right, recalled PIII chips at 1.13GHz.

      Or the recalled (there's that word again) Xeon SERVER chips at 800 and 900MHz.

      Or the recalled (that word, AGAIN?!) cc820 "cape cod" Intel motherboards.

      Or the data overwriting bug in the P4 CPUs.

      Or the P4 chipset bug that killed video performance.

      Or the Sun/Oracle P4 bug.

      Or the Itanium bug that was severe enough to make Compaq halt Itanium shipments.

      Or the Itanium 2 bug that "can cause systems to behave unpredictably or shut down".

      Or the numerous other P4/Xeon/XeonMP bugs that have been hanging around.

      Yes, I did consider the possibility that there might just be some basis for the belief that Intel's products are superior. Having considered that, in light of the mountains of evidence to the contrary, I shall now proceed to laugh at you.

      Ha ha ha.

      Now go away, or I shall mock you again.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
    31. Re:AMD needs better marketing by kryptkpr · · Score: 4, Informative

      Spend the few extra dollars on a good motherboard with the nForce2 chipset. I run an Asus A7N8X-E Deluxe and in my experience it's very speedy (compared to my old ECS K7S5A, bleh) and packed to the tits with features (FireWire, SATA+RAID, USB2.0, etc..).

      Also, good memory (we're talking at least the lifetime warranty kind here) is totally necessary if you want your system to be stable at high frequencies, it seems AMD CPUs are more sensitive to bad/cheap memory (particularly in ECS boards, they're cheap, but avoid them if you at all can).

      On a side note, AIDA32 shows the chipset bus on this board as being 8-bit HyperTransport v1.0 .. totally cool :)

      --
      DJ kRYPT's Free MP3s!
    32. Re:AMD needs better marketing by Loki_1929 · · Score: 2, Insightful

      "I have lost respect for Tom and his publication."

      I've never had much respect for Tom; he's an egomaniac. Also, the website sold out to Intel and a number of other advertisers a few years ago (roughly 3). You'll notice a fairly rapid change in the articles if you look in the archives - that is, if you can find articles that haven't been re-edited or removed. They also have a habit of removing the author title or changing it when they decide they don't like the original author anymore.

      Tom's is now a joke. It's a site offering dumbed-down consumer grade articles with rigged benchmarks and conclusions that are non-sequitur. Attempts to hide the utter bias have faded with time, with AMD supporters now being openly labled as just a bunch of idiotic, delusional fanboys by some in the staff (Hi Omid!). The benchmarks are done with multiple driver versions, then vetted such that the best possible results for key advertisers can be shown. Anandtech still has a good deal of respect in the community, as well as from me (I'm more important! ;) ). Probably the best site I've run across is Ace's, which offers incredibly in-depth articles to those willing to learn a thing or two.

      Here's an excerpt from a recent column on Tom's:

      "There is nothing finer than raising the hackles of delusional AMD lovers. However, today I do so with a heavy heart. This is no time to take aim at the pompous, self-righteous head-in-the-sand-ostriches of the alternative chip lifestyle. One must embrace them, hug them and wipe away their tears.

      They are the freaks of low-cost computing, the poor, downtrodden users of products that never seem to be able to match PR numbers to actual performance, now almost beaten into marginality for all time.

      Of course, they won't admit this. They will howl at the moon, scream obscenities at nice, unassuming columnists with no axe to grind"


      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
  3. Awesome by RedWolves2 · · Score: 2, Funny

    Put me down for one! This is exactly what we all need. Why didn't they think of this in the first place. Always on Microsofts shoulders to button the buffers up. This will make a huge difference in security.

    1. Re:Awesome by paranode · · Score: 2, Interesting

      This will make a huge difference in security.

      Hopefully for the good, unless it creates a scenario where people think this chip protects them from everything and people update their software even less. Not all problems stem from overflows so if this technology is interpreted incorrectly, it could have negative implications.

    2. Re:Awesome by Sloppy · · Score: 5, Insightful
      Why didn't they think of this in the first place.
      Because it's hard to fix while keeping compatibility, and it was a different world in 1980.

      Some of today's problems are really just side-effects of the x86 legacy. If you're willing to break binary compatibility, fixing problems is really, really easy. For example, there's no law that stacks have to stupidly grow downwards in memory so that an overflow ends up overwriting older stuff on the stack space, instead of overwriting in the direction where the unallocated space is. And indeed, on many architectures, it works more sensibly. So even if you don't protect against overflows, their damage doesn't need to be so severe.

      But by the time it became popular for personal computers to be connected to the internet (and thus, overflow protection started to become really important), it was far too late to fix the problem, because too many people were locked into x86.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    3. Re:Awesome by Unoti · · Score: 2, Informative

      Why didn't they think of this in the first place Another take on answering that question... originally processors were conceived to have data and programs separate. It wasn't until Von Neumann that someone proposed putting the data and programs in the same place.

    4. Re:Awesome by phil+reed · · Score: 4, Insightful
      Why didn't they think of this in the first place.

      They did. Mainframes and the like have had protection from this sort of hack for ages. AS/400s have object orientation support built into the hardware, and a data object (which is what a stack or buffer would be implemented as) cannot be executed as code, no matter what. The hardware will not allow it. Nor would the buffer be allowed to grow into a code location.

      We're living with hardware and software architecture decisions made in the 1980s, when PCs were still considered toys.

      --

      ...phil
      "For a list of the ways which technology has failed to improve our quality of life, press 3."
    5. Re:Awesome by xmath · · Score: 3, Informative
      Please correct me if I'm mistaken

      You are. A buffer overflow works by overflowing a stack-allocated buffer, causing other stack-allocated data to be overwritten. The usual method of exploiting this is by overwriting the return address with a value that points back into the buffer, so that the function will return straight into the buffer data, where the cracker will have put executable code of course.

      A way to provide some protection against this is by disabling the ability to execute code that is located on stack.

      Note that:
      1. there are already linux kernel patches to do this on x86 hardware, but they incur a slight performance penalty because they're implemented by abusing page table caches (there are separate ones for data, and you can deliberately make 'em inconsistent so that the table entry for data says access is allowed, while the one for code says it's disallowed)
      2. this does not prevent buffer overflow exploits entirely, it just makes 'em a lot harder. There are tricks you can still use sometimes like putting the known address of some useful library function into the return address

      hope this helps to clear it up a bit

    6. Re:Awesome by dustman · · Score: 3, Informative

      Do they overflow the current process's virtual address space?

      No. On the stack itself, in addition to the local data for a function (and the saved registers), is the return address that you are going to jump back to after the function is complete. Buffer overflow exploits write past the end of the buffer. So you are overflowing the function's local data, not the entire stack segment. As the previous poster mentioned, because the stack grows downward, your overflow can write over the return address, which is where all the nastiness starts.

      In addition to this, is the fact that the binaries are always the same for each machine, and the process's memory all logically maps to the same location (windows user code maps to 0x10000000).

      So, say someone writes a program and somewhere has a static buffer for input which is 256 bytes, and doesn't check bounds on input data. You can construct an input which is more than 256 bytes, and your data will overwrite stuff which is outside of the input buffer, perhaps the return address. So, with the proper input, you can make the program jump to an arbitrary point.

      Usually, whenever a function is called, it will be called at the same depth of recursion. Like, I might make a function, "authenticate", which asks for your username and password (storing them without checking in my 256 byte buffers), then checks credentials and either proceeds or returns an error code.

      This function will probably only be called once, and it will always be called at the same time in program execution, relatively early. The stack will always be the same size when it is called. (Like, your call stack at this point might look like: main() -> initialize() -> authenticate()) or whatever).

      Sometimes, a function might be called from multiple places... Maybe there is something like "getAddress()", which does pretty much the same thing, it grabs an address input by the user, but it might be called from many places in the executable. Each call will have its own characteristic call stack, and offset within the stack segment. The stack frames of all functions leading down to it will be present. (You can usually examine the current call stack in a debugger).

      If you know "where" the function will be called from in this manner, you will know the exact stack layout at this point, including the absolute addresses and everything (which you know because the binaries are always the same and the executable always maps to the same logical place in memory).

      So, you can overwrite the return address so that it returns to inside the input buffer. Then, you have 256 bytes (in this example) to work with for constructing your little exploit. Often, the exploit will be just a stub which downloads another malware program and launches it, or whatever.

      There is a little bit more to it. Like, you usually need to construct your input so that you don't have any 0 bytes within it, because that will signify the end of a string. The input, even though it's not bounds checked, might still be validated in some fashion. (I think I remember reading about someone who had made a "codec", so that the input data could be composed of valid alphanumeric characters. So, even the unpacker was alphanumeric, which is pretty cool).

  4. Code rewrites going to be needed? by PornMaster · · Score: 5, Interesting

    I know that people using standard APIs might be fine, but I can't help but wonder how many applications will not work because of it. While there probably aren't many self-modifying code apps out there, there are surely some. Will they be affected?

    1. Re:Code rewrites going to be needed? by Rockenreno · · Score: 3, Insightful

      Anytime you change the architecture of a chip there will be side effects. It is inevitable. I am interested to see what the repercussions might be it terms of code, performance, and even reliability. If they implemented this well, perhaps these side effects will be minimal and unnoticeable, in which case this could be a major development!

      --

      Forecast for tomorrow: A few sprinklings of genius with a chance of DOOM!
    2. Re:Code rewrites going to be needed? by codexus · · Score: 2, Insightful

      My guess is that many applications use self-modifying code as part of their anti-piracy/anti-reverse-engineering protection.

      --
      True warriors use the Klingon Google
    3. Re:Code rewrites going to be needed? by chamilto0516 · · Score: 5, Interesting
      Self modifying code apps would be affected. And I think that is a good thing because you would want to ferret out such things in your systems.

      Writing self-modifying code was the first thing my Assembler instructor put his foot down and said, "bad idea, don't even think about it." I could see you could do it easily with assembler.

      I would entertain listening to cases where self-mod'ing code has its place.

      --
      Magic Eight Ball: Outlook not so good., Hmmm, how about Excel and Word?
    4. Re:Code rewrites going to be needed? by Anonymous Coward · · Score: 2, Insightful

      Many UNIX versions already support this kind of protection and it's on by default. Good portable code deals with it. If I remember right, you have to use mmap to get a special section of memory that you can both write and execute.

    5. Re:Code rewrites going to be needed? by taniwha · · Score: 2, Insightful

      self modifying code is one thing ... but there are real apps have needs to create code on the fly and execute it (great examples are Java JIT compilers, and wonderfull valgrind) .... on the other hand a FAST, standard way to set the pages protections on some newly created code from RW- to R-X would be appropriate in these cases

    6. Re:Code rewrites going to be needed? by J-Worthington · · Score: 4, Interesting

      One type of application that would need to take this into account would be JIT compilers, e.g. like that used in .Net. These create native code in memory to execute, with the objective of increasing performance. These apps simply need to state that they want the memory they allocate to be executable when they allocate it, then they can continue to work as before.

    7. Re:Code rewrites going to be needed? by imnoteddy · · Score: 4, Interesting
      My guess is that many applications use self-modifying code as part of their anti-piracy/anti-reverse-engineering protection.

      In the early '90s Motorola released the 68040 with a code cache that made programs that used self-modifying code crash and burn. Apple had been telling people for years not to write self-modifying code because this was going to happen. When Apple started building prototype Macs with 68040s and started testing for compatibility who do you suppose was one of the biggest offenders? Microsoft. I am not making this up.

      --
      No electrons were harmed creating this post, though some may have been subjected to electrical and/or magnetic fields.
    8. Re:Code rewrites going to be needed? by kawika · · Score: 4, Informative

      Any application that creates code in stack-based memory such as a local (auto) variable, or in one of the standard heaps (from which malloc and "new" memory come) will be affected. This memory is no longer executable and cannot be made executable by an application. Some existing JIT compilers are affected and will need rework.

      To work with memory protection enabled, applications will need to allocate memory using VirtualAlloc and specify the memory options to make it executable. Then they can generate and run the code there.

      I am assuming that Linux could incorporate some similar functionality, anybody know if someone is working on it?

    9. Re:Code rewrites going to be needed? by willy_me · · Score: 2, Informative

      Self modifying code won't run on most modern architectures. Take PPC for example, there are two separate caches, one for code and one for data. The code can not be changed during runtime. There are of course lots of programming languages that utilize "self modifying" code but they typically run with an interpreter who's code does not change. I'm not sure how gdb gets around this problem but if anyone wants to enlighten me, I'm listening.

      Apps that use self-modifying code probably only run on one architecture - most likely the 8x86. There are far better ways to protect one's code.

      Self-modifying code is prone to bugs, hard to develop, hard to maintain, hardware dependent, and to top it all off - not that effective at providing security.

    10. Re:Code rewrites going to be needed? by cjellibebi · · Score: 4, Informative
      > I would entertain listening to cases where self-mod'ing code has its place.

      The Intel x86 architecture has few registers, so if you want to keep lots of values handy, you're going to have to keep swapping values in and out of memory. Alternatively, immediate-value constants can be hard-coded in the code that do not change during a long loop or a loop with many layers of nestedness. Just before the loop is executed, these hard-coded constants will be modified by re-writing the immediate-values in the code. An example of this is some code that draws a scaled translucent sprite. Throughout the code, the scale will remain constant, and if the translucency is uniform, that will remain constant too. The code that does the translucent blitting will use the registers only for values that change during the sprite-drawing.

      On an 80386, using this technique will cause a significant speed-increase in the code, but on 80486's and above where there are on-board L1 caches on the CPUs, the code-modification may cause cache-misses that may slow down the system - espcecially if it is run on an even newer x86 CPU that has a seperate program and data cache in the L1 cache. To make things worse, nowardays, most code runs in a multi-tasking environment, so trying to figure out if self-modifying code causes a slowdown or a speed-increase is almost impossible to predict.

      Of course, nowardays, most drawing is done by hardware accellerated graphics cards so this isn't a good example, but there could still be some use for hard-coding values that do not change in a loop.

    11. Re:Code rewrites going to be needed? by drinkypoo · · Score: 2, Funny

      That's ok, I install cracks on all of my copy-protected software anyway. In the case of games it's to remove the CD check. In this case, you might have to use a crack just to stop the program from crashing :)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    12. Re:Code rewrites going to be needed? by Monkelectric · · Score: 2, Informative
      You really can't do that even now. IIRC, writes to code segments aren't allowed for the following reason -- when paging to disk, the OS doesn't write out code segments to disk, it just clears the segment, uses it, and when it needs to reload the code segment itand re-reads them from the executable on the HD, it saves alot of time but has the side-effect that anything that was modified in the code segment is clobbered.

      I think some architectures even disallow writing to code segments altogether -- the l1 or l2 caches wont maintain coherency (this is again an optimization as writing to a code segment is rare).

      --

      Religion is a gateway psychosis. -- Dave Foley

    13. Re:Code rewrites going to be needed? by beerman2k · · Score: 4, Informative

      All modern architecture's have seperate caches for code and data. Simply flushing the i-cache will allow you to update your code on the fly.

    14. Re:Code rewrites going to be needed? by addaon · · Score: 2, Informative

      Take PPC for example, and, um, do an isync?

      --

      I've had this sig for three days.
    15. Re:Code rewrites going to be needed? by larkost · · Score: 4, Interesting

      On Apple platforms Microsoft has a very long history of this. There was another major case in the Apple II era where Apple developer documentation specifically reserved an address space for future expansion. Microsoft ignored this, and the IIe broke a good chunk of their software because of this.

      Microsoft has historically had very bad coding practices. From all accounts I have heard this has markedly improved, but it was pretty bad.

    16. Re:Code rewrites going to be needed? by edrugtrader · · Score: 2, Funny
      I would entertain listening to cases where self-mod'ing code has its place.
      isn't that what my second /. account is for?
      --
      MARIJUANA, SHROOMS, X: ONLINE?! - E
    17. Re:Code rewrites going to be needed? by Anonymous Coward · · Score: 2, Insightful

      You have to understand that in the old days, these sorts of things weren't considered "bad coding practices", they were considered "Super Elite Hacker Tricks". Early PC programming was always to the metal, using every trick in the book.

      The hardware was ridiclously constrained -- the functionality of something like Word 4.0 (which ran on a 1MB Mac Plus) compares to modern word processors (which need 50MB of RAM and a Pentium II). Someone had to hack like crazy to get that stuff to work, and they were probably fully aware that it could blowup later.

  5. what a drag by Wellmont · · Score: 4, Insightful

    Can anyone else say that it is ABOUT time that buffer overflow was built into a processor or motherboard? The only thing i worry about is the performance drag that making up for everyone's programming mistakes can do to a processor.

    1. Re:what a drag by m0rph3us0 · · Score: 4, Insightful

      All it is is on extra bit in the pagetable that check whether the memory region is W^X (write or execute). This kind of thing usually requires a bit of operating system magic to make it work. i386 already has W^X protection, it just isn't enabled by most OS's.

    2. Re:what a drag by phasm42 · · Score: 2, Insightful

      That's what I was wondering about... if a program is properly separated into code/data/stack segments, and the Execute bit is properly set on each segment's descriptor, then why is a new CPU feature needed? I never learned protected mode asm in depth (I learned asm in real mode), but it seems like all the necessary bits are there for the OS to protect against this. If someone knows why this isn't or can't be done, would you please post a response?

      --
      "No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
    3. Re:what a drag by paranode · · Score: 5, Informative

      Exactly. OpenBSD 3.3 already came with this feature in May 2003.

      "W^X (pronounced: "W xor X") on architectures capable of pure execute-bit support in the MMU (sparc, sparc64, alpha, hppa). This is a fine-grained memory permissions layout, ensuring that memory which can be written to by application programs can not be executable at the same time and vice versa. This raises the bar on potential buffer overflows and other attacks: as a result, an attacker is unable to write code anywhere in memory where it can be executed. (NOTE: i386 and powerpc do not support W^X in 3.3; however, 3.3-current already supports it on i386, and both these processors are expected to support this change in 3.4). "

    4. Re:what a drag by Anonymous Coward · · Score: 2, Interesting

      The i386 (and I think even the 286) have provisions for 4 levels of privledge for code. Programs at level 0 can do pretty much anything, those at level 3 can do very little (e.g. not access other processes memory and only call higher privledge levels via special 'call gates').

      Levels 1 and 2 are intended to be where the majority of the OS kernel sits, this would mean that something like a device driver can't over write the scheduler. But no OS to my knowledge uses this feature of x86. If this were done there would be less chance of kernel code causing a system wide crash or any buffer overflow which manages to hook into the kernel actually being able to cause as much damage.

      The entire x86 range also differntiates code segments, data segements and stack segments(the cs register and the d/e/f/gs registers).

    5. Re:what a drag by hweimer · · Score: 2, Insightful

      All it is is on extra bit in the pagetable that check whether the memory region is W^X (write or execute). This kind of thing usually requires a bit of operating system magic to make it work.

      I don't think it's that easy. For example, the RET instruction on x86s that is usually called at the and of a function reads the address of the next instruction directly from the stack. If this address has been overwritten by a buffer overflow, an attacker can jump to an arbitrary address in the memory where the really nasty code is located.

      Even if the memory regions that the attacker can modify are marked as non-executable, it is still possible to call a function inside the C library. A system() call will lead to arbritrary code execution as well.

      --
      OS Reviews: Free and Open Source Software
  6. They are NOT protecting against overflows by Anonymous Coward · · Score: 5, Informative

    They are protecting the pages marked as code from the data pages. Code could still overflow, but not use that to execute arbitrary code in the pages marked as data(or non-executable).

    1. Re:They are NOT protecting against overflows by cybergrue · · Score: 3, Informative
      Outside of some academic/reserch application, you don't want your code to be self-modifying, as it is much much more likely to be a bug then what was intended. Self modifying code is one of the reasons why Turing's Stoping Problem is unsolvable. It is very easy for self-modifying code to get into an infinite loop.

      That said, if you want to create self-modiying code for some reason (hey, its actually an intresting field), then you should probably do in an interpreted language for several reasons. First being that you don't screw-up the OS, and second, the intrepreter has a fair chance of detecting when the program has entered an infinite loop. (Hmm, its been in that loop for a few million cycles and its state does not appear to be changing). This can be done with stacks or counters. I've seen it in some Smalltalk interpreters.
      A third advantage is that the Virtual machine you run this self-modifying code on doesn't even need to exist in reality, so you can do a lot of wierd and wonderful stuff with it, and it will still run.

      Protected momory has exited for a long time, and x86 architecture is just about the last major processor architecture that does not have support for user and OS seperated protected memory. I am taking an OS course right now, and I was very surprised at this as it solves so many malicious code based problems like buffer overruns.

  7. screw average joe by jrexilius · · Score: 2, Insightful

    My company has 85,000 desktops and almost as many servers and we are just one large bank. I can see this being a rather great corporate standard.

  8. Linux support by nate1138 · · Score: 5, Insightful

    AMD's Athlon-64 (for PCs) and Opteron (for servers) will protect against buffer overflows when used with a new version of Windows XP.

    This does require some interaction from the operating system in order to work. Hopefully AMD will release enough information to allow this feature to be implemented in Linux.

    --
    Where's my lobbyist? Right here.
    1. Re:Linux support by TheRealFoxFire · · Score: 5, Informative

      It will likely be in their architecture manual. The summary of the protection is that it allows the OS to mark pages of virtual memory with a No Execute (NX) bit. Attempting to execute any instructions from such a page would cause a trap to the OS.

      An OS would then use this to mark pure data page and areas like the stack as NX so that overflowing datastructures doesn't allow arbitrary malicious code to be run.

    2. Re:Linux support by Sloppy · · Score: 2, Insightful

      The article is vague, but it's probably talking about the per-page permissions thing. OpenBSD already uses it, when compiled for x86-64. I'm sure the info is already quite available for Linux dudes to use it too.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    3. Re:Linux support by nester · · Score: 3, Informative
      Wait, are you saying that pages don't *already* have an execution-enable bit?

      yes, this is one of the wonderful misfeatures of x86. i don't know what this article is all about. amd64 ALREADY has an execute bit in each pte, when it's in long (64bit) mode. this is nothing new; it's been in amd's manuals for while. i'd bet it was one of the first x86 problems they planned to fix.

    4. Re:Linux support by Tony+Hoyle · · Score: 5, Interesting

      It's been implemented in Linux since about 6 months ago, at least on the amd64 branch.

      http://www.x86-64.org/lists/discuss/msg03469.htm l

    5. Re:Linux support by gr8_phk · · Score: 2, Interesting
      "Hopefully AMD will release enough information to allow this feature to be implemented in Linux."

      I believe this is already in Linux - see x86-64.org where the porting was done. I recall lots of discussions about the effects of non-executable stack about a year ago. Linux fans should have been touting this for some time as an advantage over the competition, even if only on AMD64.

    6. Re:Linux support by Weirsbaski · · Score: 2, Interesting

      This does require some interaction from the operating system in order to work. Hopefully AMD will release enough information to allow this feature to be implemented in Linux.

      Well, no-execute-pages has been fully documented in the publicly-available x86-64 (now AMD64) Programmer's Manuals for two years now.

      Now, if I could only get some documentation on that new-fangled Win2K operating system ...

      --

      I am not a sig.
  9. "Average Joe" Vs. buffer overflows by MySt1k · · Score: 3, Insightful

    The question will be whether their PR department can spin this into a big enough story to sell to the Average Joe.
    but can "Average Joe" understand the implication of buffer overflows ?
    try to explain to Homer Simpson why he should upgrade his computer based on buffer overflows protections.

    --
    Doh !
    1. Re:"Average Joe" Vs. buffer overflows by iantri · · Score: 4, Insightful

      Explain to Average Joe that his computer will be protected from (some) crashes and (some) computer viruses..

  10. Nope by lukewarmfusion · · Score: 4, Interesting

    It would be a hell of a marketing and user education campaign to get users to understand this (or almost any hardware related details).

    They want fast and reliable, not techspeak. I can barely get my clients to understand why they need SSL (and how it works).

    1. Re:Nope by Inuchance · · Score: 5, Interesting

      I think a good commercial would having hackers trying to break into a computer, and then a big "ACCESS DENIED" error shows, and one of the hackers exclaims, "No good, they've got the latest AMD CPU!" And then some announcer says something like, "With the latest CPUs from AMD, your computer executes only what YOU want it to, not what THEY [flash over to image of frustrated hackers] want!"

    2. Re:Nope by rtaylor · · Score: 2, Insightful

      [i]I can barely get my clients to understand why they need SSL[/i]

      With SSL you get the lock picture. Without SSL you simply don't get it. Everyone wants to get it, but that takes SSL and not everybody can have SSL. Do you want brand name SSL for a low low price?
      Gotta have the lock (tm).

      --
      Rod Taylor
  11. Good or Bad idea? by demonic-halo · · Score: 3, Insightful

    This is all cool and all, but will this mean people may start writing sloppier code which will become something to bite as in the ass later in the future?

    For example, let's say people wrote insecure x86 code, then someone decides to port the code to another platform. There'll be software vulnerabilities that will be around because of the flawed code in the first place.

    1. Re:Good or Bad idea? by Hoser+McMoose · · Score: 2, Informative

      First off, if they port it to damn near any other architecture out there except for PowerPC, then that other platform WILL have this no-execute bit implemented already. x86 is REALLY late to the game with this technology, it already exists in SPARC, HPPA, IA64, Alpha, etc. etc. It's really just x86 and PowerPC that are the two notable exceptions to the rule; they enforced this sort of thing through segmentation (ie it can and has been implemented in regular x86 code, it's just a bit sloppier and requires some kind of ass-backwards hacks to get it to work with the operating system).

      Also this no-execute bit is NOT a sure-fire fix. In fact, it's not a fix at all, buffer overflows can definitely still occur, it's just a whole heck of a lot harder to do anything too malicious once that buffer has been overflowed. Basically you just end up with a DoS attack instead of a remote access vulnerbility. Still something that should be fixed though.

      So, is this a good idea? Hell yeah! An extra line of defense is ALWAYS a good thing!

  12. Securing C++ through hardware by KingOfBLASH · · Score: 5, Insightful

    I find it interesting that one of the reasons that hardware protection from buffer overflows is needed is because many programs were created using functions in languages that don't properly check array bounds. Programmers really need to learn that either they need to use functions which provide bounds checking if they insist on using a language like C or C++, or they need to program in another language.

    (Note: Although many people come down on C++, it's also what functions you use. For instance, while fget() is considered "safe" because you provide a buffer boundry, gets() is considered unsafe. This drives me nuts! We knew how to program to prevent buffer overruns years ago, and they're still a problem!)

    1. Re:Securing C++ through hardware by DaHat · · Score: 5, Insightful

      I think you are forgetting something though... C and C++ are the most powerful higher level languages that exist today... Why? Because with them... you can easily mess everything up!

      Back in college I would defend C/C++ against one of my professors who thought it was the spawn of satan (and oddly though Pascal was/is the greatest language ever) for the simple fact that it gives you the ability to do so many things with few limits.

      A hammer cannot only be used to drive in nails or bang a dent out of your car hood... but it can also be used to break your neighbors windows and beat someone to death. Just because a tool CAN be used for ill, doesn't mean the tool is to blame. After all... guns don't kill people... murders/soldiers/hunters/etc do!

    2. Re:Securing C++ through hardware by KingOfBLASH · · Score: 2, Interesting

      You must have misread my post as I clearly stated it wasn't C++ that was the problem but the way people used it. Most (every?) functions that is still around for backwards compatibility and runs the risk of buffer overflows has an alternative that can be used to prevent buffer overflows by limiting the amount of whatever it is you are doing.

    3. Re:Securing C++ through hardware by TheOldFart · · Score: 2, Funny

      Unless you use a .NET Hammer (R). It must be used through this ingenious slotted track (58lbs for simple nails, 378lb for server nails) that has sensors that can determine if what is to be hit is a nail or someone's head. The only draw back is that it only works with nails made by Microsoft, it consumes 1G Watts, and only hits 10 nails/hour (unless you buy the unlimited nail version which can do 100 nails/hour depending on weather conditions). By the way, those patent free hammers out there are only used by the fringe, leftist trouble makers.

    4. Re:Securing C++ through hardware by john.r.strohm · · Score: 4, Insightful

      Back in college I would defend C/C++ against one of my professors who thought it was the spawn of satan (and oddly though Pascal was/is the greatest language ever) for the simple fact that it gives you the ability to do so many things with few limits.

      If we ignore for the sake of argument the specific "high-level assembler" design goal for C, and look instead at philosophy which was carried into C++, there was this fundamental hacking philosophy that said that, because you occasionally needed to do something a bit bizarre, it should be EASY to do that bizarre thing. Further, the entire C/C++ philosophy was that the programmer was solely responsible for the consequences of his actions.

      We contrast this with Ada. Ada's philosophy was that you only occasionally need to do bizarre things, that 95-99% of the time, you are doing perfectly straightforward things, that the effort should be distributed accordingly, and that the language should be helping the programmer to do the routine things correctly. This implies that, when the programmer attempts to do something bizarre, 95-99% of the time it is because he screwed something up, and he DIDN'T mean to do what he typed, and the compiler barfs.

      At that point, it becomes the programmer's responsibility to tell the compiler, and NOT INCIDENTALLY everyone who will ever do maintenance on his code, that "Yea verily I DID intend to shoot myself in the foot here!". Idioms are provided for doing that. If the programmer really intended to take that floating-point number and treat it as a bitmask, he has to tell the compiler that this was indeed his intention.

      Ada did not provide a "back door" array reference mechanism comparable to the C/C++ pointer hacking, for the reason that it is impossible to do proper bounds checking in that case. Ada does provide a mechanism for suppressing bounds checking, but it is NOT the default and it is explicitly forbidden by the standard from it being the default in any conforming implementation. If the programmer has a good reason for suppressing bounds checking, he has to do it EXPLICITLY, at some level.

      Your analogy with hammers is OK, but it breaks down with guns. Guns have trigger guards and safety catches, PRECISELY to prevent naive users from shooting themselves in the foot, or from shooting someone else that they didn't intend to shoot. At the same time, those safety mechanisms do not prevent the gun from being used to shoot someone that the user most fervently WANTS shot right then.

      In my view, if I utter a sequence of instructions that will dance a fandango on core, it is almost certainly the case that I have made an error, and I would prefer the toolset to ask me "Are you sure? (Y/N)". If I am certain that I intended to dance that fandango, I am also certain I want to warn the next guy in line that I am now lacing up my dancing wafflestompers, and the language should support that.

  13. Of course they can by mikeophile · · Score: 5, Funny
    The question will be whether their PR department can spin this into a big enough story to sell to the Average Joe.


    Sure, AMD just has to write a buffer-overflow exploit into a worm that carries the pop-up window message, "If you had and AMD processor, you're hard drive wouldn't be erasing right now."

  14. Look closer... by heironymouscoward · · Score: 4, Funny

    ....

    MOV AX,DS:OSID[BX]
    CMP AX,2 ; 2=Windows 3.x
    JE PANIC
    CMP AX,3 ; 3=Windows 9x
    JE PANIC
    CMP AX,4 ; 4=Windows 2K/ME/XP
    JE PANIC
    CMP AX,10 ; 10=Minix
    JE OKAY
    CMP AX,11 ; 11=... :PANIC
    ISSUE 'CPU BUFFER OVERFLOW ACTIVATED'
    JMP PANIC

    --
    Ceci n'est pas une signature
  15. Re:the Chipmaker??? by DaHat · · Score: 2, Insightful

    Because by your logic, Microsoft has patented the technology behind causing them and in this rare case decided to leave it up to someone else to fix.

  16. I'd buy by valkraider · · Score: 2, Informative

    I'm not Joe, but if all other factors were equal - this would be enough to sway me to them... But of course, it's almost moot - since I use Apple OSX... But I do have some Linux boxes that could run on them...

    However - they WILL have to spin it well enough, or better than the "Megahertz Myth" because that didn't work too well for average folks. BestBuy salesmen don't know how to explain "AMD Athlon 289456++XL 3400 MP SSE4 +-7200 BufferXTreme" so they just push intel...

  17. Rob Enderle Strikes Again! by Galuvian · · Score: 4, Funny

    Although this is great for AMD I'm sure, I stopped reading the article when Enderle was the first 'analyst' quoted.

    1. Re:Rob Enderle Strikes Again! by cpu_fusion · · Score: 2, Funny
      It's too bad the article's editors left out the second part of that Enderle quote, which was:

      "Plus, the AMD64 makes a revving noise at startup that will make everyone at your next meeting think you are really cool. Did I mention chicks dig buffer overflow protection, because they surely dig me."

  18. Ahem... by cbiffle · · Score: 5, Insightful

    From my reading of the article, this sounds like it's just a new spin on the per-page eXec flag on the AMD64 architecture.

    Granted, yes, this is a good thing, but "buffer-overflow protection when used with a new version of Windows XP?" We now have to rely on Microsoft to set the X flag properly...

    This has been talked about on Slashdot a lot in the past; the OpenBSD guys in particular are hot on the Opteron because it, like SPARC, provides this protection. Fortunately, this isn't some Windows-specific voodoo; we all stand to benefit from this fundamental fix to the broken Intel VM architecture. :-)

  19. Re:Pathetic by DaHat · · Score: 5, Insightful

    Wraaaag! Why does everyone keep calling this a Microsoft bug?

    Yes... the vast majority of buffer overflow exploits we read about are Microsoft based, however it's not too hard to find software from other providers, yes, even in Linux. Which can suffer from this kind of flaw.

  20. There's no excuse for buffer overflows by ChiralSoftware · · Score: 5, Insightful
    Remember back in the 60s and before, all cars leaked oil? People just accepted, "Cars leak oil." They didn't realize that it didn't have to be that way.

    Then the Japanese started making cars that didn't leak oil. Now, no one would accept a car that leaks oil. People have realized that cars don't have to leak and we shouldn't accept it.

    It's the same thing with buffer overflows. People now have this attitude "well, there's nothing you can do. Just write code really carefully. Anyone who makes buffer overflows in his code is just a sloppy coder!"

    Nothing could be further from the truth. There is no way anyone can code a large project in plain old C and not make buffer overflows. Look at OpenBSD, who are masters of secure C. They still have buffer problems.

    And yet, there is absolutely no reason for code to have any buffer overflows! There are programatic tools, such as virtuams machines (think JVM) and safe libraries which mean that programmers never have to manipulate buffers in unsafe ways.

    Putting in hardware-level support for this would be fantastic. It is time for people to change their attitude about what they accept in computers. Crashes and security holes are not inherent aspects of software. Mistakes are inherent in writing code, but these mistakes don't always need to have such disasterous consequences.

    ---------
    Create a WAP server

    1. Re:There's no excuse for buffer overflows by Fapestniegd · · Score: 4, Funny

      If you designed and produced cars on a typical programmer's development schedule, you would probably have to pour oil into them while running to keep the fluid levels right.

      And they would just explode for no reason sometimes.

  21. Re:Pathetic by eht · · Score: 5, Insightful

    What's about GNU/Linux's bugs or NetBSD's or Sendmail's bugs? This is OS agnostic.

    This isn't insightful, it's flamebait and FUD.

  22. the Average Joe doesn't buy processors by funny-jack · · Score: 5, Insightful

    They buy computers. They don't need to sell the idea to the Average Joe, they need to sell the idea to the people making computers for the Average Joe.

    --
    You probably shouldn't click this.
  23. This is good and bad. by kabocox · · Score: 2, Interesting

    This is good in the same way AOL is good at protecting most of its users. It is bad because instead of making programmers actually pay attention to this sort of thing, it encourages them to completly ignore the problem! I can just see alot of people say to themselves, I don't have to worry about that because the hardware will make sure bad things don't happen. What next, hardware Outlook virsus checkers?

  24. I guess I'm too old or something by Conor6 · · Score: 2, Insightful

    ...when I was a wee programmer, I was taught that the solution to this problem was to write better code.

    --
    Conor
    Programmer, Consultant, Geek, CTYer.
    1. Re:I guess I'm too old or something by egomaniac · · Score: 2, Insightful

      ...when I was a wee programmer, I was taught that the solution to this problem was to write better code.

      And that strategy sure seems to be working well for the industry, doesn't it?

      Bugs are a fact of life. The programmer who can write everything perfectly on the first try and never make an innocent screwup does not exist. Even if such a programmer existed, he would not be allowed the time or development budget to actually write perfect code, as his code would be pushed out the door as soon as it looked reasonably complete.

      So, you can sit on your ass idly envisioning a world in which everybody writes perfect, bug-free code, or you can come back to the real world and try to make it more difficult to produce bugs and reduce the impact of the ones that inevitably occur.

      After years working exclusively in Java, I am horrified that C programmers still consider the lack of array bounds checking to be a natural, normal part of life. It isn't. It's disaster after disaster waiting to happen, and there is absolutely no excuse for it. Performance is not an excuse -- we have machines running at multiple gigahertz now. They can spare a few cycles to do bounds checking. This crap needs to be fixed.

      AMD can't make us all switch to sane programming languages, but they can at least ensure that code segments can't be modified. It's a good first step. The next step is to realize that C/C++ is horribly, unbelievably broken at a fundamental level and needs to be discarded.

      --
      ZFS: because love is never having to say fsck
    2. Re:I guess I'm too old or something by Yokaze · · Score: 2, Insightful

      > It's disaster after disaster waiting to happen, and there is absolutely no excuse for it. Performance is not an excuse -- we have machines running at multiple gigahertz.

      No, most desktop machines and servers run at several GHz, they could spare some cycles for most their applications. Fine, use a bound checking version of the STL and don't meddle with pointers, it's not like you have, too.

      But the point is, most processors aren't on the desktop and don't have the cycles or space to check every pointer. And some applications are real-time. You just have 1ms to do X. So maybe you have go down to assember to get the work.

      C++ gives you the possiblity to work low-level, when you need it, but lets you program high-level, if you don't want to.

      > The next step is to realize that C/C++ is horribly, unbelievably broken at a fundamental level and needs to be discarded.

      The first step is to realise that a bad programmer produces broken code whatever language he/she uses. Bounds-checking is no substitute for correct error-checking and -handling, code-review, testing and debugging, whatever the language

      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
  25. What does it do? by slamb · · Score: 2, Informative
    From the article:
    Until now, Intel-compatible processors have not been able to distinguish between sections of memory that contain data and those that contain program instructions. This has allowed hackers to insert malicious program instructions in sections of memory that are supposed to contain data only, and use buffer overflow to overwrite the "pointer" data that tells the processor which instruction to execute next. Hackers use this to force the computer to start executing their own code (see graphic).

    The new AMD chips prevent this. They separate memory into instruction-only and data-only sections. If hackers attempt to execute code from the data section of memory, they will fail. Windows will then detect the attempt and close the application.

    I've seen patches to Linux that provide a non-executable stack. There's also the mprotect(2) system call to change memory protection from user programs. And I believe OpenBSD has had a non-executable stack in the mainline for at least a couple releases.

    So what they're advertising here seems to have already existed. If not, how are the things above possible?

  26. Intel's advantage: the motherboards. by dave-fu · · Score: 2, Interesting

    You buy an Intel chip, you buy a reference mobo and you get rock-solid stability. You buy AMD, you end up rolling the dice on Via, SiS or NVidia and what feels like filthy voodoo trying to get everything to play nicely together.
    That said, nForce and nForce2-based mobos have come a long ways in terms of stability and overall ease of use, but then again... no one ever got fired for buying Intel. AMD separating code from data (curiously, like Intel managed to do once upon a time) is lovely but proving that they've got the best solution out there is a battle that's not going to be won overnight by a single innovation.
    Uptime will prove who's got the better solution.

    --
    Easy does it!
    This comment has been submitted already, 276865 hours , 59 minutes ago. No need to try again.
  27. Re:the Chipmaker??? by normal_guy · · Score: 4, Informative
    --

    Linux: Free if your time is worthless.
  28. Re:Pathetic by strictnein · · Score: 5, Interesting

    It's pathetic that AMD has to fix M$'s bugs...

    How is this insightful? First of all, any post that uses the $ is Microsoft's name should be modded -1, 14 year old poster.

    As if buffer overflows really had much to do with the OS. It has a lot more to do with poor coding. Try the following searches for more info:

    linux buffer overflow
    bsd buffer overflow
    OS X buffer overflow
    Solaris buffer overflow
    And yes, everyone's favorite:
    windows buffer overflow

  29. AMD Opteron and Athlon 64 already have this by dtjohnson · · Score: 4, Informative



    The AMD Opteron and Athlon 64 chips already
    have the buffer overflow protection in their hardware and the
    feature is already supported by both Linux and Windows XP 64-bit
    edition. AMD calls this "Execution Protection" and the
    basic idea is that the processor will not allow code that arrives to
    the system via a buffer overflow to be marked as
    executable. The slashdot story says "will have" for both
    Intel and AMD when it should read "AMD already has and Intel will
    have..."

    1. Re:AMD Opteron and Athlon 64 already have this by Helvick · · Score: 3, Insightful

      As you say this is already supported by an appropriately compiled Linux kernel or XP-64 on the A64 & Opteron. The wider benefit for all of us is that this is to be included in XP SP-2 which will hopefully become endemic sometime this year. See this eWeek article . At that point this becomes an excellent marketing tactic for AMD. I haven't examined the IA32e documents for myself yet but those who have seem to think Intel have left out support of the NX flag - see sandpile.org. If this is true then Intel are handing AMD a real advantage as far as consumer marketing is concerned. Even I could spin that so that that it looked like more of an advantage than 64bit capability which to be honest is a real hard sell as far as your average consumer is concerned.

  30. Hrmm. by WhodoVoodoo · · Score: 2, Interesting

    Actually, I'm kind of worried that this might create a sort of Baby Boom effect of bad code.

    Just the sort of thing that, in a few years perhaps, someone will figure out how to exploit regardless of whether or not people are using these new chips.

    It may be insecure code, but if one can't effect it by use of these chips, it is no longer insecure. But what if a round of damaged chips come out. Would Intel or AMD be liable for the damages?

    Or would they be liable is there was a way around the new protection?

    Can you really impliment this in hardware, 100%, with 0 chance of exploitation?

    This kind of scares me, honestly. I do not yet trust this idea. AMD or Intel, I just don't trust the idea.

  31. Re:No silver bullet. by m0rph3us0 · · Score: 2, Informative

    All you need to rewrite is the executable loader, and the memory allocator.

  32. Old news by Todd+Knarr · · Score: 5, Interesting

    This existed in the 8086 and 8088 CPUs. You seperate your program into code, data and stack segments and load the appropriate segment registers. Code segments can't be read or written, data and stack segments can't be executed. But stupid programmers decided that that kept you from playing games with code-as-data and data-as-code, so they created flat addressing mode with all segment registers pointing at a single segment. Feh. Those who don't read history are doomed to repeat it. Badly.

    1. Re:Old news by tomstdenis · · Score: 4, Informative

      Except you could write/read from the CODE segment and you could far jump into the data/extra/stack segment registers.

      What's better is that CS==DS was a common mode [known as a .COM or TINY model program].

      So there goes your theory.

      Tom

      --
      Someday, I'll have a real sig.
  33. Re:Pathetic by Anonymous Coward · · Score: 5, Insightful

    Don't blame MS for everything. Unix too has a notorious history of its contibution due to buffer overflow. Ever heard of sendmail? I believe the first internet worm in 1988 utilized buffer overflow in number of unix apps including sendflow, finger, ...

    Software can't do everything. In fact, some earlier architectures offered choice of separating data segment and code segment (DEC VAX were the latest I used which had this feature), but because they have some performance penalty, the hardware companies removed this feature. Now that we have more speed than needed, it is being put back.

  34. Re:the Chipmaker??? by Malc · · Score: 2, Insightful

    It's not just MSFT. It's everybody. You could make that statement about the Apache Foundation.

  35. Execution bit on MMU Pages by adisakp · · Score: 5, Interesting

    For what it's worth... many processors, like the PowerPC series have had this "buffer overflow protection" feature for years. The idea is to mark program code pages after they are loaded as executeable and read-only. No other pages are marked executeable. It destroys clever little hacks like self-modifying code but at the same time, makes it impossible for buffer overflows to introduce new code into a programs executeable code page set.

  36. Also: Widespread DoS possibility? by WhodoVoodoo · · Score: 2, Interesting

    The new AMD chips prevent this. They separate memory into instruction-only and data-only sections. If hackers attempt to execute code from the data section of memory, they will fail. Windows will then detect the attempt and close the application

    So if there is a buffer overflow in explorer.exe, and I exploit this buffer, it kills explorer.exe.

    and if I do this to IIS, repeatedly, from an outlook virus I just created to scan IP ranges and shut down any IIS server it can locate.

  37. The Average Joe? by SpaceRook · · Score: 5, Interesting

    The average joe can't even figure out that he shouldn't open email attachments from people he doesn't know (Exhibit A: MyDoom). You really think he knows what the fuck a buffer overflow is? "No buffer overflow? But what if I *want* overflow! More is better!" I applaud this security feature, but don't think of it as a selling point for typical users.

  38. Wow! by El · · Score: 4, Funny

    Separation of programs into separate code and data segment -- what a novel idea! I hope they got a patent on this technology!

    --

    "Freedom means freedom for everybody" -- Dick Cheney

  39. Designed for Microsoft Windows by Hamster+Lover · · Score: 4, Funny

    Now those stickers on the front of the computer really mean something...

  40. Re:the Chipmaker??? by denlin · · Score: 2, Insightful

    agreed, it seems we're spawning an even lazier bunch of programmers then ourselves.

    --
    Yes, I have RTFA. Yes, I have a girlfriend. Yes, I'm new here. And no, I don't want a free iPod.
  41. Re:Pathetic by Kenja · · Score: 3, Funny

    What are you talking about? Linux has never suffered a buffer overflow.

    --

    "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
  42. Re:Pathetic by paranode · · Score: 2, Informative

    Wraaaag! Why does everyone keep calling this a Microsoft bug?

    From the article:
    "AMD's Athlon-64 (for PCs) and Opteron (for servers) will protect against buffer overflows when used with a new version of Windows XP."

    So either these chips will only work to protect against Microsoft bugs (in conjunction with software), or we'll have to wait until Linux can figure out how to use this feature.

  43. Those are MOTHERBOARDS by Anonymous Coward · · Score: 4, Insightful

    Not CPU's. AMD doesn't make those motherboards, so it's not their fault if they don't implement the features.

  44. AMD chipsets by Anonymous Coward · · Score: 2, Informative

    AMD did make a chipset for the dual processor Athlon motherboards, and it really wasn't anything to brag about. On the other hand, the third party nVidia nForce2 chipset has had rave reviews and a number of great motherboard implementations.

  45. I predict that... by Inuchance · · Score: 2, Insightful

    This will be the year of sloppy coding.

  46. Re:the Chipmaker??? by kfg · · Score: 4, Informative

    This has nothing to do with Microsoft, and everything to do with architecture and programing languages.

    If you program in C on Intel you are going to have problems without almost fanatical devotion to the Po^H^H management of your memory resources.

    That goes for Linux as well, as any check at Bugtraq can confirm.

    Yes, people should be very careful when coding in languages and on architechtures which allow buffer overflow, but the real solution is at a level lower than the coder's.

    KFG

  47. Protection? Not really... by shabble · · Score: 2, Interesting
    From the article:

    If hackers attempt to execute code from the data section of memory, they will fail. Windows will then detect the attempt and close the application.


    Great. So the 'buffer-overflow protection' isn't really a fix - it's a (more than potential) DOS. Take, erm, the kernel for example. Buffer overflows, BSOD.
    1. Re:Protection? Not really... by ortcutt · · Score: 2, Insightful

      DOS is better than a remote root exploit. When your machine goes down you know you at least know about it.

  48. Stack Protection Today by ortcutt · · Score: 2, Informative
    The article is thin on the details of how they are redesigning the chips to prevent overflow exploits, but Stack Protection (which as far as I know is what matters when it comes to buffer overflows) is available today. IBM's SSP project extends GCC to provide stack protection.

    http://www.trl.ibm.com/projects/security/ssp/

    Gentoo-specific info here.

    http://www.gentoo.org/proj/en/hardened/propolice.x ml

  49. Added protection by Mick+Ohrberg · · Score: 3, Funny

    Excellent! Now they just need to develop a chip that protects against id10t and PEBCAK problems.

    --

    Quidquid latine dictum sit, altum sonatur.

  50. Re:Pathetic by DaHat · · Score: 2, Insightful

    Yes, the article talks about its use with newer versions of Windows (as early as SP2 of XP if I'm not mistaken), I would remind you that this is a Windows centric market right now, when a company like AMD or Intel designs a new processor or function, the first place they talk to about it is Redmond to get OS support in the most wide spread OS. Once that is accomplished, then they can look into secondary markets for support.

    I have little doubt that AMD will supply enough info to get this functionality working under Linux around the same time that these chips ship.

  51. Re:This is not a future thing - AMD does it today by Anonymous Coward · · Score: 2, Informative

    This is not a non-executable stack. It is a per-page execute bit. Please do not confuse the two.

    Linux has not yet looked into technology like this. The PaX project however has these features available via a kernel patch, that uses software techniques to achieve what will be quite simple now that hardware can support marking pages executable.

    Yes people, this does mean that as far as buffer overflows go, Windows on amd64 will soon be more resilient than a stock Linux kernel.

  52. A bunch of things by Groo+Wanderer · · Score: 3, Informative

    1) It is also in Prescott
    2) It needs OS support, specifically XP SP2, which isn't out yet.
    3) It doesn't really do what it is meant to, I have seen several 'theoretical' discussions on how to circumvent it. Think of it as another hoop to jump through for the black hats.
    4) You need to be in 64-bit mode to use it
    5) 4) requires a recompilation anyway, why not do it right with the right tools when you recompile?
    6) I know of at least one vendor using to bid against intel on contracts now.
    7) Oh yeah, this will do a lot of good. Really. When has a white paper ever lied?
    8) The more you know about things like this, the more you want to move into a cabin in Montana and live off the land.

    -Charlie

    1. Re:A bunch of things by Kenneth+Parker · · Score: 2, Insightful

      Try to get your facts correct. Corrections:

      1) If its in Prescott, Intel isn't saying so.
      3) It just makes things harder to exploit, but that true of everything.
      4) BS. You have to switch to PAE mode, but that isn't 64bit mode.
      5) It only requires the kernel change, no apps need the recompile.
      7) It will typically change exploits from allowing elavation of privelege to a DOS.

  53. Re:the Chipmaker??? by Frac · · Score: 3, Insightful

    why does the chipmaker need to protect us from microsoft buffer overflow errors? why can't they just double check their code?

    That's like saying "why do we need cops? why can't people just not break the law, so no one needs to be around to reinforce them?"

    Accidents do happen, and it's not only Microsoft's own problem. It doesn't hurt to have another layer of security for bad programming...

  54. At last, consumer CPUs catch up with the Alpha by alanw · · Score: 3, Informative

    Several architectures (sparc, sparc64, alpha, hppa, m88k) have had per-page execute permissons for years.
    See This BugTraq posting by Theo de Raadt

    1. Re:At last, consumer CPUs catch up with the Alpha by Mainframes+ROCK! · · Score: 2, Informative

      I suspect its even older than that ... Burroughs seems to have something like this, called "tagged words" or "tagged memory" even longer ...

      http://www.ajwm.net/amayer/papers/B5000.html

  55. Re:eh? by sgifford · · Score: 2, Interesting

    Intel processors don't support this properly. IIRC, they use a single bit to mean "Executable and Writable", although I can't currently find a reference to confirm that.

  56. Athlon was NOT the first AMD CPU by Christopher+Bibbs · · Score: 3, Insightful

    There were plenty of good AMD and Cyrix 486 CPUs being used when Intel switched to the Pentium and the successful "Intel Inside" badging. Bonus points to anyone who still has a "Intel Onboard" sticker from the earlier failed marketing attempt. However, users at the time largely only knew they had a 386 or 486. Most of them couldn't tell you who made it without opening the case.

    The AMD K5, K6, K6-II, and K6-III were all decent chips, but were nothing more than the "bargain" chip. What gave Intel the real lead over AMD was the combination of several years of the fastest chips being only available from Intel and the public knowing who made their chip.

  57. Re:Pathetic by strictnein · · Score: 2, Insightful

    M$ to abbrev Microsoft as it seems to accurately describe their primary design goal.

    As apposed to all those other companies whose goal is to, what, make people happy?

    Why not:
    $u$e
    $aturn
    $tarbucks
    $un
    People$oft
    et c.

    Perhaps a little more understanding before you run rampant on your pathetic link attempts and criticisms.

    I understood in full. The original poster was at best misinformed, at worst a trolling idiot. As for pathetic link attempts, how better to illustrate a point than to provide evidence support that point? Should I have just thrown out some "leet" speak and swear words and just verbally berated the original poster? Would that be better?

  58. New AMD slogan? How about.... by FerretFrottage · · Score: 3, Funny

    "Intel Inside? Then so are the hackers"

    --
    "Look Lois, the two symbols of the Republican Party: an elephant, and a fat white guy who is threatened by change."
  59. UNIX Overflow by severoon · · Score: 2, Insightful

    I remember in college adminning a lab of HP-UX's when the "let's send more than 64K ping packets" caused a buffer overflow and a reboot. So it's definitely not exclusively a Windows problem. On the other hand, the article leaves it a little ambiguous as to whether or not this hardware fix will be exclusively useful to Windows (though I don't see how they could do that, there could be some fancy hoops that Windows jumps through anyway that are necessarily to exploit the fix? doubt it, though).

    I don't believe people still write things like, "Why doesn't everyone just write better code?" This reminds me of this one start-up I was working for during the dot com boom. I worked for one company that was so hard up to find managers they hired one guy to oversee the software department who'd never worked in the industry before. He had all sorts of unrealistic expectations, like "If you guys agree to double-check your code, we can save a lot of money by getting rid of the testing phase. We could release like three months early!" He was exasperated that professional coders couldn't write bug-free code on try #1.

    To everyone who says, let's write better code...why don't you write better code? No more bugs in your code ever again!

    Clearly, this is not the answer. What we need to do is take a step back and figure out the environment today, which we can do so much better than 25 years ago. We've seen a lot of the unintended consequences and now we know they exist. Intel or someone needs to develop a new processor from the ground up that addresses all the issues that we now know about through experience.

    One thing I've learned in this business is that you cannot achieve quality through gentleman's agreement, simply by getting someone to agree to write better code.

    sev

    --
    but have you considered the following argument: shut up.
  60. Intel Inside by dpilot · · Score: 2, Insightful

    Blue Man Group and those little notes are only part of the story of the Intel Inside campaign, the part that the public sees.

    The other part is based on the razor-thin profit margins in the PC arena. IIRC, Intel Inside is a co-marketing agreement. Co-market, play those little notes and display the Intel logo as part of your ad, and you get a nice co-marketing fee from Intel. With next-to-no profit margin, that co-marketing fee just might be your profit, or a large part thereof.

    Maybe the days of "You MUST use our CPUs in 100% of your products!" are gone, but I'll bet the days of, "You must use our CPUs in 100% of your products in order to participate in Intel Inside!" are still here.

    --
    The living have better things to do than to continue hating the dead.
  61. There's one legitimate place for rewriting code by ChiralSoftware · · Score: 2, Informative
    One and only one: JIT compilation. For example, when Sun's JVM executes Java bytecode, certain portions of it may get compiled to native machine language and then run. In fact, Sun's compiler has a technology called HotSpot which is supposed to dynamically optimize some of this machine code as it runs. Certainly JIT compilation has big benefits. I believe that perl/parrot will be doing that. How much benefit HotSpot has in the real world, I'm not sure, but it is a cool trick.

    And all of these are cases of an executing piece of code dynamically creating and executing another piece of code which is exactly what happens in a buffer overflow situation.

    However, the number of programs that have a legitimate need to do this is tiny. I'm not sure how this chip will accomdoate those. There may need to be some kind of OS-layer thing with code that is trusted. Maybe the JVM itself could switch modes, so that only when it is actively attempting to write code would that feature be allowed. There are definitely work-arounds to allow JIT to continue working.

    As for copy protection, given a choice between having a system which is secure for me and a system which is secure for them, I'll take the system which is secure for me. What about you?

    -------
    Create a WAP hosting service

  62. Isn't this already possible with segmentation? by ktulu1115 · · Score: 4, Informative

    Call me stupid, but AFAIK x86 chips have full segmentation support (in protected mode obviously) - ability to define different segment types (read only, r/w, execute only, etc)... For those of you not familiar with it, it allows the programmer to define different types of memory segments, which would allow you to do some pretty interesting things such as defining read-only code segments (so the machine instructions can't be modified in memory), and non-executing data segments (to prevent OS from trying to run code stored in program data/buffers). This would solve the problem, at least how they addressed it in the article.

    If current operating systems actually used this in addition to paging (which is what most of them only use now), why would they need to create a new chip? Linux does not fully utilize segmention, mostly only paging. I don't have any resources on MS OS design right now so I can't comment on it... (although maybe looking at the recent source would help some ;)

    --
    # fuser -v /dev/attention | grep work
    #
    1. Re:Isn't this already possible with segmentation? by ktulu1115 · · Score: 2, Interesting

      Ahh yes, this sounds familiar... In protected mode on the x86 (with segmentation enabled), far memory pointers are 48-bit, are they not? 16-bit segment selector + 32-bit memory offset into 4gb virtual address space. That is something of a problem, not being able to fit a far pointer into a general register (kinda makes indirect memory references via pointer hard, don't it?).

      However, the new 64-bit architecture as proposed by AMD (I don't have Intel's specs) seem to suggest this might not be a problem anymore. The AMD64 Architecture Programmer's Manual Volume 2: System Programming has lots of information and I must admit it's a lot to read, but from what I gather would this not be an issue anymore? 32-bit memory offset (upto 4gb virtual address space) + 16-bit segment selector can easily fit within a 64-bit register, however I'm not sure if the CPU is designed to handle such things. From the Application Programming Documentation (at http://www.amd.com/us-en/Processors/DevelopWithAMD /0,,30_2252_875_7044,00.html) , AMD claims that "In 64-bit mode, the AM64 architecture supports only the flat-memory model in which there is only one data segment, so the effective address is used as the virtual (linear) address and far pointers are not needed." (page 23).

      So maybe I have indeed answered my own question... segmentation as it was designed for will not easily be utilized... If so, would anyone with any sort of CPU architecture design/experience possibly give any reasons for this? Would it just be too difficult to modify the instruction sets and architecture to easily accomodate full segmentation support?

      --
      # fuser -v /dev/attention | grep work
      #
  63. Re:What are "SPARC standards"? Thanks. [nt] by Von+Helmet · · Score: 2, Informative

    Scalable Processor ARChitecture.

  64. Re:the Chipmaker??? by nehril · · Score: 4, Insightful

    why can't they just double check their code?
    for the same reason cooperative multitasking went out of style: humans.

    theoretically a coop multitasking operating system is much more efficient than pre-emptive multitasking. coop multitasking systems (like Mac OS pre X and Novell Netware) require each application to voluntarily give up the CPU when appropriate. That means that every app gets the entire cpu to itself, yielding better cache performance and allowing the app to continue a thread until a good time to stop came along (like, waiting for input or disk or whatever). Unfortunately, that means all programs must be perfect, a bug in any one of the running programs will bring down the entire OS like a house of cards. Or if you didn't release resources just right, your app would appear to hog the entire system and it would LOOK like you crashed everything.

    Most programmers are not perfect.

    Thus the rise in pre-emptive multitasking, where app programmers no longer get to decide when to give up the cpu, the operating system yanks your thread based on timeslices or some other mechanism outside the apps control. this means your various caches no longer have the "right" data most of the time, and maybe your thread gets yanked 1 instruction short of what would have been a better stopping place (maybe the next cycle was for a well-timed disk access). Some advanced chip features like memory streaming for SIMD ops also get trampled by pre-emptive multitasking, meaning you can no longer prefetch large chunks of data since threading out stops all your streams (this is a problem for Altivec programming.)

    But on the whole, by acknowledging that programmers are not perfect (it only takes one bad one to ruin your system), and moving to the "wrong" solution of pre-empt multitasking, we get vastly improved stability and perceived performance. This is also why "wrong" solutions like hardware overflow protection are needed.

    A scientist would say you are right, but an engineer would say you are wrong.

  65. AMD is doing just fine by gosand · · Score: 4, Insightful
    Nobody knows if Intel is better, but they don't want a computer that "lacks" Intel inside. They simply guess that if it's inside, it's better than not having it inside. It is brilliant. It can't be copied or AMD looks like a "me too!" player. It can't be contested because it's just vauge enough to not claim that the machine is any better for having Intel inside, but implies that anything else is somehow inferior.

    Do you remember when the "Intel Inside" logo came out? There was no real competition. (it was the Pentium days) There were other processors, but the Pentium pretty much blew them away. Intel didn't just success on that logo alone, they do have a little bit of technology behind it.

    I think it is funny when people say AMD is better. When they say that, ask them why - 99% of the time it will be because it is cheaper (bang for the buck). The other 1% might do overclocking, or read anandtech on a daily basis, or have some highly technical reason - which is essentially irrelevant to the argument. For AMD to be where they are in the processor market, it is nearly a miracle. The only reason is because Intel was comfortable in their position. AMD came on the scene with a comparable product at a cheaper price, and it woke Intel up real fast. They catered more to the "home enthusiast" market at just the right time.

    I have a buddy who has worked at Intel for 7 years now, and I always kid him about AMD. He works on the thermal solutions, and has access to the fab floor. There may be some advantages that Intel has over AMD in some areas (and vice versa) but if you have two well put together systems of each sitting side-by-side, the processor is pretty much a non-issue.

    --

    My beliefs do not require that you agree with them.

    1. Re:AMD is doing just fine by Hoser+McMoose · · Score: 4, Informative

      Do you remember when the "Intel Inside" logo came out?

      1991, according to Intel themselves

      There was no real competition. (it was the Pentium days) There were other processors, but the Pentium pretty much blew them away.

      The Intel Inside marketing program started two years before the Pentium came out. At that time AMD was competing very effectively with the 486. So much so that Intel wanted a new marketing campaign to try to bring people back. Even in the early Pentium days AMD continued to compete effectively. Their 5x86 120MHz chips were very competitive with the Pentium 60 and Pentium 66, and even the 75MHz Pentium chips. It wasn't really until '94 or '95 that Intel really started leaving AMD in the dust, mainly because AMD was WAY late at releasing their K5 processor and when it did come out they had so many problems manufacturing it that it was clocked much lower than initially hoped for. Cyrix continued to offer some competition for Intel during this time, but they were plagued by crappy motherboards which gave them a poor reputation (it was a bit of a self-fulfilling prophecy thing: reputation for being cheap crap meant that they were put on cheap crap motherboards which resulted in a poor quality system).

      it will be [better] because it is cheaper

      And that is somehow an invalid reason for a product to be better?

  66. stupid by ajagci · · Score: 4, Interesting

    Marking pages as executable/non-executable is old, and it's not the way to deal with buffer overflows. Many buffer overflow exploits, in fact, only modify data (like the saved PC pointer).

    The correct way of dealing with buffer overflow problems is to make them not happen in the first place. That means that all pointers need to have bounds associated with them. Unfortunately, both the C mindset and some design quirks of the C programming language make that a little harder than it should be for UNIX/Linux and C-based systems.

    The real problem is ultimately the use of C, and the real solution is not to use a new CPU or add instructions, but to use a language without C's quirks. In terms of performance, C's pointer semantics only hurt anyway.

    1. Re:stupid by SuperFrink · · Score: 2, Informative
      The real problem is ultimately the use of C, and the real solution is not to use a new CPU or add instructions, but to use a language without C's quirks.

      Is the problem the C language or is it that people write code that doesn't check it's input well enough?

      The man page for gets() (from Slackware 9.1) reads:
      Never use gets(). Because it is impossible to tell with out knowing the data in advance how many characters gets() will read, and because gets() will continue to store characters past the end of the buffer, it is extremely dangerous to use. It has been used to break computer security. Use fgets() instead.

      It's true people write buggy code. Look at PHP. I think it checks bounds on arrays (actually I think they behave like hash tables or list objects but that's beside the point.) Have you never heard of a security bug in something written in PHP?

      Is a bug that lets people run arbitrary commands on your webserver less dangerious than a bug that allows them to run arbitrary executable code? Do you keep wget, gcc and as on your webserver?

      Some languages make it eaiser to check input (eg regexes in perl) but it's still possible to let something through.
  67. Fixing Software with hardware?? by stackdump · · Score: 2, Interesting

    Doesn't it sound strange to modify hardware to correct a software deficiency? Well to me it does. Lemme tell a story ( a little off topic):

    I bought a truck. Said truck did not have original bumper. OK, first week i get a flat. No big deal just change it right?. But, without the original bumper i couldn't get to the "mr. Pickup" spare tire let down access port in the bumper, because it is apparently misaligned. Right, so Take the truck back get it fixed. Ok, next week pick up the truck, Bumper has not been re-aligned nothing on truck is modified. I pull out the tire tool to see how it is working to find out that whomever had been working on the vehicle decided it was better to modify that tool instead of really fixing the problem. They had taken the tire tool to a grinding wheel. In roughly the middle of the device they modified it from about half an inch in diameter to about a quarter. Well it does work but I must say what the hell where they thinking about (i bought it from a dealer of course)

  68. Nope. by Anonymous Coward · · Score: 2, Informative

    Buffer overflows occur because the call-tree is in the same, writable stack as the call-frames (local variables). Furthermore, languages like C make it very easy to define "buffers" that are located in the local stackframe, instead of forcibly allocating memory in the heap.

    So, the problem is that somehow (e.g. not limiting the amount of input you read into a fixed sized buffer) you overrun the end of your buffer on the local stackframe with the return address at some point just after it.

    You have to know how far an offset the return address is from the start of the overflowed buffer, and where you'd like to put the instruction pointer now. As you don't generally have anywhere else, you put the Instruction Pointer to some point on the stack where you overflowed it. Make sure your overflow includes exploit code, and enough NOPs first to allow for any call depth.

    Barricades against this technique:
    - random address for start of stack
    - non-executable stacks
    - forwards-growing stacks

  69. Is this the right solution? by multiplexo · · Score: 3, Interesting

    Years ago I went to a presentation on RISC v. CISC architectures. The presenter pointed out that RISC didn't really stand for "Reduced Instruction Set Computing" rather it stood for "Relegate the Important Stuff to Compilers". Why hasn't Microsoft released C and C++ compilers that institute bounds checking? Hell, ADA had this years ago and say what you will about the language it's a damned handy thing to have.
    This will be a good thing if it works out, but it will take years for these chips to penetrate the market to any significant degree and once again we are seeing hardware vendors come to the rescue of software companies by creating hardware that has the capability, either in speed or safety features, to compensate for bad programming tools and bad programmers.

    --
    cheap labor conservatives - they want to keep you hungry enough to be thankful for minimum wage.
  70. LISP machines had this and much more by hqm · · Score: 3, Interesting

    The LISP machines built at the MIT AI Lab had hardware which worked in parallel with the main CPU that checked things like array bounds and also did other types of tag checking, such as automatic runtime coercion of ints to floats and other things that are helpful to a high level language.

    Since every object in LISP machine memory had a type tag, many useful operations could be parallelized, such as garbage collection and type dispatch for object oriented function calls.

    The problem with languages like C is that they have no object semantics at all, so runtime bounds checking and other goodies don't work very well. The C weenies have everybody convinced that this is necessary to get the highest performance, but they don't realize that with a small amount of extra hardware, all these safety operations can be done in parallel. And since the C weenies influence the CPU designers, it is a vicious circle of bad machine architecture.

  71. Re:Partial solution by Maddog_D97 · · Score: 2, Informative

    Because it's faster and doesn't suck up a lot of memory. It wasn't until recently that John Carmack switched to writting in C++ instead of C for his new DooM ]|[ engine.

  72. Well written applications... by ^BR · · Score: 2, Informative

    ...already use mprotect() to set the execute permission on the area of memory where they generate the code... On Unix that's it...

    By the way... What is (or is there) the Windows equivalent?

    1. Re:Well written applications... by Ben+Hutchings · · Score: 2, Informative
  73. Wrong. NX is in the 2.4.x kernels, at least. by Ayanami+Rei · · Score: 3, Informative

    Read on. There is specific support for the NX flag on pages. If you boot with noexec=on, then stack/heap/data is automatically protected. If the page fault handler sees your thread because of an NX flag violation, the process is killed.
    Caveats: you can't mprotect it back to execute status, and it breaks some software, especially Mozilla/Java/Ada (just like exec-shield...)

    --
    THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
  74. Funny to by embedded_C · · Score: 2, Funny
    From the article...

    The alert was sparked by the discovery that a raft of Microsoft programs were vulnerable to a problem called "buffer overflow", which hackers can exploit to extract private information from a PC.

    ...

    The new AMD chips prevent this. They separate memory into instruction-only and data-only sections. If hackers attempt to execute code from the data section of memory, they will fail. Windows will then detect the attempt and close the application.

    So they are depending on Windows to detect the attempt and close the application? Bwahahaha! So now rather than offering Critical Updates to fix buffer overflow vulnerabilities, MS will now offer Critical Updates to fix buffer overflow exception handling vulnerabilities. Ha!

  75. SUN has done this for years by Anonymous Coward · · Score: 2, Informative

    Um folks Sun UltraSparc chips and Solaris have been doing overflow protection for years. This is nothing new. All you have to do is enable it.

  76. Once again, the reporter should read carefully... by Anonymous Coward · · Score: 3, Informative

    This "new feature" for marking pages as having a non-executeable stack is *already* part of the Athlon-64 chips. The New Scientist article was talking about how a new version of XP will begin using it soon--not that it's not yet released.

    AMD has already made Intel look bad by getting their 64-bit CPU into the mass-market first, and this feature was implemented partly to provide a facility that some other platforms (e.g. Solaris on Sparc) have had for quite some time.

  77. Heads Up, Microsofties! by rixstep · · Score: 2, Funny

    Actually this is fantastic news. Already, it doesn't matter that Microsofties are dividing by zero all over the place - it becomes an exception taken care of by the built-in structured exception handling and life goes on and the user is never the wiser.

    Now we can excerpt even more crappy code. All that's left is a realtime automaton connected to the CPU that spots Microsoft code on the way and automatically gives it a liposuction before feeding it in.

    Technology!

  78. You know what AMD Needs? by fluxrad · · Score: 2, Funny

    They need to hire the marketing firm that produced those hilarious 3dfx commercials...

    You know, the ones that started off with the soft voice, "We produced a chip that has the power to save lives, to heal across distances, to end hunger...But then we deciced: Hey, let's use it for games!"

    Granted you could be nervous about this since 3dfx went the way of the dodo, but since AMD doesn't make POS video cards that double the weight of your box...they should be safe ;-)

    /proud to be an AMD customer since the K6II

    --
    "It is seldom that liberty of any kind is lost all at once." -David Hume
    1. Re:You know what AMD Needs? by Loki_1929 · · Score: 3, Informative

      "Granted you could be nervous about this since 3dfx went the way of the dodo, but since AMD doesn't make POS video cards that double the weight of your box...they should be safe ;-)"

      3DFX's problem had nothing to do with their products. Their problem had to do with the fact that they got greedy - extremely greedy. After their first few successful graphics chips were launched, they basically shut their board makers out in the European market with the purchase of STB. They began producing their own boards, and had production capacity sufficient to supply the European market, and that's about it. Thus, other board makers were still necessary for other markets, such as the US. Having been bent over by 3DFX in the European market, board makers essentially told 3DFX to take their chips and stuff them. Thus, 3DFX was left with the choice of abandoning every market but the European (you're joking, right?), or dipping into (read: draining) their R&D budget. Noting that option 1 was suicidal, 3DFX chose the latter. Thus, production was bumped, the new Voodoo 3 graphics cards were an outstanding bunch, and virtually no R&D was accomplished for a few years. Wait; did I say they didn't do any R&D for a few years?! Yes - yes I did. Thus, the thus far sub-standard (where 3DFX was the standard) 3D graphics card/chip makers were able to catch up to, and surpass 3DFX in both performance and features. Glide, 3DFX's baby, was eclipsed by the more open, if less fully-featured, OpenGL in game support. By the time 3DFX had enough production capability to start working on new cards, the writing was on the wall. Ati, Matrox, and nVidia were already too far ahead for 3DFX to have a chance competing against. 3DFX dumped the last of their cash into creating an extraordinarily powerful, goofy as hell looking, wildly expensive set of cards, which saw almost no time whatsoever in the market before 3DFX was forced to sell all IP rights to nVidia. 3DFX, nothing more than a shell of a company with no IP, then collapsed about a month later.

      The last good card from 3DFX? The Voodoo 3 3500. Their last great card? The Voodoo 3 3000, whose overclocking ability was absolutely beyond anything anyone had ever before imagined possible. With stock cooling, one could achieve gains that would be thought of as ridiculous (percentage-wise) today. My own V3 3000, whose default memory clock speed was 166MHz, hit 220MHz with the stock cooler with no artifacts. I recall pushing it a bit higher with a rigged cooling system before finally replacing the card (it was getting OLD). 200MHz was common for the memory speed on those, and values as high as 240 - 250MHz had been reported, though often not without some artifacts. The quality of components was next to none from 3DFX. It was not their product, but their arrogance that was their undoing.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."