Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Return to abort() – Using code introspection to prevent stack-smashing.
Given any routine which ends with the very common pattern:
return foo();
call foo leave ret
call foo jmp $+2 .byte DE, AD leave ret
What's especially great is that the project guarantees this pattern for us. Now, every function has a path that looks like:
call __stack_chk_fail jmp $+2 .byte DE, AD < function frame cleanup > ret
I cleaned up the author's code, added a sane makefile, and an example exploit here: https://github.com/zachriggle/return-to-abort
(Pull Request: https://github.com/cjdelisle/return-to-abort/pull/1)
There are no comments on this comment yet.
Given any routine which ends with the very common pattern:
Which is assembled to the very common sequence: This project will instrument it to now look like: Whatever return address I hijack, I can now just point it at this valid return site, and begin my ROP stack as per normal.What's especially great is that the project guarantees this pattern for us. Now, every function has a path that looks like:
This is effectively a no-op for security.I cleaned up the author's code, added a sane makefile, and an example exploit here: https://github.com/zachriggle/return-to-abort
(Pull Request: https://github.com/cjdelisle/return-to-abort/pull/1)