Re:Return to abort() – Using code introspection to prevent s...
by Ded7xSEoPKYNsDd on Tuesday July 11, 2017 @04:44PM
(#14747877)
The problem with per-function cookies are dynamic calls. The only feasible options I can think of is are either a) a secondary cookie that is allowed from all functions or b) a shadow stack with the cookies.
Re:Return to abort() – Using code introspection to prevent s...
by nullc on Tuesday July 11, 2017 @03:36AM
(#14742254)
that hash approach would let you replace one varargs function with a similar one... :(
though at least being forced to return to the start of a function instead of somewhere randomly in the middle seems pretty powerful to me.
Another approach is to take a hash of the types of the args and the return value (pointers obviously being opaque). This way we know the cookie value for any given function at compile time and we can stay out of the linker. However, in this case function a(int, char) can return to the call sight of function b(int, char) because to the code they're identical.