logoalt Hacker News

GTP • today at 1:03 PM • 4 replies • view on HN

Basically, have an explicit distinction between data and code at the architectural level, to enforce "Write xor Execute" in hardware. In this way, you would prevent e.g. a buffer overflow letting an attacker injecting shellcode that gets executed later by somehow pointing at it. AFAIK the issue would still remain with some programming languages though.


Replies

sznio • today at 1:34 PM

don't we already have the NX bit?

and it's not sufficient anyways. even with NX you could have the attacker control a function pointer you call. in any sufficiently complex program you'll have enough widgets to build anything you want just out of data.

code and data are the same thing. whatever inputs your system receives is "code" that your application interprets, just like your application is the code that the CPU interprets. turtles all the way down.

➕ show 2 replies
ihavesomeexampl • today at 2:04 PM

But.. alter data that gets executed (interpeter?), I mean, how does this work even in theory? All data is potentially code?

➕ show 1 reply
tosapple • today at 1:15 PM

and we don't believe a sterilized virtual machine creates a similar situation?

any respective machine doesn't require full Turing completeness?

any ad-hoc machine allows for mutations and flexibility, which I'm sure is an added strength.

2nd edit,

Also, didn't we have a weaker model of this with segmented non-flat memory models on i386-

AlienRobot • today at 1:57 PM

How do you turn text into code in this architecture? Through the kernel?

➕ show 1 reply