BF Type Computation (TCM) Bugs Class
Irena Bojanova, Primary Investigator and Lead, Bugs Framework (BF)

Definition

Type Computation (TCM) class – An arithmetic expression (over numbers, strings, or pointers) is calculated improperly, or a boolean condition is evaluated improperly.

Taxonomy

OperationsDefinition
CalculateCalculate operation – Find the result of a numeric, pointer, or string operation.
EvaluateEvaluate operation – Find the result of a Boolean condition (incl. comparison).
OperandsDefinition
NameName operand – The declared identifier for an entity.
DataData operand – The data value of an object – stored in object's memory.
TypeType operand – The data type of an object – the set of allowed values (e.g., char is within [-128, 127]) and the operations allowed over them (e.g., +, *, mod).
CausesDefinition
Code BugCode Bug Type – A code operation defect – proper operands over an improper operation. A first cause for the chain of weaknesses underlying a software security vulnerability. Must be fixed to resolve the vulnerability.
   Wrong Code
   Erroneous Code
Name FaultName Fault/Error Type – The resolved name is wrong.
   Wrong Object ResolvedWrong Object Resolved fault/error – zzzxxx Object is resolved from wrong scope.
   Wrong Function ResolvedWrong Function Resolved fault/error – Function is resolved from wrong scope.
   Wrong Generic Function BoundWrong Generic Function Bound fault/error – Code for a wrong data type is bound due to wrong generic type arguments.
   Wrong Overridden Function BoundWrong Overridden Function Bound fault/error – Code from wrong subtype is bound due to a wrong invoking subtype object.
   Wrong Overloaded Function BoundWrong Overloaded Function Bound fault/error – Wrong overloaded implementation is bound due to wrong function arguments.
Data FaultData Fault/Error Type – The object data has harmed semantics or inconsistent or wrong value
   Wrong ArgumentWrong Argument fault/error – Inaccurate input data value, i.e., non-verified for harmed semantics.
   Reference vs. ObjectReference vs. Object fault/error – Object's address instead of object's data value.
Type FaultType Fault/Error Type – The the set or range of allowed values is wrong or the operations allowed on them are wrong.
   Wrong TypeWrong Type fault/error – A data type range or structure is not correct.
   Wrong Object Type ResolvedWrong Object Type Resolved fault/error – An object is resolved from a wrong scope, so its data type might be wrong (e.g. a parent vs a child data type).
ConsequencesDefinition
Data ErrorData Fault/Error Type – The object data has harmed semantics or inconsistent or wrong value
   Wrong ResultWrong Result fault/error – Incorrect value – from type conversion or computation.
   Under RangeUnder Range fault/error – Data value is smaller than type's lower range.
   Over RangeOver Range fault/error – Data value is larger than type's upper range.
   Flipped SignFlipped Sign fault/error – Sign bit is overwritten from type related calculation.
   Wrap AroundWrap Around fault/error – A moved around-the-clock value over its data type upper or lower range, as it exceeds that range. (Integer Over-/Under-flow is a wrapped-around the upper/lower range integer value; may become very small/large and change to the opposite sign.
Type Compute Final ErrorType Compute exploitable error type – An exploitable or undefined system behavior caused by 'arithmetic' type computation bugs.
   UndefinedUndefined exploitable error – The Type System cannon represent the calculated result (e.g. division by 0).
Operations AttributesDefinition
MechanismMechanism operation attribute type – Shows how the buggy/faulty operation code is performed.
   FunctionFunction operation attribute – An organized block of code that when called takes in data, processes it, and produces a result(s).
   OperatorOperator operation attribute – A function with a symbolic name that implements a mathematical, relational or logical operation.
   MethodMethod operation attribute – A member function of an OOP class.
   Lambda ExpressionLambda Expression operation attribute – An anonymous function, implemented within another function.
   ProcedureProcedure operation attribute – A function with a void return type.
Source CodeSource Code operation attribute type – Shows where the buggy/faulty operation code is in the program – in what kind of software.
   CodebaseCodebase operation attribute – The operation is in the programmer's code - in the application itself.
   Third-PartyThird-Party operation attribute – The operation is in a third-party software.
   Standard LibraryStandard Library operation attribute – The operation is in the standard library for a particular programming language.
   Compiler/InterpreterCompiler/Interpreter operation attribute – The operation is in the language processor that allows execution or creates executables (compiler, assembler, interpreter).
Execution SpaceExecution Space operation attribute type – Shows where the buggy/faulty operation code is running or with what privilege level.
   LocalLocal operation attribute – The bugged code runs in an environment with access control policy with limited (local user) permission.
   AdminAdmin operation attribute – The bugged code runs in an environment with access control policy with unlimited (admin user) permission.
   Bare-MetalBare-Metal operation attribute – The bugged code runs in an environment without privilege control. Usually, the program is the only software running and has total access to the hardware.
Operands AttributesDefinition
         Name StateName State operand attribute type – Shows at what stage the entity name is.
            ResolvedResolved operand attribute – The name scope is known to the Type System.
            BoundBound operand attribute – The name is linked to a declared (or inferred) data type, a defined object's data, or a called function implementation.
         Data KindData Kind operand attribute type – Shows what the data value is.
            NumericNumeric operand attribute – A number – a sequence of digits.
            TextText operand attribute – A string – a sequence of symbols.
            PointerPointer operand attribute – A holder of the memory address of an object.
            BooleanBoolean operand attribute – A truth/falcity value – true or false; 1 or 0.
         Type KindType Kind operand attribute type – Shows what the data type composition is.
            PrimitivePrimitive operand attribute – A scalar data type that mimics the hardware units - e.g., int (long, short, signed), float, double, string, Boolean. A primitive data type is only language defined and is not built from other data types.
            StructureStructure operand attribute – A composite data type - e.g., array, list, map, class. A structured data type is built from other data types and has primitive or structured members.