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 CADM service copies user-supplied data into a fixed-length buffer without checking its length.
Seen in 3 reports
-
The code frees an object without checking whether it has already been freed, leading to a double free.
Seen in 3 reports
-
The decode pointer was incremented without checking the image buffer bounds, and a run-length value was used as a loop counter without validating it against the destination size.
Seen in 3 reports
-
The decoder's state machine treats an invalid block switch as a need for more input and keeps appending to a fixed eight-byte buffer without bounds checking.
Seen in 3 reports
-
The driver did not validate the size or contents of user-supplied data before using it to index or write into a kernel buffer.
Seen in 3 reports
-
The driver uses an object without checking it still exists, giving a use-after-free.
Seen in 3 reports
-
The driver uses user-supplied data in a memory write without validating it, and in one case an integer calculation overflows first.
Seen in 3 reports
-
The extension header evaluation functions copy user-supplied data into fixed-length stack buffers without checking the length.
Seen in 3 reports
-
The image parser trusts length or offset fields in the file without checking them against the actual buffer size.
Seen in 3 reports
-
The length validation used a greater-than comparison against the maximum path length instead of greater-than-or-equal, so an exactly maximum-length name or path passed and the null terminator landed past the buffer.
Seen in 3 reports
-
The method copies user-supplied data into a fixed-length stack buffer without validating its length first.
Seen in 3 reports
-
The NEU parser did not validate the type of data it read, so crafted input made it treat an object as the wrong type.
Seen in 3 reports
-
The parser copies user data into fixed-size buffers without checking length or size.
Seen in 3 reports
-
The parser does not validate a length or offset field from the file before using it to read from or write to a buffer.
Seen in 3 reports
-
The parser does not validate the size or bounds of user-supplied data before writing to a buffer.
Seen in 3 reports
-
The parser does not validate the size or structure of user-supplied data before reading or writing.
Seen in 3 reports
-
The parser does not validate the type of data in IGS files, causing type confusion on malformed input.
Seen in 3 reports
-
The parser trusted size or offset values from the file without checking them against the buffer size.
Seen in 3 reports
-
The parser trusts a size field in the file and writes data based on it without checking the destination buffer.
Seen in 3 reports
-
The parser trusts a size or length value from the file without checking it against the actual buffer.
Seen in 3 reports
-
The parser trusts length or offset values from the file without checking them, so it reads before or past the allocated buffer.
Seen in 3 reports
-
The parser trusts length or offset values in the file without checking them against the allocated buffer.
Seen in 3 reports
-
The parser uses a pointer without initialising it first.
Seen in 3 reports
-
The PDF parser does not validate the size or contents of user-supplied data before writing to a buffer.
Seen in 3 reports
-
The same memory freed twice (double free).
Seen in 3 reports
-
The software copies a length field or data from the file into a fixed-size stack buffer without checking that it fits.
Seen in 3 reports
-
The software did not check the size or content of data read from project files before copying into fixed-size buffers.
Seen in 3 reports
-
The software does not validate the size or content of user-supplied data when handling Doc objects.
Seen in 3 reports
-
The verifier failed to mark a register as contributing to another's precision, or mis-tracked range and bit-mask values at a branch.
Seen in 3 reports
-
Unbounded string copy functions were used without checking destination size.
Seen in 3 reports
-
Use of uninitialised resources where memory is read before being given a defined value.
Seen in 3 reports
-
User data was copied into a fixed-length stack buffer without a length check.
Seen in 3 reports
-
User-supplied data is not properly validated before use, leading to memory corruption.
Seen in 3 reports
-
User-supplied data is not validated before an integer overflow in buffer allocation.
Seen in 3 reports
-
User-supplied data not validated before copying into fixed-size buffers.
Seen in 3 reports
-
User-supplied model data is copied into fixed-size heap buffers without a length check, and array indices in Slice handling are not bounds-checked.
Seen in 3 reports
-
User-supplied paths are copied into fixed-size stack buffers through path joining functions with no length check, overwriting exception handlers.
Seen in 3 reports
-
User-supplied values used in size calculations are not validated, causing integer overflow or underflow before allocation.
Seen in 3 reports
-
Validation logic checks one aspect of state but not the full combination, such as counting blend equations without checking other draw buffers.
Seen in 3 reports
-
Validation relies on debug-only assertions that are compiled out in release builds.
Seen in 3 reports
-
Variables or buffers are read before being initialised.
Seen in 3 reports
-
Windows services and components mishandled objects in memory, allowing a local user to influence objects they should not control.
Seen in 3 reports
-
A 64-bit size is stored in a 32-bit member but the untruncated value is later used for copying.
Seen in 2 reports
-
A buffer is read beyond its intended range because of a missing bounds check.
-
A buffer length was not checked before copying memory.
-
A buffer size is calculated using an unchecked integer from the file, causing an integer overflow before allocation.
-
A buffer size is computed from user-supplied data without overflow checking, giving an undersized allocation.
-
A callback can synchronously mutate the container being iterated, leaving a dangling iterator.
Seen in 2 reports
-
A channel array is allocated with zero elements while the parser assumes at least one channel exists.
-
A cleanup function frees an object and then calls another function on the same freed pointer.