Reachable Assertion |
Weakness ID: 617 (Weakness Variant) | Status: Draft |
Description Summary
Extended Description
For example, if a server handles multiple simultaneous connections, and an assert() occurs in one single connection that causes all other connections to be dropped, this is a reachable assertion that leads to a denial of service.
Example 1
In the excerpt below, an AssertionError (an unchecked exception) is thrown if the user hasn't entered an email address in an HTML form.
Reference | Description |
---|---|
CVE-2006-6767 | |
CVE-2006-6811 | |
CVE-2006-5779 | |
CVE-2006-4574 | |
CVE-2006-4095 | |
CVE-2006-4574 | Chain: security monitoring product has an off-by-one error that leads to unexpected length values, triggering an assertion. |
Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources) |
Perform input validation on user data. |
While assertion is good for catching logic errors and reducing the chances of reaching more serious vulnerability conditions, it can still lead to a denial of service if the relevant code can be triggered by an attacker, and if the scope of the assert() extends beyond the attacker's own session. |
Ordinality | Description |
---|---|
Resultant | (where the weakness is typically related to the presence of some other weaknesses) |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 398 | Indicator of Poor Code Quality | Development Concepts (primary)699 |
ChildOf | ![]() | 670 | Always-Incorrect Control Flow Implementation | Research Concepts (primary)1000 |
CanFollow | ![]() | 193 | Off-by-one Error | Research Concepts1000 |
Modifications | ||||
---|---|---|---|---|
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Sean Eidemiller | Cigital | External | |
added/updated demonstrative examples | ||||
2008-07-01 | Eric Dalci | Cigital | External | |
updated Potential Mitigations, Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Description, Relationships, Observed Example, Other Notes, Weakness Ordinalities |