BF Memory Use (MUS) Bugs Class
Irena Bojanova, Primary Investigator and Lead, Bugs Framework (BF)

Definition

Memory Use (MUS) class – An object is initialized, read, written, or cleared improperly.

Taxonomy

OperationsDefinition
Initialize ObjectInitialize Object operation – Change the undefined data value of an object to a meaningful one – e.g., after an object is allocated.
DereferenceDereference operation – Access object for reading or for writing, which are relevant to the operations Initialize Object, Read, Write, and Clear.
ReadRead operation – Use the value of an object's data.
WriteWrite operation – Change the data value of an object to another meaningful value.
ClearClear operation – Change the meaningful value of an object to a non-meaningful one (e.g. via zeroization) – e.g. before object deallocation.
OperandsDefinition
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).
AddressAddress operand attribute – The memory address for an object. It is data of another object, the object's pointer, used to reference and traverse the object.
SizeSize operand – The memory size of an object – the number of bytes allocated for an object in memory. Its value is contained by (is data of) of another object.
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.
   Missing Code
   Erroneous Code
Data FaultData Fault/Error Type – The object data has harmed semantics or inconsistent or wrong value
   Forbidden AddressForbidden Address fault/error – The pointer holds an OS protected address (includs the zero address -- a NULL pointer) or non-existing address.
   Wrong SizeWrong Size fault/error – The value used as size does not match the actual size of the object (e.g., to restrict pointer repositioning or index increment/decrement in a repetition statement).
Type FaultType Fault/Error Type – The the set or range of allowed values is wrong or the operations allowed on them are wrong.
   Casted PointerCasted Pointer fault/error – The pointer does not match the type of the object due to wrong type casting.
Address FaultAddress Fault/Error Type – The object address in use is wrong.
   NULL Pointer
   Wild PointerWild Pointer fault/error – Holds an arbitrary address, because it has not been initialized or an erroneous allocation routine is used.
   Dangling PointerDangling Pointer fault/error – Still holds the address of its successfully deallocated object (e.g., pointer to a freed heap object or with a returned by a function stack object address).
   Untrusted PointerUntrusted Pointer fault/error – The pointer is modified to an improperly checked address.
   Over Bounds PointerOver Bounds Pointer fault/error – Holds an address above the upper boundary of its object.
   Under Bounds PointerUnder Bounds Pointer fault/error – Holds an address below the lower boundary of its object.
   Wrong Position PointerWrong Position Pointer fault/error – Holds the address of a miscalculated position inside its object bounds.
Size FaultSize Fault/Error Type – The object size in use is wrong.
   Not Enough MemoryNot Enough Memory fault/error – The allocated memory is too little for the data it should store.
ConsequencesDefinition
Data ErrorData Fault/Error Type – The object data has harmed semantics or inconsistent or wrong value
   Uninitialized Object
Memory Corruption/Disclosure Final ErrorMemory Corruption/Disclosure exploitable error type – An exploitable or undefined system behavior caused by memory addressing, allocation, use, and deallocation bugs.
   Not Cleared ObjectNot Cleared Object exploitable error – An object's data value is not changed to a non-meaningful one before deallocation.
   NULL Pointer DereferenceNULL Pointer Dereference exploitable error – An attempt to access an object for reading or writing via a NULL pointer.
   Untrusted Pointer DereferenceUntrusted Pointer Dereference exploitable error – An attempt to access an object via an altered pointer (not legitimate dereference of a tainted pointer).
   Object CorruptionObject Corruption exploitable error – An object's data value is unintentionally altered.
   Type ConfusionType Confusion exploitable error – An object and its pointer have different types.
   Use After DeallocateUse After Deallocate (Use After Free/Return) exploitable error – An attempt to use (dereference, read, write, or clear) a deallocated object (e.g., a freed heap object -- Use After Free) or out of scope object (e.g., returned by a function address of a stack object -- Use After Return).
   Buffer OverflowBuffer Overflow exploitable error – Writing above the upper bound of an object – aka Buffer Over-Write.
   Buffer UnderflowBuffer Underflow exploitable error – Writing below the lower bound of an object – aka Buffer Under-Write.
   Buffer Over-ReadBuffer Over-Read exploitable error – Reading above the upper bound of an object.
   Buffer Under-ReadBuffer Under-Read exploitable error – Reading below the lower bound of an object.
   Uninitialized Pointer DereferenceUninitialized Pointer Dereference exploitable error – An attempt to access an object for reading or writing via an uninitialized pointer.
Operations AttributesDefinition
MechanismMechanism operation attribute type – Shows how the buggy/faulty operation code is performed.
   DirectDirect operation attribute – The operation is performed on a particular object element.
   SequentialSequential operation attribute – The operation is performed after iterating over the object elements.
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.
   UserlandUserland operation attribute – The bugged code runs in an environment with privilege levels, but in unprivileged mode (e.g., ring 3 in x86 architecture).
   KernelKernel operation attribute – The bugged code runs in an environment with privilege levels with access privileged instructions (e.g., ring 0 in x86 architecture).
   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
         Address KindAddress Kind operand attribute type - Shows what the accessed outside object's bounds memory is.
            HugeHuge operand attribute - More than 1 KB of memory.
            ModerateModerate operand attribute - Several bytes, but less than 1 KB, of memory.
            LittleLittle operand attribute - A few bytes of memory.
         Address StateAddress State operand attribute type - State operand attribute type – Shows where the address is in the memory layout.
            StackStack operand attribute – The object is a non-static local variable (defined in a function, a passed parameter, or a function return address).
            HeapHeap operand attribute – The object is a dynamically allocated data structure (e.g., via malloc() and new).
            /other//other/ – Other kinds of memory layout (e.g. Uninitialized Data Segment, Data Segment, and Code Segment could be used for C).
         Size KindSize Kind operand attribute type – Shows what the limit for traversal of the object is.
            ActualActual operand attribute – The real size of an object.
            UsedUsed operand attribute – A supplied size for an object.