BF Type Conversion (TCV) Bugs Class
Irena Bojanova, Primary Investigator and Lead, Bugs Framework (BF)

Definition

Type Conversion (TCV) class – Data are converted or coerced into other type improperly.

Taxonomy

OperationsDefinition
CastCast operation – Explicitly convert the value of an object to another data type.
CoerceCoerce operation – Implicitly (forced by the Type System) convert the value of a passed in/out argument or the return into the corresponding parameter or return data type. (Type Coercion is known also as Type Juggling.)
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
   Missing 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.
   Missing Overloaded FunctionMissing Overloaded Function fault/error – Code for particular function parameters' data types is absent.
Data FaultData Fault/Error Type – The object data has harmed semantics or inconsistent or wrong value
   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.
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).
   Mismatched ArgumentMismatched Argument fault/error – An argument is not of the parameter data type.
ConsequencesDefinition
Type ErrorType 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.
Data ErrorData Fault/Error Type – The object data has harmed semantics or inconsistent or wrong value
   Wrong ValueWrong Value fault/error – The value of the data is not accurate (e.g., outside of a range).
   Flipped SignFlipped Sign fault/error – Sign bit is overwritten from type related calculation.
   Truncated ValueTruncated Value fault/error – Rightmost bits of value that won’t fit type size are cut off.
   Distorted ValueDistorted Value fault/error – Incorrect value (although fits type size) due to sign flip or signed/unsigned and vice versa cast.
   Rounded ValueRounded Value fault/error – Real number value precision loss.
Operations AttributesDefinition
MechanismMechanism operation attribute type – Shows how the buggy/faulty operation code is performed.
   Pass InPass In operation attribute – Supplying "in" arguments' data values to a function/ operator.
   Pass OutPass Out operation attribute – Supplying "out" or "in/out" arguments' data values or a return value to a function/ operator.
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.