Describe a buffer overflow attack and its consequences.
In a buffer overflow attack, an attacker sends more data than a buffer can handle, often causing the system to crash or allowing the execution of malicious code. Proper bounds checking and input validation in software development can prevent such attacks.