2.11 Elf Binary Mangling Pt. 4: Limit Break
@eZine
Published in
tmp0ut
· 2 years ago
... 0.lol/ebm/2.html [3] https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/mman-common.h#L12 2. Read No Longer Implies Exec Behind the scenes, the segment permissions set by the program headers DO rely on the permissions flags [1] defined by the ELF spec. Here, the bit flags for READ and WRITE are swapped from the kernel mmap flags: PF_X 1 00000001 Execute PF_W 2 00000010 Write PF_R 4 00000100 Read p_flags 1Ch 00011100 └── PF_R is set In the 0x1C overlay ELFs, the only p_flags set was PF_R, which maps the segment as read only. This worked because of a backward compatibility feature in ...