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.
-
The pending-show completion attached a child unconditionally without checking it was already attached, and the child array allowed duplicates.
Seen in 1 report
-
The per-isolate singleton wait node is not protected against re-entrant Atomics.wait calls.
Seen in 1 report
-
The physical_lsn field was not validated, giving an incorrect size calculation and a heap overflow during a memmove.
Seen in 1 report
-
The plaintext size calculation underestimated the required buffer because it did not account for the ciphertext length.
Seen in 1 report
-
$2,000 High
-
-
The plane-ordering check used raw 32-bit addition instead of checked arithmetic and never verified that plane offsets were non-negative.
Seen in 1 report
-
The player object's decoder pointer is not cleared during initialisation, and the pcm16 code path reads it instead of allocating a decoder.
Seen in 1 report
-
The pointer decrement after the accumulation macro runs even when the macro skipped writing because the buffer was full.
-
The pointer to a freed object was not nulled, so later checks were bypassed and the object was reused.
Seen in 1 report
-
The polyfill interpolant location is allocated per shader stage by scanning only that stage's own locations, with no shared inter-stage allocation.
Seen in 1 report
-
The posted task did not re-check the active flag before re-registering the module, and the destructor returned early and skipped deregistration.
Seen in 1 report
-
The pre-finalizer destroys the audio source without taking the consumer lock, so the audio thread keeps writing through stale spans.
Seen in 1 report
-
The precision reduction loop only checks values greater than or equal to ten, so negative values skip it and the buffer is undersized.
Seen in 1 report
-
The predictor assumes at least four bytes are available in the last row, but the row can be three bytes.
Seen in 1 report
-
The preparse step does not include the formula record when calculating the maximum row and column, so the column value is later used as an array index without bounds checking.
Seen in 1 report
-
The pretty-printer triggers a style flush that tears down and frees the presentation shell it still holds a reference to, then dereferences it.
Seen in 1 report
-
The print API mishandled crafted parameters, so a memory region was freed and then accessed again.
-
The priority calculation does not check that its result is finite, so an overflow produces NaN that breaks the strict weak ordering used by the sort.
Seen in 1 report
-
The private-key blob path skips the null-termination step that the certificate and CA blob paths perform, so a pointer-plus-length blob reaches an API expecting a terminated string.
-
The process watcher destructor does not wait for its background thread-pool task, so a raw pointer is used after the session object is freed.
Seen in 1 report
-
The ProcXIQueryPointer function does not validate a client-supplied array index before using it to access memory.
-
The product of an attacker-controlled element size and a count parsed with atoi is not checked for overflow before being used in malloc.
-
The product of FAT sector count and sector size is computed in 32 bits and overflows, giving an undersized allocation.
-
The product of palette entry and palette counts is multiplied by four without an integer overflow check, so a small allocation is followed by a larger write.
Seen in 1 report
-
The product of two file-supplied values is used as an allocation size without an overflow check before decompression writes into the buffer.
Seen in 1 report
-
The product of width, height and bit depth is computed without overflow checking, so a large bit depth gives a small allocation used as a stride.
Seen in 1 report
-
The program copies a user-controlled length from the Modbus message into a fixed-size stack buffer without validating that the length is within bounds.
-
The program lets a pointer be taken to the return address on the stack and modified because it does not prevent such access.
Seen in 1 report
-
The promise is resolved before the request object is used for metrics, so a user callback can free it in between.
Seen in 1 report
-
The promise was resolved synchronously during layout instead of being deferred to a post-traversal task, so the thenable check ran attacker JavaScript while layout held style references.
Seen in 1 report
-
The protocol dispatch path lacked a session-pinning scope and the agent stored the inspector session as a bare pointer without clearing it on detach.
Seen in 1 report
-
The protocol handler does not validate the destination address in the receive-data command.
Seen in 1 report
-
The prototype validity cell is set to a sentinel when the prototype is not a plain object, so later map changes do not invalidate the inline cache.
Seen in 1 report
-
$50,000 High
-
-
The proxy stores a raw pointer to the shadow root that is not invalidated on collection, and adopters hold raw pointers without keeping the object alive.
Seen in 1 report
-
The PUBACK handler trusts a length or field from the incoming packet without checking it against the destination buffer size.
-
The public header handle stores a raw pointer to an internal list node that is freed on the next request, with no invalidation or generation check.
-
The pushed URL was validated only after the parent handle and its MIME tree were duplicated, so a rejected push freed callback state the parent still owned.
-
The qualifier check only inspects the immediate base expression, so a comma operator hides the gl_FragData tracking and clamping.
Seen in 1 report
-
The queuing discipline used an object without confirming it was still alive.
-
The range's linked-list node is freed by the cycle collector before the range destructor unlinks itself.
Seen in 1 report
-
The raster buffer size is calculated from file values and the write loop uses a width that can exceed it.
Seen in 1 report
-
The raw character reader does not check the buffer boundary when reading an identifier.
Seen in 1 report
-
The raw string pointer is read without first checking that the scalar holds a string.
-
The re-entrancy guard in the window destructor was non-fatal, so a nested message loop could re-enter and free the object.
Seen in 1 report
-
The read loop did not reduce the remaining count by the amount already read, so later iterations read the full original count again.
Seen in 1 report
-
The read size is computed by subtracting the offset from the buffer length without checking the offset is in bounds.
Seen in 1 report
-
The readback workaround did not check whether a pixel buffer object was bound and treated its byte offset as a host pointer, and release builds ignored native driver errors.
Seen in 1 report
-
The reader does not check that an Annotation object still exists before using it.
Seen in 1 report
-
The reader does not check that an object referenced as a geometry really is a geometry before reading its attributes.
Seen in 1 report
-
The reallocation size was hard-coded instead of doubling as the buffer grew, so entries beyond 1024 were written past the end.
Seen in 1 report
-
The reallocator was unaware of folded allocations and did not track reserved memory, so reallocation caused overlapping objects.
Seen in 1 report
-
$7,000 High
-