681
References
[REF-962]Object Management Group (OMG). "Automated Source Code Security Measure
(ASCSM)". 2016 January. < http://www.omg.org/spec/ASCSM/1.0/ >.
CWE-682: Incorrect Calculation
Weakness ID : 682
Structure : Simple
Abstraction : Pillar
Description
The product performs a calculation that generates incorrect or unintended results that are later
used in security-critical decisions or resource management.
Extended Description
When product performs a security-critical calculation incorrectly, it might lead to incorrect resource
allocations, incorrect privilege assignments, or failed comparisons among other things. Many of the
direct results of an incorrect calculation can lead to even larger problems such as failed protection
mechanisms or even arbitrary code execution.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
MemberOf 1000 Research Concepts 2575
ParentOf 128 Wrap-around Error 339
ParentOf 131 Incorrect Calculation of Buffer Size 355
ParentOf 135 Incorrect Calculation of Multi-Byte String Length 370
ParentOf 190 Integer Overflow or Wraparound 472
ParentOf 191 Integer Underflow (Wrap or Wraparound) 480
ParentOf 193 Off-by-one Error 486
ParentOf 369 Divide By Zero 913
ParentOf 468 Incorrect Pointer Scaling 1114
ParentOf 469 Use of Pointer Subtraction to Determine Size 1115
ParentOf 1335 Incorrect Bitwise Shift of Integer 2235
ParentOf 1339 Insufficient Precision or Accuracy of a Real Number 2242
CanFollow 681 Incorrect Conversion between Numeric Types 1495
CanFollow 839 Numeric Range Comparison Without Minimum Check 1767
CanPrecede 170 Improper Null Termination 428
Relevant to the view "Weaknesses for Simplified Mapping of Published
Vulnerabilities" (CWE-1003)
Nature Type ID Name Page
ParentOf 131 Incorrect Calculation of Buffer Size 355
ParentOf 190 Integer Overflow or Wraparound 472
CWE Version 4.14
CWE-682: Incorrect Calculation
CWE-682: Incorrect Calculation