4 ms·
If you link against libc, that’s the only place you can enter the kernel from. If you statically link that is relaxed to “system calls can come from anywhere on
by saagarjha 7y ago
If you link against libc, that’s the only place you can enter the kernel from. If you statically link that is relaxed to “system calls can come from anywhere on your code”. The former has stronger protections, obviously, but as far as I can tell you still have protection from “wild shellcode in a RWX region can make syscalls”.
- throwaway2048 7y agoShould be noted, that by default on OpenBSD, an RWX page is impossible, mprotect() will fail and the process will get killed trying.
- saagarjha 7y agoSurely there is an “out” for JITs that have not yet adopted W^X?
- tedunangst 7y agoAn opt in actually, to request looser checks.
- lostmsu 7y agoCan't you make page temporarily RW, JIT, then switch back to RX?
- saagarjha 7y agoYou can, but the application needs to support this.