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 service handled a resource as the wrong type, allowing privilege escalation from medium integrity to local service.
Seen in 6 reports
-
The vectorised tail handler computes a negative output size for short padded tails, so the store mask allows a full block write.
Seen in 6 reports
-
User-supplied data is copied into a fixed-length heap buffer without checking its length first.
Seen in 6 reports
-
User-supplied pointers or sizes are used without validation, causing untrusted pointer dereferences, null dereferences or integer overflows.
Seen in 6 reports
-
A length or offset in a file is not validated before a read, so the parser reads past the end of an allocated buffer.
Seen in 5 reports
-
A raw pointer is cached, a synchronous callback deletes the object, then the stale pointer is used.
Seen in 5 reports
-
A size calculation multiplies or adds a value from the file without checking for overflow, so the allocation is too small for the later copy.
Seen in 5 reports
-
An invalid pointer or reference is released, leading to memory corruption.
Seen in 5 reports
-
An out-of-memory error triggers a longjmp that skips normal cleanup, leaving partially initialised structures and dangling pointers in the Zend heap.
Seen in 5 reports
-
Code consumes a value of one kind where another is expected because the result kind or receiver type is not re-checked.
Seen in 5 reports
-
Code reads or writes outside the bounds of an allocation, either over-read or out-of-bounds write.
Seen in 5 reports
-
Destination buffer size computed from one field while data is written using a different field.
Seen in 5 reports
-
DOE file parser frees an object and later dereferences it without checking that it is still valid.
Seen in 5 reports
-
Draw-time or deserialisation validation omitted checks that other code paths performed, letting invalid state reach the driver.
Seen in 5 reports
-
File-controlled lengths were used to size one buffer but fill another, or were not checked against fixed buffer sizes.
Seen in 5 reports
-
HEVC decoder fails to properly validate the size or content of data in HEIC files before writing to a memory buffer.
Seen in 5 reports
-
Input is written into a heap buffer without a size or bounds check.
Seen in 5 reports
-
Input length not checked before copying into a fixed-size heap buffer.
Seen in 5 reports
-
Input type was not validated and a number was passed directly to buffer allocation, which on older Node.js returned uninitialised memory.
Seen in 5 reports
-
Integer overflow in a size calculation produces an undersized allocation that is then written past.
Seen in 5 reports
-
Integer overflow or underflow in size calculations happens before allocation or writing.
Seen in 5 reports
-
Integer overflow, underflow or wraparound is not handled safely.
Seen in 5 reports
-
Kernel and service components mishandle objects in memory, letting a local user corrupt or misuse them for privilege escalation.
Seen in 5 reports
-
Kernel drivers use objects without confirming they still exist, or copy user data into heap buffers without validating length.
Seen in 5 reports
-
Length or count values read from the file were used to drive loops and copies into fixed-size buffers without bounds checks.
Seen in 5 reports
-
Length or offset fields in the recording file are not checked against the allocated buffer size before being used to read.
Seen in 5 reports
-
Length taken from the file copied into a fixed-size heap buffer without checking it fits.
Seen in 5 reports
-
Lengths or bounds from a crafted file are trusted, leading to heap overflows and over-reads.
Seen in 5 reports
-
Loop counts and buffer sizes taken from file headers were used without checking them against the allocated buffer.
Seen in 5 reports
-
Memory or pointers are used before being initialised.
Seen in 5 reports
-
Missing bounds checks on array indexes and table data allow out-of-bounds reads and writes.
Seen in 5 reports
-
Objects are freed but the pointer is not cleared, and later code dereferences the dangling pointer.
Seen in 5 reports
-
Objects are freed during event handlers or API calls but later code still uses them, leading to use-after-free or type confusion in the Foxit Reader JavaScript engine.
Seen in 5 reports
-
Objects are used without first checking that they still exist or were initialised.
Seen in 5 reports
-
The Windows kernel does not handle objects in memory correctly.
Seen in 5 reports
-
File format parsers free objects and later use them without checking that they still existed.
Seen in 5 reports
-
Off-by-one errors and missing bounds checks occur when indexing arrays or computing offsets.
Seen in 5 reports
-
Spreadsheet parsers fail to validate data before writing, and fail to initialise memory or check object lifetime.
Seen in 5 reports
-
File format parsers trust size and length fields from the file and copy data into fixed buffers without checking it fits.
Seen in 5 reports
-
CAD file parsers trust size and length fields in the file and copy data into fixed-size buffers without checking that it fits.
Seen in 5 reports
-
Pointers supplied by untrusted input are dereferenced without validation.
Seen in 5 reports
-
Reads go past the intended buffer because of a missing bounds check.
Seen in 5 reports
-
Record length and size fields are trusted without bounds checks against the allocated buffer.
Seen in 5 reports
-
Several Apple integer overflow reports come from size or count values parsed from files not being validated before use in calculations.
Seen in 5 reports
-
Size and length fields from image files were used in allocation arithmetic or copies without validation.
Seen in 5 reports
-
Size calculations multiply attacker-controlled dimensions without overflow checks, producing undersized allocations.
Seen in 5 reports
-
Size calculations multiply or add user-controlled values without checking for integer overflow, so an undersized buffer is allocated.
Seen in 5 reports
-
Size calculations use 32-bit or unchecked multiplication that overflows, so undersized buffers are allocated.
Seen in 5 reports
-
Size or offset calculations overflowed or underflowed because user-supplied values were not validated before arithmetic.
Seen in 5 reports
-
The code did not check that a form or annotation object still existed before operating on it.
Seen in 5 reports