CAS-001 · Question #26
Which of the following can aid a buffer overflow attack to execute when used in the creation of applications?
The correct answer is B. Standard libraries. Certain standard C library functions such as strcpy and gets do not perform bounds checking, enabling buffer overflow conditions when applications use them without additional safeguards.
Question
Which of the following can aid a buffer overflow attack to execute when used in the creation of applications?
Options
- ASecure cookie storage
- BStandard libraries
- CState management
- DInput validation
How the community answered
(25 responses)- A8% (2)
- B80% (20)
- C8% (2)
- D4% (1)
Why each option
Certain standard C library functions such as strcpy and gets do not perform bounds checking, enabling buffer overflow conditions when applications use them without additional safeguards.
Secure cookie storage involves protecting session tokens from theft and is not related to memory management vulnerabilities that lead to buffer overflows.
Standard libraries - particularly legacy C standard library functions like strcpy(), gets(), and sprintf() - do not enforce input length limits or perform bounds checking on memory writes, so when developers use these functions in application code, attackers can supply oversized input that overwrites adjacent memory regions, enabling code execution via buffer overflow.
State management refers to tracking application state across requests and sessions, which is unrelated to the memory boundary violations that cause buffer overflows.
Input validation is a defensive measure that prevents buffer overflows by rejecting malformed input before it reaches vulnerable code, so it reduces rather than aids such attacks.
Concept tested: Unsafe standard library functions enabling buffer overflows
Source: https://owasp.org/www-community/vulnerabilities/Buffer_Overflow
Topics
Community Discussion
No community discussion yet for this question.