Live data from Hacker News

Retguard: An improved stack protector for OpenBSD

marc.info

1–10 of 73 posts

Re: Retguard: An improved stack protector for OpenBSD

#3
post #2

How is this different than any other stack canary? Is it because it is per-function instead of per-stack like Linux?

This uses OpenBSD's random-data memory [0][1] feature, which was used by the stack protector to provide per shared object cookies.

RETGUARD is more than just an improved stack protector, as explained in the commit message it protects function epilogues that are close to return instructions.

[0] https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib...

[1] https://www.openbsd.org/innovations.html

Re: Retguard: An improved stack protector for OpenBSD

#5
post #2

How is this different than any other stack canary? Is it because it is per-function instead of per-stack like Linux?

First off, the normal glibc/GCC stack canary is per-process, not per-stack.

(I started writing a more detailed reply based on the commit description, but there was too much speculation without seeing their source code).

Re: Retguard: An improved stack protector for OpenBSD

#7
post #2

How is this different than any other stack canary? Is it because it is per-function instead of per-stack like Linux?

First off, the normal glibc/GCC stack canary is per-process, not per-stack. (I started writing a more detailed reply based on the commit description, but there was too much speculation without seeing their source code).

OpenBSD's is per shared library, i.e: libc has a different stack cookie than your application and/or other libraries.

RETGUARD however, is per function.

Re: Retguard: An improved stack protector for OpenBSD

#10
Anyone seen this new ReturnProtectorPass also upstream at clang? It was written end of 2017 AFAIR, that when when we last discussed this here.

CFI still looks more promising to me though. Protecting the CALL part. But this is better than the old gcc/clang stack cookie of course, protecting RET.

Post reply on HN