This vulnerability occurs when a function or method receives fewer arguments than it expects. The function will still attempt to process its expected number of parameters, which can lead to reading undefined, stale, or arbitrary values from the program's memory or stack, causing crashes or unexpected behavior.
At its core, this flaw is about mismatched expectations between a function's definition and its actual usage. When a caller provides insufficient arguments, the function doesn't receive the data it was designed to process. Instead, it pulls whatever values happen to be in the memory locations (like the stack) where it expected to find its parameters. These values could be remnants from previous operations, uninitialized memory, or even parts of other data structures, leading directly to instability, incorrect calculations, or security breaches. To prevent this, developers must implement robust input validation at the function's entry point. This includes explicitly checking the number of received arguments, defining safe default values for optional parameters, and using modern language features like default arguments or variadic function safeguards. For lower-level code or APIs, clear documentation and runtime assertions are critical to ensure callers and functions agree on the required contract, preventing the program from operating on garbage data.
Impact: Execute Unauthorized Code or CommandsGain Privileges or Assume Identity
There is the potential for arbitrary code execution with privileges of the vulnerable program if function parameter list is exhausted.
Impact: DoS: Crash, Exit, or Restart
Potentially a program could fail if it needs more arguments then are available.
ccHigh