wrong statement on chapter 5?

naruto canada narutocanada at gmail.com
Thu Nov 15 07:36:00 PST 2007


hi

the cocoon page has made a wrong statement or given wrong examples?

gcc -o strcat-overflow strcat-overflow.c -U_FORTIFY_SOURCE
./strcat-overflow 2345678
./strcat-overflow 23456789
./strcat-overflow 234567890

gcc -o strcat-overflow strcat-overflow.c -fno-stack-protector
./strcat-overflow 2345678
./strcat-overflow 23456789
./strcat-overflow 234567890

gcc -o strcat-overflow strcat-overflow.c
./strcat-overflow 2345678
./strcat-overflow 23456789
./strcat-overflow 234567890

the page states that there shouldn't be any seg faults, maybe that was wrong?
shouldn't this flag "-fno-stack-protector" disable stack guard and
actually cause a seg fault?

I'm reading "http://www.linuxfromscratch.org/hlfs/view/unstable/uclibc-2.6/chapter05/cocoon-toolchain.html"
Hardened Linux From Scratch - Version SVN-20071022
Chapter 5. Constructing a Temporary System
5.10. Cocoon Toolchain



More information about the hlfs-dev mailing list