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 compiler pass removes or reclassifies a variable or loop without re-running the collection or classification that later code depends on.
Seen in 2 reports
-
A counter is decremented without an in-loop check so an oversized value wraps it and the bounds check runs too late.
-
A derived object is deleted through a base-class pointer that lacks a virtual destructor.
-
A freed object remains referenced by a property or snapshot, so later destruction paths dereference stale memory.
-
A garbage collection handle is destroyed on a worker thread, or callbacks mutate state off the owning sequence.
Seen in 2 reports
-
A length field from a server packet is used in a subtraction or passed to a decryption function without validation, producing a negative length.
Seen in 2 reports
-
A length or offset from network-supplied data was used without validating it against the size of the allocated buffer.
-
A loop iterates over a container that synchronous script or callbacks can reallocate or free, invalidating the iterator.
Seen in 2 reports
-
A member that should hold a parsed object is left uninitialised and later dereferenced.
-
A memory handling error in the collector allowed an attacker to run code with elevated privileges.
-
A memory handling error in the spreadsheet application when processing objects inside a crafted file.
-
A memory handling error in the update stack let a logged-on user corrupt or misuse kernel objects.
-
A memory handling flaw in GDI allowed unintended user-mode privilege elevation.
-
A memory management error in the XSLT library frees the same memory more than once or mishandles it.
-
A memory-handling flaw in GDI allows unintended elevation from user mode to kernel mode.
-
A mismatch between the Lua garbage collector and the host's memory management frees memory that is still referenced.
-
A missing bounds check when reading driver data.
-
A missing length check before copying user-controlled PDF data into a fixed-length heap buffer allows the copy to overflow.
-
A missing length check before copying user-supplied PDF data into a fixed-size heap buffer.
-
A missing or incorrect length check when parsing font or text data lets a buffer be overrun.
Seen in 2 reports
-
A missing or wrong length check when parsing crafted requests, leading to heap overflow.
-
A native object is deleted on dismissal while the UI stays interactive and the Java peer keeps a raw pointer.
Seen in 2 reports
-
A non-owning request path pointer into connection-owned memory was not cleared when the connection was freed during reuse.
-
A persistent worker keeps a reference to request-scoped memory after it is freed.
-
A pointer into the send or receive queue is kept across a callback that can re-enter and free the chunk.
-
A pointer is dereferenced without a NULL check, crashing the service.
-
A pointer is not cleared after being freed, so a later check passes and the object is freed again.
-
A property existence check was made on one object but the property was added to a different internal object.
Seen in 2 reports
-
$20,000 High -
$10,000 High
-
-
A queued callback or event runs after the object it references has been freed.
Seen in 2 reports
-
A race between object destruction and use on another thread causes a use-after-free.
Seen in 2 reports
-
A raw pointer is held across an operation that can reallocate or free the backing store.
Seen in 2 reports
-
A raw pointer is passed to a callback without ensuring the object outlives the callback.
-
A script callback frees the page's form field objects through page deletion and the freed object is dereferenced later without a liveness check.
-
A size calculation for a record buffer used a 16-bit value, so a large uncompressed name plus a large signature wrapped around to a small allocation before the full data was copied.
Seen in 2 reports
-
A size or length value from the file is trusted and written without checking it fits the buffer.
-
A stride or offset is only checked for a lower bound or alignment, not an upper bound, so it exceeds the actual allocation.
Seen in 2 reports
-
A temporary framebuffer is deleted before the previous binding is restored, defeating a workaround for a driver that retains deleted framebuffers.
Seen in 2 reports
-
A thread-affine weak pointer is evaluated on another thread and the release build removes the sequence check.
Seen in 2 reports
-
A use after free in the garbage collection algorithm reachable through unserialize.
-
A use-after-free in the compiler's scalar replacement pass, where an instruction is erased and then still read.
Seen in 2 reports
-
$10,000 High -
$10,000 High
-
-
A use-after-free in the shader compiler's control-flow simplification, where a block is freed while a phi node still references an incoming value.
Seen in 2 reports
-
A user-supplied attribute count used as a loop bound without checking the writes stay within the response buffer.
-
A user-supplied unsigned length was stored in a signed integer, so a large value wrapped negative and passed the maximum-size check before being used in an allocation.
-
A validation limit is larger than the destination buffer, so accepted commands still overflow it.
-
Addresses of members inside a growable cursor array are passed out and not refreshed after the array reallocates.
-
Allocation size computed as width times height times bytes per pixel using 32-bit arithmetic, which can overflow.
-
An association object is freed without being removed from its association group, leaving a dangling pointer.
-
An early return on an error path skips cleanup, leaving handles to be destroyed twice.
Seen in 2 reports
-
An encoder caches an initial configuration value and does not resize its internal arrays when the configuration grows.
Seen in 2 reports
-
An integer overflow in a size calculation leads to a copy that reads or writes beyond the buffer.