VariantIncomplete
CWE-234Failure to Handle Missing Parameter
Category: other
Description
If too few arguments are sent to a function, the function will still pop the expected number of arguments from the stack. Potentially, a variable number of arguments could be exhausted in a function as well.
Common consequences· 2
- Integrity / Confidentiality / Availability / Access Control — Execute Unauthorized Code or Commands, Gain Privileges or Assume IdentityThere is the potential for arbitrary code execution with privileges of the vulnerable program if function parameter list is exhausted.
- Availability — DoS: Crash, Exit, or RestartPotentially a program could fail if it needs more arguments then are available.
Potential mitigations· 2
- [Build and Compilation]This issue can be simply combated with the use of proper build process.
- [Implementation]Forward declare all functions. This is the recommended solution. Properly forward declaration of all used functions will result in a compiler error if too few arguments are sent to a function.
References
Related by meaning· 6
Nearest entities by semantic similarity across the cs-graph corpus.