Re: CPU that will not execute data?

From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 09/21/05

  • Next message: Volker Birk: "Re: CPU that will not execute data?"
    Date: 21 Sep 2005 12:33:12 GMT
    
    

    "peter" <nospam@nospam.com> writes:

    >I remember once reading about new processor design to prevent the CPU from
    >executing data, thereby eliminating arbitrary code execution in
    >buffer-overrun attacks.

    That's not a "new" processor design, it's pretty much "old hat".

    Each piece of memory in a system carries with it certain access
    bits. For your main stream "two-level" OS, these access rights are:
    read, write, execute, user; but not all combinations are possible
    in all hardware. The "user" access denotes the ability for ordinary
    programs (i.e., not the operating system proper) to access a certain
    piece of memory. The smallest useful set of memory controls is a
    "write" (read/execute is always allowed) and "user" bit.

    A "piece of memory" can be a page or larger (in the 32 bit Intel
    architecture, segments also carry protection information)

    All main stream CPUs support this in one form or another, but
    the IA32 family only supported this on a per-segment basis which makes
    it difficult to make use of in practice.

    But that changed recently is that AMD and later Intel added per page
    execute permission to their memory management so that it is now
    easier for OSes on IA32/AMD64 CPUs to run with less memory executable.

    Note that this offers only fairly limited protection as often writable
    executable areas remain and that exploits can often take advantage
    of the executable code already present.

    >I haven't heard this idea mentioned for a while. What happens to it? Can
    >this idea be retrofitted to existing CPUs?

    It cannot be retrofitted to existing CPUs; it can be retrofitted to
    existing CPU architectures, as show by AMD's addition of the "NX"
    protection.

    Casper

    -- 
    Expressed in this posting are my opinions.  They are in no way related
    to opinions held by my employer, Sun Microsystems.
    Statements on Sun products included here are not gospel and may
    be fiction rather than truth.
    

  • Next message: Volker Birk: "Re: CPU that will not execute data?"