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,551 to 1,600 of 3,817
  1. A selection event handler re-enters the input and changes its type, releasing the text editor state while the caller keeps using it.

    Seen in 1 report
  2. A session's user object is freed without synchronising against other connections that still hold the pointer.

    Seen in 1 report
  3. A shader-supplied constant buffer index is used to calculate a write address without validation.

    Seen in 1 report
  4. A shape's class pointer is dereferenced after the object has been finalised.

    Seen in 1 report
  5. A shared hash map was read and inserted into from two threads with no lock, so a rehash freed nodes another thread was dereferencing.

    Seen in 1 report
  6. A shared object was operated on without a lock, so a pointer could be used after the memory was freed.

    Seen in 1 report
  7. A shared per-canvas scratch builder is cleared and reallocated by a reentrant draw call while an outer loop still holds spans into its storage.

    Seen in 1 report
  8. A shared pointer wrapper releases an object while it is still referenced, so a later reference increment reads freed memory.

    Seen in 1 report
  9. A shared remote object is reset and read through a raw pointer without a lock.

    Seen in 1 report
  10. A shared static cache of atomic strings is not synchronised across threads, so concurrent inserts can free an object another thread is copying.

    Seen in 1 report
  11. A shared V8 isolate's task runner was permanently bound to the first resolver's thread, so cleanup tasks from other resolvers ran after their context was freed.

    Seen in 1 report
  12. A sign extension error in the WAV header parsing logic causes an incorrect buffer size calculation.

    Seen in 1 report
  13. A signature of arbitrary length was copied into a fixed-size buffer without bounds checking.

    Seen in 1 report
  14. A signed 16-bit attachment counter can overflow to a negative value.

    Seen in 1 report
  15. A signed 16-bit contour loop counter wraps negative against an unsigned 16-bit count, so the loop keeps running and reads an endpoint out of bounds.

    Seen in 1 report
  16. A signed 16-bit font index was sign-extended into an unchecked address calculation, so a large font id produced a negative offset and an out-of-bounds heap write.

    Seen in 1 report
  17. A signed 16-bit loop counter was sign-extended, turning a large value negative and bypassing the loop bound check.

    Seen in 1 report
  18. A signed 32-bit integer overflow when calculating tile start offsets led to out-of-bounds pointer arithmetic.

    Seen in 1 report
  19. A signed 32-bit overflow in the size calculation for converting a one-byte string buffer to two-byte, with no length limit in the background scanner.

    Seen in 1 report
  20. A signed 32-bit stride was assigned to an unsigned size field without a negative-value check, unlike the DMA-buf path in the same file.

    Seen in 1 report
  21. A signed 32-bit width in the slow copy path is not validated, allowing a value larger than the calculated height to cause an out-of-bounds write.

    Seen in 1 report
  22. A signed character was widened to int before being used as an array index, allowing negative indices.

    Seen in 1 report
  23. A signed comparison in the buffer resize function treats a negative count as smaller than the current size, so the buffer is not enlarged.

    Seen in 1 report
  24. A signed counter was incremented without an upper bound and used directly in a modulo expression as an array index.

    Seen in 1 report
  25. A signed integer overflow in the capacity calculation produced a negative value that bypassed the size check.

    Seen in 1 report
  26. A signed integer overflow when multiplying the point count by the maximum clipped segments per line, followed by an incorrect conversion to an unsigned size for the allocation.

    Seen in 1 report
  27. A signed integer sign-extension error during parsing led to an out-of-bounds write.

    Seen in 1 report
  28. A signed length underflows to a huge value and is passed to a memory copy into a fixed global buffer with no bounds check.

    Seen in 1 report
  29. A signed multiplication of negative width and height values bypasses a file-size sanity check, leading to an out-of-bounds read.

    Seen in 1 report
  30. A signed offset was only checked for upper bounds, so a negative value passed and wrapped to a pointer before the buffer.

    Seen in 1 report
  31. A signed size from guest input was passed to a byte-array constructor where minus one wrapped to a shared empty allocation, so the later copy was unbounded.

    Seen in 1 report
  32. A signed size variable could go negative and was then treated as a huge unsigned value in the formatted write.

    Seen in 1 report
  33. A signed size was passed where an unsigned size was expected, and the wrong accounting function was called during destruction.

    Seen in 1 report
  34. A signed UEFI application follows a pointer it has not validated.

    Seen in 1 report
  35. A signed-to-unsigned integer conversion error led to an out-of-bounds write.

    Seen in 1 report
  36. A signed/unsigned type confusion: the stride is validated as unsigned but passed to an API taking a signed integer, and the row-gap subtraction is unchecked.

    Seen in 1 report
  37. A SIMD kernel is selected based on one plane's width but applied to a narrower plane.

    Seen in 1 report
  38. A SIMD loop stepped by four but was bounded by the full span length instead of a rounded-down size.

    Seen in 1 report
  39. A singleton shares an unordered map and a counter across threads with no mutex or atomic protection.

    Seen in 1 report
  40. A size addition overflows on 32-bit platforms, so the reallocation check wrongly passes.

    Seen in 1 report
  41. A size calculation based on unvalidated user data wraps around before a buffer is allocated.

    Seen in 1 report
  42. A size calculation underflows before a buffer is allocated because user data was not validated.

    Seen in 1 report
  43. A size check added two signed 32-bit integers without widening them, so a large prefix plus suffix overflowed to a negative value and skipped the reallocation.

    Seen in 1 report
  44. A size check gated on non-empty pixel data let an empty span with a past-end pointer reach the texture upload call.

    Seen in 1 report
  45. A size derived from path data is converted from float to int and multiplied without bounds checking.

    Seen in 1 report
  46. A size field from the file header is used without checking it is non-negative, so a negative value bypasses the size check and is treated as large.

    Seen in 1 report
  47. A size is shifted left repeatedly without overflow checking, so it wraps to zero and is passed to reallocation.

    Seen in 1 report
  48. A size mismatch between the allocated bitmap buffer and the data copied from the JPX decoder leads to an out-of-bounds read.

    Seen in 1 report
  49. A size multiplication overflows a signed integer, producing a small allocation that is then overflowed.

    Seen in 1 report
  50. A size or bounds miscalculation when copying dynamic vertex attribute data lets a memory copy write past the allocated heap buffer.

    Seen in 1 report