CAPEC Definitions

    CAPEC Definitions / CAPEC-24

    CAPEC-24: Filter Failure through Buffer Overflow

    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).

    Severity:High
    Possibility:High

    Extended Description

    No Extended Description.

    Mitigations

    Make sure that ANY failure occurring in the filtering or input validation routine is properly handled and that offending input is NOT allowed to go through. Basically make sure that the vault is closed when failure occurs.

    Pre-design: Use a language or compiler that performs automatic bounds checking.

    Pre-design through Build: Compiler-based canary mechanisms such as StackGuard, ProPolice and the Microsoft Visual Studio /GS flag. Unless this provides automatic bounds checking, it is not a complete solution.

    Operational: Use OS-level preventative functionality. Not a complete solution.

    Design: Use an abstraction library to abstract away risky APIs. Not a complete solution.

    Relationships with other CAPECs

    CAPEC-100: Overflow Buffers

    Prerequisites

    Ability to control the length of data passed to an active filter.

    Related Weaknesses

    CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

    CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer

    CWE-118: Incorrect Access of Indexable Resource ('Range Error')

    CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

    CWE-20: Improper Input Validation

    CWE-680: Integer Overflow to Buffer Overflow

    CWE-733: Compiler Optimization Removal or Modification of Security-critical Code

    CWE-697: Incorrect Comparison