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.
-
Stride values from the file are used in pointer arithmetic without bounds checking, and sign extension produces out-of-range addresses.
Seen in 1 report
-
String comparison loops iterate over the longer string without checking the shorter one.
Seen in 1 report
-
String concatenation appends to a destination buffer without ensuring it is large enough.
Seen in 1 report
-
String lengths and extra space are added as unsigned integers without an overflow check, so the sum wraps to a small number.
Seen in 1 report
-
Struct mangled names concatenate the name and field list without a delimiter, so distinct structs can collide.
Seen in 1 report
-
A structure is not initialised before an early error path jumps to cleanup that destroys it.
-
Subscription code used an object after freeing it because it did not check the object still existed.
Seen in 1 report
-
Subtracting 2 from a two-byte size field without checking the value is at least 2.
Seen in 1 report
-
The SVGA3D command handler fails to validate the length of user-supplied data before copying into a heap buffer.
Seen in 1 report
-
Swap chain destructors touch the on-heap WebGL context, whose finalisation order is not guaranteed.
Seen in 1 report
-
Synchronous destruction of a factory during iteration over a set invalidates the iterator and accesses freed memory.
Seen in 1 report
-
Synchronous draining of the global garbage collection queue during an explicit cleanup call deleted the native object while a permission request was still being handled.
Seen in 1 report
-
Synchronous re-entrancy during geometry queries lets the window and host objects be destroyed while their methods are still on the call stack.
Seen in 1 report
-
Synchronous script during popup cancellation allows a nested popup to be created and then overwritten, leaving a dangling pointer in the client.
Seen in 1 report
-
Synchronous Win32 calls can process pending window destruction through a nested message loop, and the code then accesses members without a liveness check.
Seen in 1 report
-
Synchronous Win32 calls pump the message loop, allowing an object to be destroyed mid-function with no re-entrancy guard.
Seen in 1 report
-
System calls let kernel mode generate ciphertext for arbitrary plaintext and write it to any unprotected physical address.
Seen in 1 report
-
System caret initialisation lacks the re-entrancy protection used elsewhere, so a nested message loop can destroy the object before the constructor returns.
Seen in 1 report
-
Table element count was computed with an 8-byte stride while elements were accessed with a 12-byte stride, so the loop read past the buffer.
Seen in 1 report
-
Tag length counters were incremented without an upper bound and then used in bounded copies into fixed stack buffers.
-
Teardown stopped the main loop and destroyed the stream without waiting for the independent real-time processing thread to finish.
Seen in 1 report
-
Tensor dimensions were multiplied in a signed 32-bit integer without an overflow check, so large dimensions wrapped to zero.
-
Tensor size multiplication lacked overflow checks and an unchecked temporary tensor creation function was used.
Seen in 1 report
-
$43,000 Critical
-
-
The 3D annotation object is freed during a zoom event but later used without a validity check.
Seen in 1 report
-
The 3D check in the size validation omits the cube map array type, so the depth contribution is not counted.
Seen in 1 report
-
The ABI compatibility check ignores that the mapped C++ class has a user-provided constructor, which forces indirect return.
Seen in 1 report
-
The abort method runs a callback that can synchronously destroy the object, then dereferences the this pointer without a liveness check.
Seen in 1 report
-
The accessibility child array is accessed out of bounds when the DOM is mutated in an unexpected order during frame recreation.
Seen in 1 report
-
The accessibility controller calls into a presentation shell whose context was already freed.
Seen in 1 report
-
The accumulation logic repeatedly added the same vertex count and the addition used signed integers before wrapping in a checked type.
Seen in 1 report
-
The ACO optimiser's instruction combining logic fails to properly track instruction lifetimes when handling subgroup operations, leading to a use-after-free.
Seen in 1 report
-
$10,000 High
-
-
The acquire demuxer method lacked a state guard against multiple acquisitions, so a second message freed media stream objects the renderer still referenced.
Seen in 1 report
-
The acquire function increments the reference count and only checks for overflow afterwards, so a racing thread can observe a wrapped count and free a still-referenced object.
Seen in 1 report
-
The active async writes counter is incremented after the write call, so a synchronous completion callback can free the request before the increment.
Seen in 1 report
-
The ActiveCells parameter is copied into a fixed-length stack buffer without a length check.
Seen in 1 report
-
The add_line routine wrote vertices without correctly sizing or bounding the destination buffer.
Seen in 1 report
-
The addIcon function does not validate the type of object passed as an argument.
Seen in 1 report
-
The addition of old size and growth size is not checked for overflow before being used as the new allocation size.
Seen in 1 report
-
The addition result type is intersected with the additive safe integer range even when the sum exceeds it, clipping the type.
Seen in 1 report
-
The address of a stack-local variable was passed as userdata to an asynchronous callback that could outlive the stack frame because the early return on a failed wait left the callback pending.
Seen in 1 report
-
The alias region size calculation multiplied entries by stride without checking for integer overflow, so the region was smaller than the pages later inserted.
Seen in 1 report
-
The allocated size does not match the loop condition, so an extra iteration writes past the buffer.
-
The allocation size added a caller-controlled DACL size to fixed values without checking for integer overflow.
Seen in 1 report
-
The allocation size and the copy length were read from two different fields of the same attacker-controlled buffer with no check that they agreed.
Seen in 1 report
-
The allocation size is computed by adding and multiplying lengths without an overflow check, then filled with unbounded string copies.
Seen in 1 report
-
The allocation size is computed from the pointer variable rather than the pointed-to type.
Seen in 1 report
-
The allocation size uses the unpadded minimum byte size while the row stride includes scanline padding, and the allocation margin is insufficient for very narrow windows.
Seen in 1 report
-
The allocation size was calculated as count plus one in an unsigned int without checking for the maximum, so the addition wrapped to zero.
Seen in 1 report
-
The allocation size was computed by shifting a user-controlled count left by three bits, which overflowed to a tiny buffer.
Seen in 1 report
-
The allocator stored the next-free-chunk pointer in single-linked lists as a plain unprotected value, so a heap overflow could redirect later allocations.
Seen in 1 report