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 function uses attacker-controlled values from the file as array indices without validating them against the allocated row and cell counts.
Seen in 1 report
-
The game calls the app data copy routine with an output buffer size that exceeds the actual buffer size, allowing a copy past the bounds.
-
The gesture dispatch did not track the lifetime of the target window before dispatching held events.
Seen in 1 report
-
The GIF parsing code did not validate the size or contents of user-supplied data before writing to a memory buffer.
-
The GPU process does not validate renderer-supplied YCbCr format features against actual hardware capabilities before creating a Vulkan sampler conversion.
Seen in 1 report
-
The GPU process trusts the claimed shared image format without validating the actual plane count, pixel format or per-plane dimensions.
Seen in 1 report
-
The graph builder did not validate that the weight tensor's per-channel quantization axis was dimension 0.
Seen in 1 report
-
$43,000 Critical
-
-
The grapheme cluster skip loop advanced the cluster start once per glyph instead of once per cluster.
Seen in 1 report
-
The graphics component handles objects in memory incorrectly, causing memory corruption.
Seen in 1 report
-
The graphics driver does not validate the coordinates passed to readPixels, leading to an out-of-bounds memory access.
Seen in 1 report
-
Critical
-
-
The graphics driver mishandles element count or buffer size passed through instanced drawing, causing an oversized copy.
-
The group lookup validates the id only with a debug-only assertion, which is removed in release builds, so an invalid id causes an out-of-bounds read.
Seen in 1 report
-
The guard releases its mutex before notifying, so a waiting thread can wake, see the predicate satisfied, and destroy the parent object while the notifier still holds a pointer.
Seen in 1 report
-
The guest program deserialised untrusted circuit bytes with unchecked access and used an unvalidated operation type in match expressions.
Seen in 1 report
-
The handler accepted an arbitrary length on one handle and read that many bytes from a shorter buffer on another.
-
The handler copies a user-supplied path into a fixed stack buffer without checking its length.
Seen in 1 report
-
The handler copies more bytes than the output buffer holds because it never checks the read count against the buffer size.
Seen in 1 report
-
The handler copies the Referer header into a fixed-length stack buffer without validating its length.
-
The handler fails to reset the stored closure when the observed web contents is destroyed, leaving a dangling pointer used during later teardown.
Seen in 1 report
-
The handler stores raw pointers inside a variant that smart-pointer protection cannot cover and does not observe the tab lifetime.
Seen in 1 report
-
The handler's destructor never removes itself as an observer of the download service logger, leaving a dangling observer.
Seen in 1 report
-
$3,000 High
-
-
The hash default block is invoked recursively without a guard, so a block returning the same key causes infinite recursion until realloc fails.
Seen in 1 report
-
The header cell methods returned the requested array size instead of the number of populated elements, so uninitialised memory was treated as valid pointers.
Seen in 1 report
-
The header parser lacks a size check and reads headers into a fixed-size global buffer.
Seen in 1 report
-
The header size addition was performed without an overflow check, so a large sub-header size wrapped the data offset to zero.
-
The headless window handler omits the base class's weak pointer re-entrancy guard, so a synchronous delegate callout can destroy the object mid-method.
Seen in 1 report
-
The HEIC parser does not validate the size or bounds of user-supplied data before writing to a buffer.
Seen in 1 report
-
The hex-encoding routine for the Document ID lacks a bounds check on the output buffer, giving a stack buffer overflow.
Seen in 1 report
-
The Host header is copied into a fixed-size stack buffer without a length check, because the size calculation uses an overflowing subtraction.
Seen in 1 report
-
The hostname is copied into a fixed-size heap buffer without checking its length.
Seen in 1 report
-
The HPACK path header value is copied into a fixed-size buffer without comparing its length to the buffer size.
Seen in 1 report
-
The HPGL parser trusts size or length values from the file without checking them against the allocated buffer.
-
The HTML parser frees a table object but later calls a virtual function on it.
Seen in 1 report
-
The HTML/XML import code frees an object but fails to null the associated pointer, so later reuse of that pointer bypasses checks meant to prevent use-after-free.
Seen in 1 report
-
The HTML5 parser writes outside its buffer.
Seen in 1 report
-
Critical
-
-
The HTTP server copies the Authorization header into a fixed-length stack buffer without checking its length.
-
The Huffman table was sized from the longest code length alone without checking the total number of entries written.
Seen in 1 report
-
The hypervisor did not verify that its memory management writes succeeded, leaving stale mappings after a failed write.
Seen in 1 report
-
The ICU conversion function does not terminate the output when the encoded length equals the buffer capacity, and the caller does not check the returned length before duplicating.
Seen in 1 report
-
The identifier map entry is reallocated while ClearAndNotify still holds a reference to the old entry.
Seen in 1 report
-
The identity map for deopt literals could shrink during garbage collection when duplicate keys merged, but the code assumed it never shrinks and used stale indices.
Seen in 1 report
-
The image buffer size was computed with 32-bit signed arithmetic and no overflow check, so height times pitch wrapped to a small positive value.
Seen in 1 report
-
The image creation function did not check for integer overflow when multiplying width, height and channels.
Seen in 1 report
-
The image height is not validated, causing sign extension when calculating an index into the image buffer.
Seen in 1 report
-
The image parser does not validate the size of image data in EMF+ records before copying it into a heap buffer.
Seen in 1 report
-
The IME content observer is released by the cycle collector while a pending key event still references it, with no liveness check before use.
Seen in 1 report
-
The implementation did not enforce that an alignment value must be a multiple of the type's required alignment, so it computed a smaller struct size and array stride than the real layout.
Seen in 1 report
-
The imported tag signature was allowed to be a subtype of the defined tag signature, breaking the invariance required because tag parameters are mutable exception storage.
Seen in 1 report
-
The importer deleted objects from a vector while iterating a map of indices into that vector, leaving stale indices and a double free.
-
The in-use check was not atomic with destruction of the shared session cache, so a concurrent link could attach after the check passed.