Concept Flow - Buffer overflow attacks
Program allocates buffer
Input data copied into buffer
Is input size > buffer size?
No→Safe execution
Yes
Extra data overwrites adjacent memory
Attacker controls overwritten data
Program behavior altered (e.g., execute malicious code)
This flow shows how input larger than a buffer causes extra data to overwrite memory, leading to possible attack.