I am reading "The Geometry of Innocent Flesh on the Bone: Return-into-libc without Function Calls (on the x86)".
The author claims that x86 code is like English written without punctuation or spaces, so that the words all run together. This means that execution can start on a different location than intended by the programmer and that there exists a sufficient set of code sequences of this type within libc to allow arbitrary computation.
From the paper the following sentence has confused me:
"On an architecture such as MIPS where all instructions are 32 bits long and 32-bit aligned there is no ambiguity about where to start or strop, and no unintended instructions of the sort that we describe."
On a 32-bit machine aren't x86 instructions also 32-bit aligned?
Does this mean that it is possible for non-binary alignment and execution? (e.g. I have bits "00001111|22223333" in memory on a 32-bit machine and I decide to execute the instruction "11112222"?
objdump -d
(orotool -d
on a Mac)? A "32bit architecture" means the general purpose registers are 32 bit wide. The width of the bus, the width of the ALU, the size of addressable memory can be different from the width of the architectural registers. 64bit ARMv8 chips like in the iPhone very often use 16bit Thumb2 instruction encoding.