> which is dangerous as it allocates W+X pages which are often used by the final stage of an exploit
Are you sure? There's no need to ever have a page that is W and X at the same time, and I would not expect any current professional JIT to make one.
Are you sure? There's no need to ever have a page that is W and X at the same time, and I would not expect any current professional JIT to make one.
W^X is more difficult to exploit for sure, but as other commenters point out, unfortunately still possible.
I believe the JIT runs in its own process too.
https://developer.apple.com/documentation/apple-silicon/port...
https://armv8-ref.codingbelief.com/en/chapter_d4/d44_1_memor...
Maybe there are situations where switching permissions is too expensive in an unavoidable way but that borders on chip design problem...
This isn't a 100% mitigation, but it does make it harder to exploit.
JavaScript JIT been source of so many RCE vulnerabilities.