CWE-130: Improper Handling of Length Parameter Inconsistency
Improper Handling of Length Parameter Inconsistency
Weakness ID: 130 (Weakness Base)
Status: Incomplete
Description
Description Summary
The software does not handle or incorrectly handles incoming
data that contains a length or size field that is inconsistent with the actual
length of the associated data.
Extended Description
If an attacker can manipulate the length parameter associated with an
input such that it is inconsistent with the actual length of the input, this
can be leveraged to cause the target application to behave in unexpected,
and possibly, malicious ways. One of the possible motives for doing so is to
pass in arbitrarily large input to the application. Another possible
motivation is the modification of application state by including invalid
data for subsequent properties of the application. Such weaknesses commonly
lead to attacks such as buffer overflows and execution of arbitrary
code.