A buffer overflow occurs when a program writes more data to a buffer (a variable or block of memory allocated for input) than it can hold, causing it to overwrite adjacent memory. Distractors focusing on system-wide RAM or general client/application memory allocation miss the specific local variable/buffer boundary violation mechanism.