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 window manager driver uses an object without checking it is still valid.
Seen in 1 report
-
The Windows build was not linked with dynamic base or other hardening, so ASLR is inactive and addresses are predictable.
-
The Windows release build did not actually apply ASLR and DEP flags despite an earlier change meant to enable them.
Seen in 1 report
-
The workaround passed a cube-face target to a texture parameter call that only accepts base targets, so the driver raised an invalid-enum error and the decoder skipped its state update while the driver had already resized the allocation.
Seen in 1 report
-
The workaround that swapped a 3D texture attachment for a temporary 2D texture did not reset the depth plane, so a stale attacker-controlled slice was used.
Seen in 1 report
-
The worker thread read the metafile without the required lock and the print handler did not enforce single-use semantics.
Seen in 1 report
-
The wrapper converted pending content as soon as it saw the content type option, before the explicit length was processed, so it fell back to strlen and allocated an undersized buffer.
-
The wrapper functions trusted offset pairs from the regex engine without checking that start was not greater than end before using them in memory operations.
Seen in 1 report
-
The wrappers discarded the converted byte count and passed zero, so the underlying functions used string length on a buffer that may not be terminated.
-
The write handler copied an unbounded user-supplied length into a 32-byte stack buffer without validating it.
-
The write loop writes two bytes per iteration into a buffer sized from the image width.
Seen in 1 report
-
The write-init function did not validate the attacker-controlled code and length fields before copying data.
Seen in 1 report
-
The write-out logic in ourWriteOut reads a byte past the end of a 512-byte buffer filled from a config file value without checking the buffer boundary.
Seen in 1 report
-
The wrong pointer was passed to the read call, using the header base plus the header length instead of the header base plus the header's own length field.
Seen in 1 report
-
The X server copied user-supplied data into a heap buffer without checking its length.
-
The XML length field was only checked to be non-negative, not against the real buffer size.
Seen in 1 report
-
The XML parser script runner resumes parsing synchronously from a script loading callback, bypassing re-entrancy guards and invalidating raw pointers.
Seen in 1 report
-
The XSLT processor kept a reference to a DOM node that the cycle collector could free during script execution and used it without a liveness check.
Seen in 1 report
-
The zero-fill size calculation multiplied row pitch by raw pixel height instead of block-row count, in 32-bit unsigned arithmetic without an overflow check.
Seen in 1 report
-
$3,000 Medium
-
-
There is no guard against double-resolving the same promise resolver, and a debug-only invariant is relied on before unsafe-casting the reaction list.
Seen in 1 report
-
Thread stacks are mapped at fixed addresses, overwriting existing mappings.
Seen in 1 report
-
Three 32-bit integers multiplied to size an allocation without an overflow check.
Seen in 1 report
-
Three size values were multiplied to compute an allocation size without checking for overflow on 32-bit systems.
Seen in 1 report
-
Three was added to a clipboard-supplied size without an overflow check, so a near-maximum size wrapped to a small allocation.
Seen in 1 report
-
TIFF parser trusted the container component count while the embedded JPEG decoder produced more bytes per pixel, so the allocated buffer was too small.
Seen in 1 report
-
Tile coordinate variables are 16-bit and wrap around, producing a wild write.
Seen in 1 report
-
Tile count and size were not checked against the destination surface dimensions before writing pixels.
Seen in 1 report
-
TLSWrap::DoWrite frees the WriteWrap object via InvokeQueued() when EncOut() fails, but still returns a success code, so the caller uses the freed object.
Seen in 1 report
-
Tracing a baseline JIT stub during garbage collection uses an invalid shape pointer.
Seen in 1 report
-
Transparent colour index used as an array index without checking it is non-negative.
Seen in 1 report
-
TSF server does not correctly validate or handle messages from TSF clients.
Seen in 1 report
-
Two 32-bit unsigned lengths are added without an overflow check, so a small allocation is made and data is written past its end.
Seen in 1 report
-
Two attacker-controlled size values are added without an overflow check, so the subsequent bounds check can be bypassed.
Seen in 1 report
-
Two hash maps are accessed from the platform thread pool and the media task runner without any locking.
Seen in 1 report
-
Two length fields read from the key blob were added without overflow checks, so a huge value wrapped and the size check passed while the copy used the large length.
-
Two pointers are subtracted to compute a tag length without checking the order, causing an integer underflow that becomes a huge copy size.
Seen in 1 report
-
Two separate length readings were taken during one operation with no re-check of allocated capacity before writing.
Seen in 1 report
-
Medium
-
-
Two string lengths stored in 32-bit integers are summed before allocation, so the sum can overflow.
Seen in 1 report
-
$1,000 Critical
-
-
Two unsynchronised structures mapped SSRCs to modules, so a collision overwrote one entry but left a dangling pointer in the other.
Seen in 1 report
-
Type confusion where a resource is accessed using an incompatible type.
-
Type confusion where a resource is used as the wrong type.
-
Type inference assumed a constructor's this object already had its final shape when entered via on-stack replacement, ignoring a property removed by an earlier rollback.
Seen in 1 report
-
Unbinding a paused transform feedback object decrements the buffer binding count, so decoder state no longer matches the driver.
Seen in 1 report
-
Unbinding a remote releases the wrong context object due to a mix-up in handle-to-context mapping.
Seen in 1 report
-
$5,000 High
-
-
Unbounded recursion in the string-conversion path exhausts and corrupts the VM stack.
Seen in 1 report
-
Unbounded string read from a file into a fixed-size stack buffer using a bare string format specifier.
-
Unchecked addition of three 32-bit values before casting, so the sum wraps to a small offset.
Seen in 1 report
-
Unchecked arithmetic on a size or count value causes wraparound.
Seen in 1 report
-
Unchecked integer calculations overflow or wrap around, leading to memory corruption.
Seen in 1 report
-
Unchecked offsets and lengths are passed into the timeline helper when fetching automation values.