How to Turn off the Non-executable Stack Option in Ubuntu

By ±iºûÁú

Hello,

I run a return-into-libc test program at other platforms and got the following conclusion. In ubuntu-like system, when compiling programs, gcc adds "-fstack-protector" parameter by default. Executing the compiled program will get "GCC: Stack Smashing Detected!!" and then the program terminated.

Solution: add " -fno-stack-protector" when compiling the source code.

Ref:

p.s. Adding "exec-shield=0" to "/boot/grub/menu.lst"(ubuntu use grub) doesn't work.


Best Regards
Chang Wei-Han