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 3,001 to 3,050 of 3,817
  1. The function uses attacker-controlled values from the file as array indices without validating them against the allocated row and cell counts.

    Seen in 1 report
  2. The game calls the app data copy routine with an output buffer size that exceeds the actual buffer size, allowing a copy past the bounds.

    Seen in 1 report
  3. The gesture dispatch did not track the lifetime of the target window before dispatching held events.

    Seen in 1 report
  4. The GIF parsing code did not validate the size or contents of user-supplied data before writing to a memory buffer.

    Seen in 1 report
  5. The GPU process does not validate renderer-supplied YCbCr format features against actual hardware capabilities before creating a Vulkan sampler conversion.

    Seen in 1 report
  6. The GPU process trusts the claimed shared image format without validating the actual plane count, pixel format or per-plane dimensions.

    Seen in 1 report
  7. The graph builder did not validate that the weight tensor's per-channel quantization axis was dimension 0.

    Seen in 1 report
  8. The grapheme cluster skip loop advanced the cluster start once per glyph instead of once per cluster.

    Seen in 1 report
  9. The graphics component handles objects in memory incorrectly, causing memory corruption.

    Seen in 1 report
  10. The graphics driver does not validate the coordinates passed to readPixels, leading to an out-of-bounds memory access.

    Seen in 1 report
  11. The graphics driver mishandles element count or buffer size passed through instanced drawing, causing an oversized copy.

    Seen in 1 report
  12. The group lookup validates the id only with a debug-only assertion, which is removed in release builds, so an invalid id causes an out-of-bounds read.

    Seen in 1 report
  13. The guard releases its mutex before notifying, so a waiting thread can wake, see the predicate satisfied, and destroy the parent object while the notifier still holds a pointer.

    Seen in 1 report
  14. The guest program deserialised untrusted circuit bytes with unchecked access and used an unvalidated operation type in match expressions.

    Seen in 1 report
  15. The handler accepted an arbitrary length on one handle and read that many bytes from a shorter buffer on another.

    Seen in 1 report
  16. The handler copies a user-supplied path into a fixed stack buffer without checking its length.

    Seen in 1 report
  17. The handler copies more bytes than the output buffer holds because it never checks the read count against the buffer size.

    Seen in 1 report
  18. The handler copies the Referer header into a fixed-length stack buffer without validating its length.

    Seen in 1 report
  19. The handler fails to reset the stored closure when the observed web contents is destroyed, leaving a dangling pointer used during later teardown.

    Seen in 1 report
  20. The handler stores raw pointers inside a variant that smart-pointer protection cannot cover and does not observe the tab lifetime.

    Seen in 1 report
  21. The handler's destructor never removes itself as an observer of the download service logger, leaving a dangling observer.

    Seen in 1 report
  22. The hash default block is invoked recursively without a guard, so a block returning the same key causes infinite recursion until realloc fails.

    Seen in 1 report
  23. The header cell methods returned the requested array size instead of the number of populated elements, so uninitialised memory was treated as valid pointers.

    Seen in 1 report
  24. The header parser lacks a size check and reads headers into a fixed-size global buffer.

    Seen in 1 report
  25. The header size addition was performed without an overflow check, so a large sub-header size wrapped the data offset to zero.

    Seen in 1 report
  26. The headless window handler omits the base class's weak pointer re-entrancy guard, so a synchronous delegate callout can destroy the object mid-method.

    Seen in 1 report
  27. The HEIC parser does not validate the size or bounds of user-supplied data before writing to a buffer.

    Seen in 1 report
  28. The hex-encoding routine for the Document ID lacks a bounds check on the output buffer, giving a stack buffer overflow.

    Seen in 1 report
  29. The Host header is copied into a fixed-size stack buffer without a length check, because the size calculation uses an overflowing subtraction.

    Seen in 1 report
  30. The hostname is copied into a fixed-size heap buffer without checking its length.

    Seen in 1 report
  31. The HPACK path header value is copied into a fixed-size buffer without comparing its length to the buffer size.

    Seen in 1 report
  32. The HPGL parser trusts size or length values from the file without checking them against the allocated buffer.

    Seen in 1 report
  33. The HTML parser frees a table object but later calls a virtual function on it.

    Seen in 1 report
  34. The HTML/XML import code frees an object but fails to null the associated pointer, so later reuse of that pointer bypasses checks meant to prevent use-after-free.

    Seen in 1 report
  35. The HTML5 parser writes outside its buffer.

    Seen in 1 report
  36. The HTTP server copies the Authorization header into a fixed-length stack buffer without checking its length.

    Seen in 1 report
  37. The Huffman table was sized from the longest code length alone without checking the total number of entries written.

    Seen in 1 report
  38. The hypervisor did not verify that its memory management writes succeeded, leaving stale mappings after a failed write.

    Seen in 1 report
  39. The ICU conversion function does not terminate the output when the encoded length equals the buffer capacity, and the caller does not check the returned length before duplicating.

    Seen in 1 report
  40. The identifier map entry is reallocated while ClearAndNotify still holds a reference to the old entry.

    Seen in 1 report
  41. The identity map for deopt literals could shrink during garbage collection when duplicate keys merged, but the code assumed it never shrinks and used stale indices.

    Seen in 1 report
  42. The image buffer size was computed with 32-bit signed arithmetic and no overflow check, so height times pitch wrapped to a small positive value.

    Seen in 1 report
  43. The image creation function did not check for integer overflow when multiplying width, height and channels.

    Seen in 1 report
  44. The image height is not validated, causing sign extension when calculating an index into the image buffer.

    Seen in 1 report
  45. The image parser does not validate the size of image data in EMF+ records before copying it into a heap buffer.

    Seen in 1 report
  46. The IME content observer is released by the cycle collector while a pending key event still references it, with no liveness check before use.

    Seen in 1 report
  47. The implementation did not enforce that an alignment value must be a multiple of the type's required alignment, so it computed a smaller struct size and array stride than the real layout.

    Seen in 1 report
  48. The imported tag signature was allowed to be a subtype of the defined tag signature, breaking the invariance required because tag parameters are mutable exception storage.

    Seen in 1 report
  49. The importer deleted objects from a vector while iterating a map of indices into that vector, leaving stale indices and a double free.

    Seen in 1 report
  50. The in-use check was not atomic with destruction of the shared session cache, so a concurrent link could attach after the check passed.

    Seen in 1 report