News for hackers. Stuff that matters.
Re:iPadOS by Someone on Tuesday September 24, 2019 @02:04PM (#21062957)
A common attack method is to overwrite the stack or some buffer and then somehow make the CPU run the bytes written as code (https://en.wikipedia.org/wiki/Buffer_overflow#Exploitation, https://en.wikipedia.org/wiki/Buffer_overflow#Heap-based_exp...)

A common mitigation to that is “write xor execute” (https://en.wikipedia.org/wiki/W%5EX)

From that page: ”Without such protection, a program can write (as data) CPU instructions in an area of memory intended for data and then arrange to run (as executable) those instructions. This can be dangerous if the writer of the memory is malicious.”

JIT compilers are collateral damage to that mitigation; they have to write bytes to memory and then make the CPU run those bytes as code, and W^X doesn’t allow that.

Re:iPadOS by saagarjha on Tuesday September 24, 2019 @02:21PM (#21063126)
FWIW, switching memory from RW- to R-X (which is still W^X) is also not allowed unless you have certain, easier to get entitlements.