In-depth lesson · Memory corruption
Root causes
Every point the Memory corruption reports back under this heading, best-backed first, each with the reports it is seen in.
-
A change adding a NON_PACKED flag to object elements caused incorrect handling of arrays with holes during tracing.
-
A change that reduced map loads during elements kind transitions assumed the wrong elements kind.
Seen in 1 report
-
A change to treat user memory as volatile turned single dereferences into two separate dereferences of attacker-controlled fields.
-
A check-then-act race: the null check and the subsequent release were not atomic, so two threads could both pass the check.
Seen in 1 report
-
$2,000 Medium
-
-
A check-then-AddRef race: the destroyed flag is read before a reference is taken, so a concurrent final release can free the object.
-
A checked integer is multiplied by the size of a character type without re-validating the result, allowing an undersized allocation.
Seen in 1 report
-
A child document's parent pointer is not cleared when the document is destroyed, so the removal code later compares against freed memory.
Seen in 1 report
-
A clamped copy of a length is checked but the raw length is then re-read and used for the write.
Seen in 1 report
-
A class id field is used as an array index without checking for negative values.
Seen in 1 report
-
A class stubs its reference counting methods, so the object can be destroyed while another component still holds a pointer.
Seen in 1 report
-
A client driver parses a crafted packet from a malicious server without validating it.
Seen in 1 report
-
A client message of any length was copied directly into a fixed-size memory buffer.
Seen in 1 report
-
A client-supplied index is used without checking it against the array size.
-
A close-all loop calls into channel close code that can run user callbacks dropping the last reference to the connection object, so the loop keeps using freed memory.
-
A closed handle is not reset to null, so it is closed again on destruction.
Seen in 1 report
-
A cloud-provided string is copied into a fixed-size stack buffer without a length check.
Seen in 1 report
-
A collection is iterated while synchronous script can modify it.
Seen in 1 report
-
A column index derived from a file tag was used without validation against the buffer width, while only the row index was checked.
Seen in 1 report
-
A COM delegate holds the final reference to an operation on a non-IO thread, so its destructor releases non-atomic ref-counted blob items from the wrong thread.
Seen in 1 report
-
A comma search reads past the end of a line and then writes null bytes at out-of-bounds positions.
Seen in 1 report
-
A command buffer length is increased without checking that the supplied length leaves room.
-
A command parser used an unbounded string conversion into a heap buffer whose size was miscalculated.
-
A compiler analysis pass skips revisiting a single-block loop header, so fixed-point iteration stops early and type checks are removed.
Seen in 1 report
-
$55,000 High
-
-
A compiler pass resized a built-in array symbol but did not update the cached types of parent syntax tree nodes, leaving the tree type-desynchronised.
Seen in 1 report
-
A compiler-generated copy constructor copied an iterator without rebinding it to the new object.
-
A completion block captures a bare C pointer instead of a weak pointer, so the pointer dangles if the object is deleted during the animation.
Seen in 1 report
-
A completion callback could run synchronously on error and destroy the update checker object while its method was still executing.
Seen in 1 report
-
A completion structure is attached only to the last fragment, so earlier fragments pin pages without paired completion.
-
A compound backing marks a wrapped backing as supporting memory access regardless of its actual type, and an unchecked cast follows.
Seen in 1 report
-
A condition pointer is cached and dereferenced after a navigation commit step that can reentrantly erase it.
Seen in 1 report
-
$36,000 High
-
-
A configuration field length is measured and copied into a fixed stack buffer without checking that it fits.
Seen in 1 report
-
A const reference into a vector was invalidated when the vector reallocated during lazy style attribute synchronisation.
Seen in 1 report
-
A constructor takes a signed int offset but stores it as an unsigned 64-bit value, so a large size is narrowed to negative and sign-extended.
Seen in 1 report
-
A container is emptied before a check that decides whether to release a manual reference.
Seen in 1 report
-
A contract mismatch where the caller signals read failure with a negative value the library's callback does not support.
-
A conversion function's result is trusted without a range check, so an overflow bypasses an upper-bound guard.
-
A copy length was calculated by subtracting 4 from the frame length without checking the frame was at least 4 bytes, causing an integer underflow.
Seen in 1 report
-
A copy loop in the line assignment routine ran with a bad source or destination pointer.
Seen in 1 report
-
A copy loop indexes a fixed stack array with a counter that is never bounds-checked.
Seen in 1 report
-
A copy routine clears capacity fields but not count fields, and its rollback loop increments capacity instead of count, so the destructor frees aliased pointers.
Seen in 1 report
-
A copy-paste error null-checks the read framebuffer instead of the draw framebuffer, so the draw binding is not cleared before deletion.
Seen in 1 report
-
A corrupted pointer in a base log file was dereferenced without validation, allowing a fake object to be used for an arbitrary write.
Seen in 1 report
-
A count from file metadata is passed to alloca without bounds checking.
Seen in 1 report
-
A counter object was used without checking it still existed.
Seen in 1 report
-
A credential length field was copied into a fixed-size stack buffer without a bounds check.
Seen in 1 report
-
A cross-compartment wrapper to the debugger object was likely nuked while a breakpoint still held it, so a later property read through a with-scope hit an inconsistent wrapper state.
Seen in 1 report
-
A cross-thread callback attaches a persistent handle to a worker heap after termination has begun, and the handle is cleared without synchronisation.
Seen in 1 report
-
A cursor unique pointer is assigned on one thread and moved from on another with no mutex.
Seen in 1 report
-
A custom patch copied a user-controlled username into a fixed-size global with a bounded string copy that did not bound the length, overflowing into neighbouring globals.
Seen in 1 report
-
A custom snprintf returns a negative value on truncation, which is added to an unsigned length and wraps to a huge offset.