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,401 to 3,450 of 3,817
  1. The reason byte was read from the message body before checking whether the message length was zero, and the Conflux copy path allocated exactly the message length.

    Seen in 1 report
  2. The reattachment loop matches wrappers to cloned rules by index and only checks the general group type, not the exact subclass.

    Seen in 1 report
  3. The rebind path overwrote the child's parent pointer without removing it from the previous parent's child list, and the same-document check was only a debug assertion.

    Seen in 1 report
  4. The receive buffer size is calculated from the default block size instead of the user-specified one.

    Seen in 1 report
  5. The receive loop lacks a total-length check, so repeated fixed-size reads advance the destination pointer without limit and overwrite the session structure.

    Seen in 1 report
  6. The receive method calls a client callback that can synchronously destroy the socket object and then accesses a member of the freed object.

    Seen in 1 report
  7. The receiver copies using the sample's declared size without comparing it to the destination buffer capacity.

    Seen in 1 report
  8. The record buffer size came from one header field while the copy length came from a different attacker-controlled field.

    Seen in 1 report
  9. The recursive free routine did not check whether a sub-IFD record had already been freed.

    Seen in 1 report
  10. The recursive zero-extension check marks a phi node as zero-extended before verifying all its inputs, so a cycle causes an incorrect assumption about the upper 32 bits.

    Seen in 1 report
  11. The redefine path frees the texture storage before calling into code that uses the stale pointer.

    Seen in 1 report
  12. The redirect routine assumes the stored base URL always begins with a scheme prefix, but the getter can omit it when guessing is disabled.

    Seen in 1 report
  13. The redirect routine uses the stored scheme in a string length call before checking it is non-null, while the getter can succeed using a default scheme without storing it.

    Seen in 1 report
  14. The reference count is incremented before serialization but not decremented if serialization fails, leading to a leak and eventual overflow.

    Seen in 1 report
  15. The reference stride is captured before a buffer swap and not updated after the reference frame is replaced with a scaled version.

    Seen in 1 report
  16. The reference tile width from the SIZ marker is multiplied by 20 to size a heap buffer without checking for integer overflow.

    Seen in 1 report
  17. The reference to the ImageDecoderGStreamer object is not cleared and checked before later use in ImageDecoder.

    Seen in 1 report
  18. The refresh driver kept a stale reference to a document's SMIL animation controller after the cycle collector freed the document.

    Seen in 1 report
  19. The region iterator's handling of empty spans fell through without returning, so it yielded more rectangles than the reported interval count while the buffer allocation trusted that count.

    Seen in 1 report
  20. The register allocator assumed a single-predecessor loop header was only reachable via a JumpLoop and cleared register values.

    Seen in 1 report
  21. The register allocator fails to spill a value that is both in a register and on the stack, breaking an exception handler invariant.

    Seen in 1 report
  22. The relationship between sample rate and frames per buffer was enforced only by a debug assertion, so release builds allocated a buffer based on the wrong size.

    Seen in 1 report
  23. The release function freed the prefetch state without locking it, so two threads could cause a double free.

    Seen in 1 report
  24. The release method freed the internal memory without invalidating all script references, so virtual calls could still be made on the freed block.

    Seen in 1 report
  25. The reload check only inspected memory zero's growability, so a cached non-zero memory could be grown without reloading the instance cache.

    Seen in 1 report
  26. The Remaining Length calculation adds lengths without checking for size_t overflow, so a small allocation is followed by a full-length copy.

    Seen in 1 report
  27. The remote dataset identifier function used an unbounded string copy into a fixed-size stack buffer.

    Seen in 1 report
  28. The remover iterated a snapshot of raw WebContents pointers while cancelling a prerender synchronously destroyed one of them.

    Seen in 1 report
  29. The renaming function returned the original identifier when adding the prefix would exceed the length limit, so a long name could collide with a shorter prefixed one.

    Seen in 1 report
  30. The renderer checks that the Y and U planes fit but does not verify the remaining space covers the V-plane size computed from the attacker-controlled stride.

    Seen in 1 report
  31. The renderer is destroyed on the media thread while the audio output device thread keeps a raw pointer and calls it without synchronisation.

    Seen in 1 report
  32. The reply-flush routine used the client-supplied DSI length to decide the copy size but ignored the destination buffer size.

    Seen in 1 report
  33. The request handler does not validate the type of user-supplied data before using it.

    Seen in 1 report
  34. The reservation lookup matched only on object id and a reserved state, ignoring the object generation, so a completion from an earlier request could bind a backend device carrying a stale pointer.

    Seen in 1 report
  35. The reserved-location comparison ignores the base offset and downstream code computes locations contiguously, bypassing the bounds guard.

    Seen in 1 report
  36. The resetForm method freed aggregate objects during property enumeration but continued to use them.

    Seen in 1 report
  37. The resize notification path does not hold a strong reference or re-check the window after nested reflow and event dispatch, so it reads freed memory.

    Seen in 1 report
  38. The resize path did not check that the source row stride is smaller than the output row stride before the convolution routines indexed source rows.

    Seen in 1 report
  39. The resize routine did not check whether reallocation returned null, stored the null pointer, recorded the large size and reported success.

    Seen in 1 report
  40. The resource allocator frees heap allocations based on a completed serial number that does not guarantee all GPU commands referencing those heaps have finished.

    Seen in 1 report
  41. The response buffer size is calculated without accounting for each operation, so a compound request overflows it.

    Seen in 1 report
  42. The response callback deleted the secure channel object and the code then called a pending-encryption method on the freed object.

    Seen in 1 report
  43. The restore path called the internal begin routine directly, bypassing the dimension validation the normal entry point performs.

    Seen in 1 report
  44. The result array was assigned to the return value before being populated, so an exception from a getter exposed uninitialised memory.

    Seen in 1 report
  45. The result of a buffer mapping that returns null on allocation failure is not checked before use in a copy, and the first parameter is not bounded for instanced-only draws.

    Seen in 1 report
  46. The resume handler checks only that feedback is active and paused, not that the current program matches the one recorded at start.

    Seen in 1 report
  47. The retain function returned the port name even when the reference count increment failed, so a reference that was never acquired was adopted.

    Seen in 1 report
  48. The return value of a fallible allocation is not checked and the buffer is used as if the resize succeeded.

    Seen in 1 report
  49. The return value of a map insertion was not checked, so a pointer to an object freed on duplicate key was stored and later used.

    Seen in 1 report
  50. The return value of the file position query is not checked for the error value before being used as a buffer size and read length.

    Seen in 1 report