Skip to content

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.

Back to the lesson 1,751 to 1,800 of 3,817
  1. 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
  2. An aligned offset can exceed the total buffer size, so the subtraction wraps.

    Seen in 1 report
  3. An allocated memory object was passed to other functions without initialisation.

    Seen in 1 report
  4. An annotation is freed inside an event handler but reused on the main thread.

    Seen in 1 report
  5. An arena pool is freed twice in the certificate email address extraction function.

    Seen in 1 report
  6. 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
  7. 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
  8. An arithmetic size calculation on untrusted input is done without checking for overflow before allocating a buffer.

    Seen in 1 report
  9. An array index taken directly from shader bytecode is used in a memory write without validation.

    Seen in 1 report
  10. An array index taken from AVRCP data is used without bounds checking.

    Seen in 1 report
  11. 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
  12. An array-handling path dereferenced a pointer before it was initialised.

    Seen in 1 report
  13. 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
  14. An asynchronous callback captures a raw this pointer instead of a weak pointer and does not synchronise with object destruction.

    Seen in 1 report
  15. An asynchronous callback used a raw pointer to a handler that could be freed before it ran.

    Seen in 1 report
  16. 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
  17. An attacker-controlled 32-bit size field is used as a copy length without checking it fits the remaining buffer.

    Seen in 1 report
  18. An attacker-controlled buffer length and array counts were passed to the NDR deserialiser without checking the declared sizes.

    Seen in 1 report
  19. 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
  20. An attacker-controlled length field is passed to a memory set call without validation against the buffer size.

    Seen in 1 report
  21. An attacker-controlled length field is used to index into a buffer and write a null terminator without a bounds check.

    Seen in 1 report
  22. An attacker-controlled PrefixList is copied into a fixed-size buffer without a length check, and this happens before signature verification.

    Seen in 1 report
  23. An attacker-controlled total length is passed to a memory copy without checking it against the destination buffer size.

    Seen in 1 report
  24. An attacker-controlled variable name is passed as the format string to a printf-style function.

    Seen in 1 report
  25. 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
  26. 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
  27. 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
  28. An early return on a driver error skips cleanup of a paused query pointer.

    Seen in 1 report
  29. 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
  30. An early return on out-of-memory skips clearing the buffer's mapped state, leaving a dangling pointer.

    Seen in 1 report
  31. 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
  32. An early-return path left an output buffer uninitialised while reporting success.

    Seen in 1 report
  33. 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
  34. 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
  35. An error condition is detected but the code continues instead of aborting, so the bad data is still processed.

    Seen in 1 report
  36. An error handler posts a native callback to a background thread instead of the UI thread, racing with object destruction.

    Seen in 1 report
  37. An error path and a completion path both decrease the reference count on the same context object.

    Seen in 1 report
  38. An error path frees a resource that is still referenced elsewhere.

    Seen in 1 report
  39. An error path frees query name pointers a second time without resetting them.

    Seen in 1 report
  40. 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.

    Seen in 1 report
  41. 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
  42. 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
  43. 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
  44. An event handler keeps a pointer to an object that JavaScript then frees before the handler dereferences it.

    Seen in 1 report
  45. An exception handler destroyed a temporary path object that later code reused.

    Seen in 1 report
  46. 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
  47. An implicit cast from a 64-bit size to a 32-bit size truncated the allocation length.

    Seen in 1 report
  48. An incomplete fix for an earlier V8 bug left heap type indices confusable during canonicalisation of recursive groups.

    Seen in 1 report
  49. 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
  50. An incorrect bounds calculation in the horizontal fetch routine when handling certain image dimensions or scaling factors.

    Seen in 1 report