JonathanSalwan/ROPgadget

Support gadgets alignment option (x86)

ytrezq opened this issue · 2 comments

Some platforms (like Chromᴏꜱ) enforce a jump alignment of 1 or several bytes (for examples on ɴaᴄl, the target address need to be dividable by 4)

What part of the code should be modified in order to enforce this requirement (because otherwise, if I jump to a non aligned address the program will segfault directly).

@SweetVishnya why did you close this feature request ? I would add happily a patch : just need what to change in order to do so ?

Sorry, I was just cleaning up the old issues and closed it cause of its name. Gadgets alignment is the third element in tuple. You can support an alignment option. If option is defined, you can take alignment value from option instead of gadget here.

Pull requests are always welcome ;)