Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is not that strict. Many years ago machine code was directly loaded into memory and wherever the cpus program counter was, that's what it'd execute.

These days, a page of memory can be set to

Read Write Execute

The exploit mitigation you refer to is having the program typically set pages of memory to never have both write and execute set at the same time.

However, this is ultimately controlled by the program. On Linux, the program can invoke the os call 'mprotect' to change the permissions on a page (though a program can also voluntarily use seccmp routines to forego ever invoking this ever again)

And this is basically what browsers do. They compile the code into memory that has been set to 'write' (but not execute) and proceed to then set it to execute (but not write).

The effectiveness of this mitigation is mitigated by the existence of ROP techniques, which is why Intel started introducing Control-flow Enhancemnent Technology (CET), which is intended to ensure you can only branch to certain locations in memory.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: