479
Terminology
"Integer overflow" is sometimes used to cover several types of errors, including signedness
errors, or buffer overflows that involve manipulation of integer data types instead of characters.
Part of the confusion results from the fact that 0xffffffff is -1 in a signed context. Other confusion
also arises because of the role that integer overflows have in chains.
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
PLOVER Integer overflow (wrap or wraparound)
7 Pernicious Kingdoms Integer Overflow
CLASP Integer overflow
CERT C Secure Coding INT18-C CWE More
Abstract
Evaluate integer expressions in a larger
size before comparing or assigning to
that size
CERT C Secure Coding INT30-C CWE More
Abstract
Ensure that unsigned integer
operations do not wrap
CERT C Secure Coding INT32-C Imprecise Ensure that operations on signed
integers do not result in overflow
CERT C Secure Coding INT35-C Evaluate integer expressions in a larger
size before comparing or assigning to
that size
CERT C Secure Coding MEM07-
C
CWE More
Abstract
Ensure that the arguments to calloc(),
when multiplied, do not wrap
CERT C Secure Coding MEM35-
C
Allocate sufficient memory for an object
WASC 3 Integer Overflows
Software Fault Patterns SFP1 Glitch in computation
ISA/IEC 62443 Part 3-3 Req SR 3.5
ISA/IEC 62443 Part 3-3 Req SR 7.2
ISA/IEC 62443 Part 4-1 Req SR-2
ISA/IEC 62443 Part 4-1 Req SI-2
ISA/IEC 62443 Part 4-1 Req SVV-1
ISA/IEC 62443 Part 4-1 Req SVV-3
ISA/IEC 62443 Part 4-2 Req CR 3.5
ISA/IEC 62443 Part 4-2 Req CR 7.2
Related Attack Patterns
CAPEC-ID Attack Pattern Name
92 Forced Integer Overflow
References
[REF-145]Yves Younan. "An overview of common programming security vulnerabilities and
possible solutions". Student thesis section 5.4.3. 2003 August. < http://fort-knox.org/thesis.pdf >.
[REF-146]blexim. "Basic Integer Overflows". Phrack - Issue 60, Chapter 10. < http://
www.phrack.org/issues.html?issue=60&id=10#article >.
[REF-7]Michael Howard and David LeBlanc. "Writing Secure Code". 2nd Edition. 2002
December 4. Microsoft Press. < https://www.microsoftpressstore.com/store/writing-securecode-
9780735617223 >.
[REF-44]Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security".
McGraw-Hill. 2010.
[REF-106]David LeBlanc and Niels Dekker. "SafeInt". < http://safeint.codeplex.com/ >.
CWE Version 4.14
CWE-191: Integer Underflow (Wrap or Wraparound)
CWE-191: Integer Underflow (Wrap or Wraparound)