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,001 to 1,050 of 3,817
  1. A change adding a NON_PACKED flag to object elements caused incorrect handling of arrays with holes during tracing.

    Seen in 1 report
  2. A change that reduced map loads during elements kind transitions assumed the wrong elements kind.

    Seen in 1 report
  3. A change to treat user memory as volatile turned single dereferences into two separate dereferences of attacker-controlled fields.

    Seen in 1 report
  4. A check-then-act race: the null check and the subsequent release were not atomic, so two threads could both pass the check.

    Seen in 1 report
  5. A check-then-AddRef race: the destroyed flag is read before a reference is taken, so a concurrent final release can free the object.

    Seen in 1 report
  6. A checked integer is multiplied by the size of a character type without re-validating the result, allowing an undersized allocation.

    Seen in 1 report
  7. A child document's parent pointer is not cleared when the document is destroyed, so the removal code later compares against freed memory.

    Seen in 1 report
  8. A clamped copy of a length is checked but the raw length is then re-read and used for the write.

    Seen in 1 report
  9. A class id field is used as an array index without checking for negative values.

    Seen in 1 report
  10. A class stubs its reference counting methods, so the object can be destroyed while another component still holds a pointer.

    Seen in 1 report
  11. A client driver parses a crafted packet from a malicious server without validating it.

    Seen in 1 report
  12. A client message of any length was copied directly into a fixed-size memory buffer.

    Seen in 1 report
  13. A client-supplied index is used without checking it against the array size.

    Seen in 1 report
  14. A close-all loop calls into channel close code that can run user callbacks dropping the last reference to the connection object, so the loop keeps using freed memory.

    Seen in 1 report
  15. A closed handle is not reset to null, so it is closed again on destruction.

    Seen in 1 report
  16. A cloud-provided string is copied into a fixed-size stack buffer without a length check.

    Seen in 1 report
  17. A collection is iterated while synchronous script can modify it.

    Seen in 1 report
  18. A column index derived from a file tag was used without validation against the buffer width, while only the row index was checked.

    Seen in 1 report
  19. A COM delegate holds the final reference to an operation on a non-IO thread, so its destructor releases non-atomic ref-counted blob items from the wrong thread.

    Seen in 1 report
  20. A comma search reads past the end of a line and then writes null bytes at out-of-bounds positions.

    Seen in 1 report
  21. A command buffer length is increased without checking that the supplied length leaves room.

    Seen in 1 report
  22. A command parser used an unbounded string conversion into a heap buffer whose size was miscalculated.

    Seen in 1 report
  23. A compiler analysis pass skips revisiting a single-block loop header, so fixed-point iteration stops early and type checks are removed.

    Seen in 1 report
  24. A compiler pass resized a built-in array symbol but did not update the cached types of parent syntax tree nodes, leaving the tree type-desynchronised.

    Seen in 1 report
  25. A compiler-generated copy constructor copied an iterator without rebinding it to the new object.

    Seen in 1 report
  26. A completion block captures a bare C pointer instead of a weak pointer, so the pointer dangles if the object is deleted during the animation.

    Seen in 1 report
  27. A completion callback could run synchronously on error and destroy the update checker object while its method was still executing.

    Seen in 1 report
  28. A completion structure is attached only to the last fragment, so earlier fragments pin pages without paired completion.

    Seen in 1 report
  29. A compound backing marks a wrapped backing as supporting memory access regardless of its actual type, and an unchecked cast follows.

    Seen in 1 report
  30. A condition pointer is cached and dereferenced after a navigation commit step that can reentrantly erase it.

    Seen in 1 report
  31. A configuration field length is measured and copied into a fixed stack buffer without checking that it fits.

    Seen in 1 report
  32. A const reference into a vector was invalidated when the vector reallocated during lazy style attribute synchronisation.

    Seen in 1 report
  33. A constructor takes a signed int offset but stores it as an unsigned 64-bit value, so a large size is narrowed to negative and sign-extended.

    Seen in 1 report
  34. A container is emptied before a check that decides whether to release a manual reference.

    Seen in 1 report
  35. A contract mismatch where the caller signals read failure with a negative value the library's callback does not support.

    Seen in 1 report
  36. A conversion function's result is trusted without a range check, so an overflow bypasses an upper-bound guard.

    Seen in 1 report
  37. A copy length was calculated by subtracting 4 from the frame length without checking the frame was at least 4 bytes, causing an integer underflow.

    Seen in 1 report
  38. A copy loop in the line assignment routine ran with a bad source or destination pointer.

    Seen in 1 report
  39. A copy loop indexes a fixed stack array with a counter that is never bounds-checked.

    Seen in 1 report
  40. A copy routine clears capacity fields but not count fields, and its rollback loop increments capacity instead of count, so the destructor frees aliased pointers.

    Seen in 1 report
  41. A copy-paste error null-checks the read framebuffer instead of the draw framebuffer, so the draw binding is not cleared before deletion.

    Seen in 1 report
  42. A corrupted pointer in a base log file was dereferenced without validation, allowing a fake object to be used for an arbitrary write.

    Seen in 1 report
  43. A count from file metadata is passed to alloca without bounds checking.

    Seen in 1 report
  44. A counter object was used without checking it still existed.

    Seen in 1 report
  45. A credential length field was copied into a fixed-size stack buffer without a bounds check.

    Seen in 1 report
  46. A cross-compartment wrapper to the debugger object was likely nuked while a breakpoint still held it, so a later property read through a with-scope hit an inconsistent wrapper state.

    Seen in 1 report
  47. A cross-thread callback attaches a persistent handle to a worker heap after termination has begun, and the handle is cleared without synchronisation.

    Seen in 1 report
  48. A cursor unique pointer is assigned on one thread and moved from on another with no mutex.

    Seen in 1 report
  49. A custom patch copied a user-controlled username into a fixed-size global with a bounded string copy that did not bound the length, overflowing into neighbouring globals.

    Seen in 1 report
  50. A custom snprintf returns a negative value on truncation, which is added to an unsigned length and wraps to a huge offset.

    Seen in 1 report