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 software does not check that an Annotation object still exists before using it.
Seen in 4 reports
-
The software does not properly validate the type or size of data in E70 files, leading to type confusion or out-of-bounds read.
Seen in 4 reports
-
The XLS parsing routine trusts size or length values from the file and writes data without checking that it fits within the allocated buffer.
Seen in 4 reports
-
Untrusted pointer dereference where a pointer is used without validation.
Seen in 4 reports
-
User-supplied data is used in size or content decisions without validation.
Seen in 4 reports
-
User-supplied lengths are copied into fixed-size stack buffers without checking that they fit.
Seen in 4 reports
-
User-supplied parameters are copied into fixed-size stack buffers with unbounded string copy operations without length checks.
Seen in 4 reports
-
Values of one type are treated as another, for example a BigInt treated as an object or shader data treated as an object pointer.
Seen in 4 reports
-
Virtual device code trusted data supplied by the guest without validating sizes or contents.
Seen in 4 reports
-
A backend substitutes a fallback format or skips a hardened attribute without checking compatibility with the original request.
Seen in 3 reports
-
A buffer length is not checked before a memory copy in a driver.
Seen in 3 reports
-
A class is cast or constructed without verifying its backend or expected interface first.
Seen in 3 reports
-
A driver copies user-supplied data without validating its length.
Seen in 3 reports
-
A function's failure status was ignored, so processing continued on invalid or uninitialised data.
Seen in 3 reports
-
A heap buffer overflow when parsing a crafted image file.
Seen in 3 reports
-
A local flag for remote name resolution is set wrongly during a slow handshake, so the long hostname is copied into a fixed buffer instead of the resolved address.
Seen in 3 reports
-
A memory handling flaw in the scripting engine that allows objects to be corrupted.
Seen in 3 reports
-
A missing bounds check when parsing embedded font data leads to an out-of-bounds write.
Seen in 3 reports
-
A missing bounds check when parsing image data allows a write past the end of an allocated buffer.
Seen in 3 reports
-
A null pointer is dereferenced when parsing crafted input.
Seen in 3 reports
-
A parser reads or writes data without checking that the declared length fits within the remaining buffer.
Seen in 3 reports
-
A pointer is dereferenced without validation, letting an attacker influence where the program reads or jumps.
Seen in 3 reports
-
A stack buffer overflowed because a length check was missing or wrong during file parsing.
Seen in 3 reports
-
A variable or pointer is used before being initialised, including an uninitialised mapping structure passed to unmap.
Seen in 3 reports
-
An error message was built with an unbounded formatted print into a fixed 81-byte stack buffer.
Seen in 3 reports
-
An object is freed without checking its state, so it can be freed twice.
Seen in 3 reports
-
An object lifetime or type confusion error in how the engine handled objects in memory.
Seen in 3 reports
-
An unsigned length counter is decremented without checking for underflow, or an array is allocated from an ASN.1 length but more elements are copied.
Seen in 3 reports
-
Attacker-controlled input is copied into a fixed-size stack buffer without a length check.
Seen in 3 reports
-
Bounds checks use signed addition without overflow protection, so wrapped values pass.
Seen in 3 reports
-
Cached handles or keys were not refreshed after reallocation or cache purge, leaving stale references.
Seen in 3 reports
-
Classes are resolved by constant name at runtime instead of holding a stable reference, so reassigning the constant changes behaviour.
Seen in 3 reports
-
Code cached a buffer pointer or length before calling user-controlled code that could reallocate or free it, leaving a stale pointer or length in use.
Seen in 3 reports
-
Code continues using state after reentrant JavaScript or a nested event loop has torn it down.
Seen in 3 reports
-
Code read memory before it had been initialised, producing out-of-bounds reads and information leaks.
Seen in 3 reports
-
Code touches members after a callback that runs a nested event loop, during which the object can be destroyed.
Seen in 3 reports
-
Components mishandled objects in memory, producing corruption that could be turned into code execution or privilege escalation.
Seen in 3 reports
-
Data from a file is interpreted as the wrong type, causing type confusion.
Seen in 3 reports
-
Data of one type is processed as another because the type of user-supplied data is not checked.
Seen in 3 reports
-
Data read from the file was used as the wrong object type, giving type confusion.
Seen in 3 reports
-
Discovery and frame parsing code copies attacker-controlled strings into fixed-size buffers without bounds checks.
Seen in 3 reports
-
DNS name data and DDNS error codes are copied into fixed-size buffers without checking their length.
Seen in 3 reports
-
Drivers process packets from a malicious server without validating their contents.
Seen in 3 reports
-
File-controlled values were used as array indices without bounds checks.
Seen in 3 reports
-
Fixed-size buffers were filled from file or caller-controlled sizes without checking the actual buffer capacity.
Seen in 3 reports
-
Font parsing code did not validate the size or content of user-supplied data before writing to a buffer.
Seen in 3 reports
-
Garbage collection or cache callbacks free or move memory while other code still holds a reference to it.
Seen in 3 reports
-
Global state such as session pointers and OPcache bookkeeping is not reset when a request aborts with a fatal out-of-memory error.
Seen in 3 reports
-
Heap overflow from input not size-checked before copying.
Seen in 3 reports
-
Image dimensions or component counts are read from headers and used without validation, or change after buffer allocation.
Seen in 3 reports