Closed XVilka closed 5 years ago
Oh, thank you. I will check that.
I've found to problem. The image base calculation is wrong, at least for vmlinux. I need to think about how to solve it. For normal ELF files it works to calculate the vaddr - fileoffset. But this does not work here.
Here the calculations with the executable segments: 0xffffffff81000000 - 0x0000000000200000 = 0xffffffff80e00000 0xffffffff826db000 - 0x0000000001adb000 = 0xffffffff80c00000
The gadget is found in the last segment, but ropper use 0xffffffff80e00000 as the imagebase and adds this to the offset of the gadget. Therefore, there is the difference of 0x200000.
I pushed a fix. It should work now.
I will close this issue.
Ropper returns invalid addresses for the gadget, compared to IDA and qemu. See the result of qemu + gdb: And in IDA Pro: While ropper returns this address:
See the 0x200000 address difference. Also see that LOAD0 segment starts from 0x200000 as well,
vmlinux.zip