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 2,451 to 2,500 of 3,817
  1. Stride values from the file are used in pointer arithmetic without bounds checking, and sign extension produces out-of-range addresses.

    Seen in 1 report
  2. String comparison loops iterate over the longer string without checking the shorter one.

    Seen in 1 report
  3. String concatenation appends to a destination buffer without ensuring it is large enough.

    Seen in 1 report
  4. String lengths and extra space are added as unsigned integers without an overflow check, so the sum wraps to a small number.

    Seen in 1 report
  5. Struct mangled names concatenate the name and field list without a delimiter, so distinct structs can collide.

    Seen in 1 report
  6. A structure is not initialised before an early error path jumps to cleanup that destroys it.

    Seen in 1 report
  7. Subscription code used an object after freeing it because it did not check the object still existed.

    Seen in 1 report
  8. Subtracting 2 from a two-byte size field without checking the value is at least 2.

    Seen in 1 report
  9. The SVGA3D command handler fails to validate the length of user-supplied data before copying into a heap buffer.

    Seen in 1 report
  10. Swap chain destructors touch the on-heap WebGL context, whose finalisation order is not guaranteed.

    Seen in 1 report
  11. Synchronous destruction of a factory during iteration over a set invalidates the iterator and accesses freed memory.

    Seen in 1 report
  12. Synchronous draining of the global garbage collection queue during an explicit cleanup call deleted the native object while a permission request was still being handled.

    Seen in 1 report
  13. Synchronous re-entrancy during geometry queries lets the window and host objects be destroyed while their methods are still on the call stack.

    Seen in 1 report
  14. Synchronous script during popup cancellation allows a nested popup to be created and then overwritten, leaving a dangling pointer in the client.

    Seen in 1 report
  15. Synchronous Win32 calls can process pending window destruction through a nested message loop, and the code then accesses members without a liveness check.

    Seen in 1 report
  16. Synchronous Win32 calls pump the message loop, allowing an object to be destroyed mid-function with no re-entrancy guard.

    Seen in 1 report
  17. System calls let kernel mode generate ciphertext for arbitrary plaintext and write it to any unprotected physical address.

    Seen in 1 report
  18. System caret initialisation lacks the re-entrancy protection used elsewhere, so a nested message loop can destroy the object before the constructor returns.

    Seen in 1 report
  19. Table element count was computed with an 8-byte stride while elements were accessed with a 12-byte stride, so the loop read past the buffer.

    Seen in 1 report
  20. Tag length counters were incremented without an upper bound and then used in bounded copies into fixed stack buffers.

    Seen in 1 report
  21. Teardown stopped the main loop and destroyed the stream without waiting for the independent real-time processing thread to finish.

    Seen in 1 report
  22. Tensor dimensions were multiplied in a signed 32-bit integer without an overflow check, so large dimensions wrapped to zero.

    Seen in 1 report
  23. Tensor size multiplication lacked overflow checks and an unchecked temporary tensor creation function was used.

    Seen in 1 report
  24. The 3D annotation object is freed during a zoom event but later used without a validity check.

    Seen in 1 report
  25. The 3D check in the size validation omits the cube map array type, so the depth contribution is not counted.

    Seen in 1 report
  26. The ABI compatibility check ignores that the mapped C++ class has a user-provided constructor, which forces indirect return.

    Seen in 1 report
  27. The abort method runs a callback that can synchronously destroy the object, then dereferences the this pointer without a liveness check.

    Seen in 1 report
  28. The accessibility child array is accessed out of bounds when the DOM is mutated in an unexpected order during frame recreation.

    Seen in 1 report
  29. The accessibility controller calls into a presentation shell whose context was already freed.

    Seen in 1 report
  30. The accumulation logic repeatedly added the same vertex count and the addition used signed integers before wrapping in a checked type.

    Seen in 1 report
  31. The ACO optimiser's instruction combining logic fails to properly track instruction lifetimes when handling subgroup operations, leading to a use-after-free.

    Seen in 1 report
  32. The acquire demuxer method lacked a state guard against multiple acquisitions, so a second message freed media stream objects the renderer still referenced.

    Seen in 1 report
  33. The acquire function increments the reference count and only checks for overflow afterwards, so a racing thread can observe a wrapped count and free a still-referenced object.

    Seen in 1 report
  34. The active async writes counter is incremented after the write call, so a synchronous completion callback can free the request before the increment.

    Seen in 1 report
  35. The ActiveCells parameter is copied into a fixed-length stack buffer without a length check.

    Seen in 1 report
  36. The add_line routine wrote vertices without correctly sizing or bounding the destination buffer.

    Seen in 1 report
  37. The addIcon function does not validate the type of object passed as an argument.

    Seen in 1 report
  38. The addition of old size and growth size is not checked for overflow before being used as the new allocation size.

    Seen in 1 report
  39. The addition result type is intersected with the additive safe integer range even when the sum exceeds it, clipping the type.

    Seen in 1 report
  40. The address of a stack-local variable was passed as userdata to an asynchronous callback that could outlive the stack frame because the early return on a failed wait left the callback pending.

    Seen in 1 report
  41. The alias region size calculation multiplied entries by stride without checking for integer overflow, so the region was smaller than the pages later inserted.

    Seen in 1 report
  42. The allocated size does not match the loop condition, so an extra iteration writes past the buffer.

    Seen in 1 report
  43. The allocation size added a caller-controlled DACL size to fixed values without checking for integer overflow.

    Seen in 1 report
  44. The allocation size and the copy length were read from two different fields of the same attacker-controlled buffer with no check that they agreed.

    Seen in 1 report
  45. The allocation size is computed by adding and multiplying lengths without an overflow check, then filled with unbounded string copies.

    Seen in 1 report
  46. The allocation size is computed from the pointer variable rather than the pointed-to type.

    Seen in 1 report
  47. The allocation size uses the unpadded minimum byte size while the row stride includes scanline padding, and the allocation margin is insufficient for very narrow windows.

    Seen in 1 report
  48. The allocation size was calculated as count plus one in an unsigned int without checking for the maximum, so the addition wrapped to zero.

    Seen in 1 report
  49. The allocation size was computed by shifting a user-controlled count left by three bits, which overflowed to a tiny buffer.

    Seen in 1 report
  50. The allocator stored the next-free-chunk pointer in single-linked lists as a plain unprotected value, so a heap overflow could redirect later allocations.

    Seen in 1 report