CompTIA CySA+ (CS0-002) — Question 185

While observing several host machines, a security analyst notices a program is overwriting data to a buffer. Which of the following controls will best mitigate this issue?

Answer options

Correct answer: A

Explanation

Data execution prevention (DEP) is designed to prevent code from being executed in certain areas of memory, thus mitigating buffer overflow attacks. The other options, such as output encoding, prepared statements, and parameterized queries, are more related to protecting against SQL injection and web application vulnerabilities rather than addressing buffer overflow issues.