That isn't true, most is done by the kernel, only stack protection is useless when not
enabled, so buffer overflows are still a danger, but less if the kernel makes the stack
non-executable and randomizes the address space.
And as the poster below linked to, Ubuntu seems to enable those flags too.