a stack buffer overflow can be caused deliberately as part of an attack known as stack smashing. if the affected program is running with special privileges, or accepts data from untrusted network hosts (e.g. a webserver) then the bug is a potential security vulnerability. if the stack buffer is filled with data supplied from an untrusted user then that user can corrupt the stack in such a way as to inject executable code into the running program and take control of the process. this is one of the oldest and more reliable methods for attackers to gain unauthorized access to a computer.