[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GCC stack smashing protection
Jukka Ruohonen wrote:
On Thu, Aug 27, 2009 at 05:55:02PM -0700, Michael Litchard wrote:
So, I've got this in my /etc/mk.conf.
And I've rebuilt 5.0.1 kernel and userland. How can i verify that the
gcc stack smashing protection is being used?
If you see SSP-related parameters being passed for the compiler during the
build process, then the protection should be in use.
foo("smashing the stack for fun and profit");
$ gcc -Wall -fstack-protector-all foo.c -o foo
$ egrep overflow /var/log/messages
$ Aug 28 06:32:38 marx foo: stack overflow detected; terminated
But I don't know if there is some generic way to test this. ATF?
nm file | grep stack_chk
Main Index |
Thread Index |