"Strong" stack protection for GCC
"Strong" stack protection for GCC
Posted Feb 7, 2014 15:01 UTC (Fri) by jzbiciak (guest, #5246)In reply to: "Strong" stack protection for GCC by jtc
Parent article: "Strong" stack protection for GCC
jimparis above gave a couple excellent examples, but how about another?
void vulnerable( char *too_big )
{
char too_small[8];
// ...
strcpy( too_small, too_big );
// ...
}
On a machine whose stack grows up instead of down (Alpha was one such architecture), strcpy() could end up smashing its own return address due to a buffer overflow in its caller. A canary in vulnerable() won't help.
