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 selection event handler re-enters the input and changes its type, releasing the text editor state while the caller keeps using it.
Seen in 1 report
-
A session's user object is freed without synchronising against other connections that still hold the pointer.
Seen in 1 report
-
A shader-supplied constant buffer index is used to calculate a write address without validation.
Seen in 1 report
-
A shape's class pointer is dereferenced after the object has been finalised.
Seen in 1 report
-
A shared hash map was read and inserted into from two threads with no lock, so a rehash freed nodes another thread was dereferencing.
Seen in 1 report
-
$11,000 Critical
-
-
A shared object was operated on without a lock, so a pointer could be used after the memory was freed.
-
A shared per-canvas scratch builder is cleared and reallocated by a reentrant draw call while an outer loop still holds spans into its storage.
Seen in 1 report
-
A shared pointer wrapper releases an object while it is still referenced, so a later reference increment reads freed memory.
Seen in 1 report
-
A shared remote object is reset and read through a raw pointer without a lock.
Seen in 1 report
-
A shared static cache of atomic strings is not synchronised across threads, so concurrent inserts can free an object another thread is copying.
Seen in 1 report
-
A shared V8 isolate's task runner was permanently bound to the first resolver's thread, so cleanup tasks from other resolvers ran after their context was freed.
Seen in 1 report
-
A sign extension error in the WAV header parsing logic causes an incorrect buffer size calculation.
-
A signature of arbitrary length was copied into a fixed-size buffer without bounds checking.
Seen in 1 report
-
A signed 16-bit attachment counter can overflow to a negative value.
Seen in 1 report
-
A signed 16-bit contour loop counter wraps negative against an unsigned 16-bit count, so the loop keeps running and reads an endpoint out of bounds.
Seen in 1 report
-
A signed 16-bit font index was sign-extended into an unchecked address calculation, so a large font id produced a negative offset and an out-of-bounds heap write.
Seen in 1 report
-
A signed 16-bit loop counter was sign-extended, turning a large value negative and bypassing the loop bound check.
Seen in 1 report
-
A signed 32-bit integer overflow when calculating tile start offsets led to out-of-bounds pointer arithmetic.
Seen in 1 report
-
A signed 32-bit overflow in the size calculation for converting a one-byte string buffer to two-byte, with no length limit in the background scanner.
Seen in 1 report
-
A signed 32-bit stride was assigned to an unsigned size field without a negative-value check, unlike the DMA-buf path in the same file.
Seen in 1 report
-
A signed 32-bit width in the slow copy path is not validated, allowing a value larger than the calculated height to cause an out-of-bounds write.
Seen in 1 report
-
A signed character was widened to int before being used as an array index, allowing negative indices.
Seen in 1 report
-
A signed comparison in the buffer resize function treats a negative count as smaller than the current size, so the buffer is not enlarged.
-
A signed counter was incremented without an upper bound and used directly in a modulo expression as an array index.
Seen in 1 report
-
A signed integer overflow in the capacity calculation produced a negative value that bypassed the size check.
Seen in 1 report
-
A signed integer overflow when multiplying the point count by the maximum clipped segments per line, followed by an incorrect conversion to an unsigned size for the allocation.
Seen in 1 report
-
A signed integer sign-extension error during parsing led to an out-of-bounds write.
-
A signed length underflows to a huge value and is passed to a memory copy into a fixed global buffer with no bounds check.
Seen in 1 report
-
A signed multiplication of negative width and height values bypasses a file-size sanity check, leading to an out-of-bounds read.
Seen in 1 report
-
A signed offset was only checked for upper bounds, so a negative value passed and wrapped to a pointer before the buffer.
Seen in 1 report
-
A signed size from guest input was passed to a byte-array constructor where minus one wrapped to a shared empty allocation, so the later copy was unbounded.
-
A signed size variable could go negative and was then treated as a huge unsigned value in the formatted write.
Seen in 1 report
-
A signed size was passed where an unsigned size was expected, and the wrong accounting function was called during destruction.
Seen in 1 report
-
A signed UEFI application follows a pointer it has not validated.
Seen in 1 report
-
A signed-to-unsigned integer conversion error led to an out-of-bounds write.
-
A signed/unsigned type confusion: the stride is validated as unsigned but passed to an API taking a signed integer, and the row-gap subtraction is unchecked.
Seen in 1 report
-
A SIMD kernel is selected based on one plane's width but applied to a narrower plane.
Seen in 1 report
-
A SIMD loop stepped by four but was bounded by the full span length instead of a rounded-down size.
Seen in 1 report
-
A singleton shares an unordered map and a counter across threads with no mutex or atomic protection.
Seen in 1 report
-
A size addition overflows on 32-bit platforms, so the reallocation check wrongly passes.
Seen in 1 report
-
A size calculation based on unvalidated user data wraps around before a buffer is allocated.
Seen in 1 report
-
A size calculation underflows before a buffer is allocated because user data was not validated.
Seen in 1 report
-
A size check added two signed 32-bit integers without widening them, so a large prefix plus suffix overflowed to a negative value and skipped the reallocation.
Seen in 1 report
-
A size check gated on non-empty pixel data let an empty span with a past-end pointer reach the texture upload call.
Seen in 1 report
-
A size derived from path data is converted from float to int and multiplied without bounds checking.
Seen in 1 report
-
A size field from the file header is used without checking it is non-negative, so a negative value bypasses the size check and is treated as large.
Seen in 1 report
-
A size is shifted left repeatedly without overflow checking, so it wraps to zero and is passed to reallocation.
Seen in 1 report
-
A size mismatch between the allocated bitmap buffer and the data copied from the JPX decoder leads to an out-of-bounds read.
Seen in 1 report
-
$7,000 Medium
-
-
A size multiplication overflows a signed integer, producing a small allocation that is then overflowed.
Seen in 1 report
-
A size or bounds miscalculation when copying dynamic vertex attribute data lets a memory copy write past the allocated heap buffer.
Seen in 1 report