nerdexam
GIAC

GSEC · Question #305

A program has allocated 10 characters of space for user's response on a form. The application does not validate the number of characters that a user can input into the field before accepting the…

The correct answer is B. Buffet overflow. When an application fails to validate the length of user input against the allocated buffer size, it is vulnerable to a buffer overflow attack.

Cloud, Web, and Application Security

Question

A program has allocated 10 characters of space for user's response on a form. The application does not validate the number of characters that a user can input into the field before accepting the data. Which type of attack Is the application vulnerable to?

Options

  • AOn hijacking
  • BBuffet overflow
  • CCross site scripting
  • DSQL Injection

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    85% (22)
  • C
    4% (1)
  • D
    4% (1)

Why each option

When an application fails to validate the length of user input against the allocated buffer size, it is vulnerable to a buffer overflow attack.

AOn hijacking

Session hijacking involves taking over an active authenticated user session, which is unrelated to a lack of input length validation on a form field.

BBuffet overflowCorrect

A buffer overflow occurs when a program accepts more data than the memory it allocated can hold, causing excess data to overwrite adjacent memory regions. In this case, the application allocates only 10 characters but imposes no limit on input length, allowing an attacker to submit more data than the buffer can contain. This can result in application crashes, arbitrary code execution, or full system compromise.

CCross site scripting

Cross-site scripting (XSS) involves injecting malicious client-side scripts into web pages viewed by other users, not exploiting a fixed-size memory buffer.

DSQL Injection

SQL injection manipulates database queries through unsanitized input, which is a distinct attack vector unrelated to buffer size constraints.

Concept tested: Buffer overflow via missing input length validation

Source: https://owasp.org/www-community/vulnerabilities/Buffer_Overflow

Topics

#buffer overflow#input validation#application vulnerability#memory security

Community Discussion

No community discussion yet for this question.

Full GSEC Practice