Difference between revisions of "Integer coercion error"

From OWASP
Jump to: navigation, search
 
(Related Vulnerabilities)
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{Template:Vulnerability}}
 +
{{Template:SecureSoftware}}
  
 +
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
{{Template:SecureSoftware}}
+
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
  
==Overview==
+
==Description==
  
 
Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.
 
Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.
  
==Consequences ==
+
'''Consequences'''
  
* Availability: Integer coercion often leads to undefined states of execution resulting in infinite loops or crashes.
+
* Availability: Integer coercion often leads to undefined states of execution resulting in infinite loops or crashes.
 +
* Access Control: In some cases, integer coercion errors can lead to exploitable buffer overflow conditions, resulting in the execution of arbitrary code.
 +
* Integrity: Integer coercion errors result in an incorrect value being stored for the variable in question.
  
* Access Control: In some cases, integer coercion errors can lead to exploitable buffer overflow conditions, resulting in the execution of arbitrary code.
+
'''Exposure period'''
  
* Integrity: Integer coercion errors result in an incorrect value being stored for the variable in question.
+
* Requirements specification: A language which throws exceptions on ambiguous data casts might be chosen.
 +
* Design: Unnecessary casts are brought about through poor design of function interaction
 +
* Implementation: Lack of knowledge on the effects of data casts is the primary cause of this flaw
  
==Exposure period ==
+
'''Platform'''
  
* Requirements specification: A language which throws exceptions on ambiguous data casts might be chosen.
+
* Language: C, C++, Assembly
 +
* Platform: All
  
* Design: Unnecessary casts are brought about through poor design of function interaction
+
'''Required resources'''
  
* Implementation: Lack of knowledge on the effects of data casts is the primary cause of this flaw
+
Any
  
==Platform ==
+
'''Severity'''
  
* Language: C, C++, Assembly
+
High
  
* Platform: All
+
'''Likelihood of exploit'''
  
==Required resources ==
+
Medium
  
Any
+
Several flaws fall under the category of integer coercion errors. For the most part, these errors in and of themselves result only in availability and data integrity issues. However, in some circumstances, they may result in other, more complicated security related flaws, such as buffer overflow conditions.
  
==Severity ==
 
  
High
 
  
==Likelihood  of exploit ==
+
==Risk Factors==
  
Medium
+
TBD
  
==Avoidance and mitigation ==
 
  
* Requirements specification: A language which throws exceptions on ambiguous data casts might be chosen.
+
==Examples==
  
* Design: Design objects and program flow such that multiple or complex casts are unnecessary
+
See the Examples section of the problem type ''Unsigned to signed conversion error'' for an example of integer coercion errors.
  
* Implementation: Ensure that any data type casting that you must used is entirely understood in order to reduce the plausibility of error in use.
 
  
==Discussion ==
+
==Related [[Attacks]]==
  
Several flaws fall under the category of integer coercion errors. For the most part, these errors in and of themselves result only in availability and data integrity issues. However, in some circumstances, they may result in other, more complicated security related flaws, such as buffer overflow conditions.
+
* [[Attack 1]]
 +
* [[Attack 2]]
  
==Examples ==
 
  
See the Examples section of the problem type ''Unsigned to signed conversion error'' for an example of integer coercion errors.
+
==Related [[Vulnerabilities]]==
  
==Related problems ==
+
* [[Signed to unsigned conversion error]]
 +
* [[Unsigned to signed conversion error]]
 +
* [[Truncation error]]
 +
* [[Sign extension error]]
  
* Signed to unsigned conversion error
+
==Related [[Controls]]==
  
* Unsigned to signed conversion error
+
* Requirements specification: A language which throws exceptions on ambiguous data casts might be chosen.
 +
* Design: Design objects and program flow such that multiple or complex casts are unnecessary
 +
* Implementation: Ensure that any data type casting that you must used is entirely understood in order to reduce the plausibility of error in use.
  
* Truncation error
 
  
* Sign-extension error
+
==Related [[Technical Impacts]]==
  
==Categories ==
+
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
  
[[Category:Vulnerability]]
 
  
[[Category:Range and Type Errors]]
+
==References==
 +
 
 +
TBD
 +
[[Category:FIXME|add links
 +
 
 +
In addition, one should classify vulnerability based on the following subcategories: Ex:<nowiki>[[Category:Error Handling Vulnerability]]</nowiki>
 +
 
 +
Availability Vulnerability
 +
 
 +
Authorization Vulnerability
 +
 
 +
Authentication Vulnerability
 +
 
 +
Concurrency Vulnerability
 +
 
 +
Configuration Vulnerability
 +
 
 +
Cryptographic Vulnerability
 +
 
 +
Encoding Vulnerability
 +
 
 +
Error Handling Vulnerability
 +
 
 +
Input Validation Vulnerability
 +
 
 +
Logging and Auditing Vulnerability
 +
 
 +
Session Management Vulnerability]]
 +
 
 +
__NOTOC__
 +
 
 +
 
 +
[[Category:OWASP ASDR Project]]
 +
[[Category:Vulnerability]]
 +
[[Category:Range and Type Error Vulnerability]]
 +
[[Category:OWASP_CLASP_Project]]

Latest revision as of 08:55, 26 February 2009

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.



Last revision (mm/dd/yy): 02/26/2009

Vulnerabilities Table of Contents

Description

Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.

Consequences

  • Availability: Integer coercion often leads to undefined states of execution resulting in infinite loops or crashes.
  • Access Control: In some cases, integer coercion errors can lead to exploitable buffer overflow conditions, resulting in the execution of arbitrary code.
  • Integrity: Integer coercion errors result in an incorrect value being stored for the variable in question.

Exposure period

  • Requirements specification: A language which throws exceptions on ambiguous data casts might be chosen.
  • Design: Unnecessary casts are brought about through poor design of function interaction
  • Implementation: Lack of knowledge on the effects of data casts is the primary cause of this flaw

Platform

  • Language: C, C++, Assembly
  • Platform: All

Required resources

Any

Severity

High

Likelihood of exploit

Medium

Several flaws fall under the category of integer coercion errors. For the most part, these errors in and of themselves result only in availability and data integrity issues. However, in some circumstances, they may result in other, more complicated security related flaws, such as buffer overflow conditions.


Risk Factors

TBD


Examples

See the Examples section of the problem type Unsigned to signed conversion error for an example of integer coercion errors.


Related Attacks


Related Vulnerabilities

Related Controls

  • Requirements specification: A language which throws exceptions on ambiguous data casts might be chosen.
  • Design: Design objects and program flow such that multiple or complex casts are unnecessary
  • Implementation: Ensure that any data type casting that you must used is entirely understood in order to reduce the plausibility of error in use.


Related Technical Impacts


References

TBD