SFP Secondary Cluster: Glitch in Computation
A category in the Common Weakness Enumeration published by The MITRE Corporation.
Summary
Categories in the Common Weakness Enumeration (CWE) group entries based on some common characteristic or attribute.
This category identifies Software Fault Patterns (SFPs) within the Glitch in Computation cluster (SFP1).
Weaknesses
The code uses an operator for assignment when the intention was to perform a comparison.
The product sets a pointer to a specific address other than NULL or 0.
The product compares classes by name, which can cause it to use the wrong class when multiple classes can have the same name.
The product divides a value by zero.
The product contains an expression that will always evaluate to false.
The product contains an expression that will always evaluate to true.
The product calls a function, procedure, or routine, but the caller specifies an argument that is the wrong data type, which may lead to resultant weaknesses.
The product calls a function, procedure, or routine, but the caller specifies too many arguments, or too few arguments, which may lead to undefined behavior and result...
The product calls a function, procedure, or routine, but the caller specifies the arguments in an incorrect order, leading to resultant weaknesses.
The product calls a function, procedure, or routine, but the caller specifies the wrong variable or reference as one of the arguments, which may lead to undefined beha...
The product calls a function, procedure, or routine with arguments that are not correctly specified, leading to always-incorrect behavior and resultant weaknesses.
When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting va...
In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.
The product contains a conditional statement with multiple logical expressions in which one of the non-leading expressions may produce side effects. This may lead to a...
The product does not correctly convert an object, resource, or structure from one type to a different type.
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the o...
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the co...
The product stores a non-serializable object as an HttpSession attribute, which can hurt reliability.
When the J2EE container attempts to write unserializable objects to disk there is no guarantee that the process will complete successfully.
The product does not initialize critical variables, which causes the execution environment to use unexpected values.
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion.
A function can return a pointer to memory that is outside of the buffer that the pointer is expected to reference.
A function returns the address of a stack variable, which will cause unintended program behavior, typically in the form of a crash.
The product uses a signed primitive and performs a cast to an unsigned primitive, which can produce an unexpected value if the value of the signed primitive can not be...
The behavior of this function is undefined unless its control parameter is set to a specific value.
The product performs an operation on a number that causes it to be sign extended when it is transformed into a larger data type. When the original number is negative, ...
The product uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value if the value of the unsigned primitive can not ...
The product accidentally uses the wrong operator, which changes the logic in security-relevant ways.
The code uses a variable that has not been initialized, leading to unpredictable or unintended results.
The product uses the wrong operator when comparing a string, such as using "==" when the .equals() method should be used instead.
Wrap around errors occur whenever a value is incremented past the maximum value for its type and therefore "wraps around" to a very small, negative, or undefined value.
Concepts
CWE identifiers in this view are associated with clusters of Software Fault Patterns (SFPs).
Common Weakness Enumeration content on this website is copyright of The MITRE Corporation unless otherwise specified. Use of the Common Weakness Enumeration and the associated references on this website are subject to the Terms of Use as specified by The MITRE Corporation.