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,701 to 1,750 of 3,817
  1. A user-controlled compressed size is stored in an int despite being a long, so it truncates before a memory copy.

    Seen in 1 report
  2. A user-controlled index from a setup packet was used to index a function pointer array without bounds checking.

    Seen in 1 report
  3. A user-controlled URI directory was copied into a fixed-size stack buffer with no length check.

    Seen in 1 report
  4. A user-defined function is called while still holding a pointer to a buffer the user can detach, leading to use-after-free and out-of-bounds write.

    Seen in 1 report
  5. A user-supplied filename is copied into a fixed stack buffer without limiting length.

    Seen in 1 report
  6. A user-supplied offset was used as a write destination without validation.

    Seen in 1 report
  7. A user-supplied string is copied into a heap buffer without proper validation.

    Seen in 1 report
  8. A user-supplied string parameter is copied into a fixed-size stack buffer with an unbounded formatted copy.

    Seen in 1 report
  9. A user-supplied URI path is copied into a fixed-size buffer without first checking its length.

    Seen in 1 report
  10. A UTF-16 to UTF-8 conversion sizes its output buffer wrongly for odd-length input, and detection tables are indexed without a correct size check.

    Seen in 1 report
  11. A V8 exception object was stored in an untraceable callback, so the garbage collector freed it before use.

    Seen in 1 report
  12. A validation function returned success on the first supported field instead of failing on any unsupported field, so unsupported fields were never rejected.

    Seen in 1 report
  13. A value is handled as the wrong object type and dereferenced unsafely in the wasm-to-JS conversion path.

    Seen in 1 report
  14. A value mishandled through numeric truncation, allowing privilege gain.

    Seen in 1 report
  15. A value of the wrong type is stored through a typed store that skips the write barrier, leaving a stale pointer.

    Seen in 1 report
  16. A variable was not initialised before use and the create function did not set it on failure, so the error path freed an arbitrary address.

    Seen in 1 report
  17. A vector constructor narrows a 64-bit span size to 32 bits without a checked cast, so allocation uses the truncated size while the copy uses the full size.

    Seen in 1 report
  18. A vector of attributes is iterated with raw pointers that are not protected against reallocation caused by synchronous JavaScript.

    Seen in 1 report
  19. A very large input made the string length wrap to a negative value, corrupting the string value.

    Seen in 1 report
  20. A vtable entry taken from file-controlled data is called without validation.

    Seen in 1 report
  21. A waitable event was cleared before the worker finished, so the task object was freed while still in use.

    Seen in 1 report
  22. A weak pointer check on one thread is not atomic with destruction on another thread.

    Seen in 1 report
  23. A weak-pointer callback fired after the render frame was destroyed, touching freed memory outside the existing protection.

    Seen in 1 report
  24. A website name taken from a parsed JSON field is copied into a fixed-size stack buffer without a length check.

    Seen in 1 report
  25. A WebTransportCloseInfo object is confused with a WebSocketCloseInfo during promise resolution.

    Seen in 1 report
  26. A window handle's property still referenced freed memory after the window was destroyed, and the pointer could be controlled through the window long pointer calls.

    Seen in 1 report
  27. A window is destroyed while still being observed during a drag-and-drop operation.

    Seen in 1 report
  28. A Window object is dereferenced without checking it still exists.

    Seen in 1 report
  29. A WinRT property-changed callback runs on an MTA thread and notifies a non-thread-safe observer list directly.

    Seen in 1 report
  30. A workaround increases the streamed vertex count after the buffer is allocated from the original count, so the copy loop writes past the end.

    Seen in 1 report
  31. A worker's termination freed an object while another thread still held a reference.

    Seen in 1 report
  32. A writable range is validated before some edit keys resolve their offset, so the later write lands outside the private copy.

    Seen in 1 report
  33. A write barrier was skipped when resetting a dispatch entry, so a concurrent mark bit could be cleared and the live entry swept.

    Seen in 1 report
  34. A write occurs to a channel array that was allocated with zero elements.

    Seen in 1 report
  35. A zero size was treated as a signal to use a string length call on a buffer that was not null-terminated.

    Seen in 1 report
  36. A zero-length buffer makes the write probe return immediately, so a caller-controlled pointer is never validated before increments are applied.

    Seen in 1 report
  37. A zero-sized buffer is allocated when the image height is zero and an uninitialised pointer from it is later freed.

    Seen in 1 report
  38. A zero-sized reallocation was treated as a plain free but left the stale pointer, so a later zero-sized reallocation freed the same buffer again.

    Seen in 1 report
  39. Adding 1 to a 32-bit length of the maximum value wraps to 0, leading to a zero-size allocation.

    Seen in 1 report
  40. Adding the current buffer length and new data length can wrap around, bypassing the capacity check.

    Seen in 1 report
  41. Adding the filename length to a header size overflows, producing a negative size passed to memcpy.

    Seen in 1 report
  42. Adding two to a size field from the file overflows and the size check passes incorrectly.

    Seen in 1 report
  43. Address of an array element held across a reallocation, leaving a stale pointer.

    Seen in 1 report
  44. Adopt sets the string length directly without enforcing the maximum length, breaking the invariant that adding two lengths cannot overflow.

    Seen in 1 report
  45. AES decryption wrote into a fixed 1024-byte buffer without validating the decrypted length, unlike the RSA path.

    Seen in 1 report
  46. Allocation size assumed tightly packed rows while the internal read still honoured an attacker-set pack alignment.

    Seen in 1 report
  47. ALTER TYPE on a composite attribute changes type metadata without rewriting values already stored in a prepared statement.

    Seen in 1 report
  48. Alternate stack exhaustion in the exception logging enable function.

    Seen in 1 report
  49. ALU sanitation set per-operation limits that were too weak to stop the crafted program at runtime.

    Seen in 1 report
  50. An absolute character index was passed as the bound to a forward macro that expected a subrange length.

    Seen in 1 report