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 function writes a pointer to an incorrect offset so a later call uses an invalid address.
Seen in 1 report
-
A garbage collector bookkeeping bug introduced when a flag was set at the end of major sweeping caused a chunk to be allocated during collection and led to crashes in the marking phase.
-
A garbage-collection marking bug where a shape reachable from the debugger's object inspection is traced after its memory has become invalid.
-
A generated format table computes the wrong pixel size, so a staging buffer is too small for the driver's write.
Seen in 1 report
-
A getter called inside a condition synchronously dispatches X11 events that delete the window host and compositor, and the remaining expression uses the freed objects.
Seen in 1 report
-
A group index check rejected values above a limit but allowed exactly the limit, so the index calculation read one element past the fixed array.
Seen in 1 report
-
A growable array is appended to without reserving, invalidating pointers to its elements held elsewhere.
Seen in 1 report
-
A handle index is never reset and overflows to the hash map's deleted sentinel.
Seen in 1 report
-
A handle is destroyed even when obtaining it failed, so an invalid or already-freed pointer is freed again.
-
A handler strongly captures itself in a completion block while holding an unowned pointer to a list that can be destroyed.
Seen in 1 report
-
A handler was erased from its container before a method was called on it, so the object was freed and then used.
Seen in 1 report
-
A handler writes fixed-size structures into a caller buffer without checking the caller's declared size.
-
A hang stack buffer is freed by the background thread while the main thread still holds a reference and later reads its length.
Seen in 1 report
-
A hardcoded layer index bypasses the feedback-loop check, and an early return on an out-of-bounds copy leaves backend storage un-resized while the frontend inflates its dimensions.
Seen in 1 report
-
A hash key is inserted into a map without filtering reserved sentinel values, so the garbage collector skips tracing that bucket.
Seen in 1 report
-
A hash map find result was dereferenced without checking for the end iterator.
Seen in 1 report
-
A hash map member was declared after the devices vector, so it was destroyed first while a concurrent callback still used it.
Seen in 1 report
-
A hash table stored a raw pointer to a TaskSignal without keeping the object alive, so the entry dangled after collection.
-
A hash-table insertion updates entry counters before allocating the entry data, so a memory-limit bailout leaves a counted but uninitialised slot that shutdown treats as real.
-
A header value was freed and a pointer to it reused when the header name matched the value under case-insensitive hashing.
Seen in 1 report
-
A heap buffer is freed and then a pointer to it is passed to a C++ vector destructor which frees it again.
-
A heap buffer is freed inside a loop without resetting the pointer, so the same chunk is freed repeatedly.
Seen in 1 report
-
A heap buffer is sized from a file-supplied array length but iterated in descriptor-sized steps without checking the length is a multiple of the descriptor size.
-
A heap buffer overflow in how Word parses RTF content.
Seen in 1 report
-
A heap buffer overflow in the incremental write barrier during garbage collection.
Seen in 1 report
-
A heap buffer overflow when processing a specially crafted network request.
Seen in 1 report
-
A heap buffer overflow when processing crafted input in the ONCRPC XDR driver.
-
A heap buffer overflow when processing responses from a server.
Seen in 1 report
-
A heap buffer overflow while loading integral rows.
Seen in 1 report
-
A heap memory corruption in the firmware's handling of TDLS frames lets attacker-controlled data shape heap chunks.
Seen in 1 report
-
A heap vector is iterated while a synchronously invoked JavaScript callback can re-enter and clear that same vector.
Seen in 1 report
-
A heap vector was iterated while a call could synchronously re-enter and modify it, invalidating the iterator.
Seen in 1 report
-
A helper already releases the operation reference but two callers release it again, causing a double free.
Seen in 1 report
-
A helper hardcodes reading four components from a constant array that may have been allocated with fewer.
Seen in 1 report
-
A Java bridge holds a raw pointer to a C++ object and does not invalidate it when the object deletes itself.
Seen in 1 report
-
A JavaScript array object tied to a form field was used after free during form reset and Format action handling.
Seen in 1 report
-
A JSON deserialization library allowed arbitrary classes to be instantiated without an allowlist.
Seen in 1 report
-
A JSON field was copied into a fixed stack buffer with an unbounded sscanf, and the overflow reached a buffer later passed to popen.
Seen in 1 report
-
A kernel driver dereferences a pointer supplied from user mode without validating it.
Seen in 1 report
-
A kernel driver failed to initialise a linked-list pointer in a path record structure.
Seen in 1 report
-
A kernel NULL pointer dereference was exploitable on older Windows because the NULL page could be mapped and win32k syscalls were reachable from the sandbox.
Seen in 1 report
-
A key length variable was not reset when an optional parameter was absent, so later copies used an incorrect offset.
Seen in 1 report
-
A key-changed flag is never set in the index update loop, so the key version is not incremented.
-
A lack of validation before freeing an object during USDC and USDZ parsing.
-
A large allocation result was not checked for failure before use.
Seen in 1 report
-
A later header can reset the dictionary size to zero after it was set, so a zero-byte context is allocated and then written to.
Seen in 1 report
-
A launch argument was copied with strcpy into a fixed-size stack buffer without a length check.
-
A layout qualifier from a shader is used as a vector index without checking it against the vector size.
Seen in 1 report
-
A lazily cached surface reference is read and replaced without synchronisation, so the pointer load and reference increment are not atomic with replacement.
-
A length byte from the file is used to calculate a copy size without checking for underflow, so a small value becomes a huge unsigned count.
Seen in 1 report