Threats, Vulnerabilities, and Mitigations

A program copies 500 bytes of user input into a 64-byte buffer and overwrites adjacent memory. What vulnerability is this?

Show the answer

Correct answerB. Buffer overflow

AWhy not this: Places code into a running process's memory; here the flaw is missing bounds on input.

BWhy this is right: Data exceeding a buffer's allocated size overwrites adjacent memory.

CWhy not this: Involves a tampered software update, not a program mishandling input size.

DWhy not this: Depends on timing between a check and a use, not on oversized input.

Writing more data than a buffer can hold, so it spills into adjacent memory, is a buffer overflow. Memory injection is a different attack, in which code is placed into another running process's memory.