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.
-
An aligned data size was subtracted from an unsigned remaining-buffer counter without checking enough space remained, so the counter wrapped.
Seen in 1 report
-
An aligned offset can exceed the total buffer size, so the subtraction wraps.
Seen in 1 report
-
An allocated memory object was passed to other functions without initialisation.
Seen in 1 report
-
An annotation is freed inside an event handler but reused on the main thread.
Seen in 1 report
-
An arena pool is freed twice in the certificate email address extraction function.
-
An argument flag set by a rewrite directive is not reset before a later set directive's length calculation, so the length pass and write pass disagree.
Seen in 1 report
-
An argument to a run call is evaluated after the callback object is moved, and that argument can synchronously destroy the adapter.
Seen in 1 report
-
An arithmetic size calculation on untrusted input is done without checking for overflow before allocating a buffer.
Seen in 1 report
-
An array index taken directly from shader bytecode is used in a memory write without validation.
Seen in 1 report
-
An array index taken from AVRCP data is used without bounds checking.
-
An array length stored in a signed integer was used in pointer arithmetic without an overflow check, so the allocation size wrapped.
Seen in 1 report
-
An array-handling path dereferenced a pointer before it was initialised.
-
An associated object is stored with an assign policy instead of a retaining policy, leaving a dangling pointer after the window is freed.
Seen in 1 report
-
An asynchronous callback captures a raw this pointer instead of a weak pointer and does not synchronise with object destruction.
Seen in 1 report
-
Critical
-
-
An asynchronous callback used a raw pointer to a handler that could be freed before it ran.
Seen in 1 report
-
$3,000 Medium
-
-
An attachment distance of the minimum signed 16-bit value is not rejected, so its negation overflows and corrupts the chain index.
Seen in 1 report
-
An attacker-controlled 32-bit size field is used as a copy length without checking it fits the remaining buffer.
-
An attacker-controlled buffer length and array counts were passed to the NDR deserialiser without checking the declared sizes.
-
An attacker-controlled dimension count is used to loop over a fixed-size array without validating it against the array length.
Seen in 1 report
-
An attacker-controlled length field is passed to a memory set call without validation against the buffer size.
-
An attacker-controlled length field is used to index into a buffer and write a null terminator without a bounds check.
-
An attacker-controlled PrefixList is copied into a fixed-size buffer without a length check, and this happens before signature verification.
-
An attacker-controlled total length is passed to a memory copy without checking it against the destination buffer size.
-
An attacker-controlled variable name is passed as the format string to a printf-style function.
Seen in 1 report
-
An auto-reset guard on a member of an object that synchronous DOM events can free bypasses the smart pointer protection.
Seen in 1 report
-
An early return for Document targets skipped the structural prerequisite recheck, so a node reparented during a synchronous event was not re-validated.
Seen in 1 report
-
An early return from an error path during texture storage release skips disassociating the image, leaving a dangling pointer used later in the destructor.
Seen in 1 report
-
An early return on a driver error skips cleanup of a paused query pointer.
Seen in 1 report
-
An early return on allocation error skipped cleanup of the buffer's mapping entry, leaving a stale pointer to unmapped driver memory.
Seen in 1 report
-
An early return on out-of-memory skips clearing the buffer's mapped state, leaving a dangling pointer.
Seen in 1 report
-
An early validation failure returns before the copy queue fence is waited on, so teardown frees resources while the GPU copy is still in flight.
Seen in 1 report
-
An early-return path left an output buffer uninitialised while reporting success.
Seen in 1 report
-
An edge count was truncated from a 64-bit size to a 32-bit integer before allocation, so a huge path caused an undersized buffer.
Seen in 1 report
-
An error callback was changed from asynchronous posting to a synchronous call, destroying the transaction while a worker still ran inside it.
Seen in 1 report
-
An error condition is detected but the code continues instead of aborting, so the bad data is still processed.
Seen in 1 report
-
An error handler posts a native callback to a background thread instead of the UI thread, racing with object destruction.
Seen in 1 report
-
An error path and a completion path both decrease the reference count on the same context object.
-
An error path frees a resource that is still referenced elsewhere.
-
An error path frees query name pointers a second time without resetting them.
Seen in 1 report
-
An error path in JSON array serialisation returned an exception status without setting the pending exception, so the handler read the empty placeholder and handed it to JavaScript.
-
An error path in the UTF-8 string parser frees a pointer to a local stack buffer instead of only returning an error.
Seen in 1 report
-
An error return from a UTF-16 to UTF-8 conversion is negated and used as an index without bounds checking.
Seen in 1 report
-
An error sentinel value was stored as the component count and later used as an array index because the exception was ignored.
Seen in 1 report
-
An event handler keeps a pointer to an object that JavaScript then frees before the handler dereferences it.
Seen in 1 report
-
An exception handler destroyed a temporary path object that later code reused.
Seen in 1 report
-
An extension is removed from the extension set on one thread while a background task still holds a pointer to its permission provider.
Seen in 1 report
-
An implicit cast from a 64-bit size to a 32-bit size truncated the allocation length.
Seen in 1 report
-
An incomplete fix for an earlier V8 bug left heap type indices confusable during canonicalisation of recursive groups.
Seen in 1 report
-
An incomplete fix: only one function took a defensive copy of the child vector while three sibling functions still iterate the member vector by reference.
Seen in 1 report
-
An incorrect bounds calculation in the horizontal fetch routine when handling certain image dimensions or scaling factors.