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,351 to 2,400 of 3,817
  1. Raw C++ pointers are passed into V8 callbacks and pending asynchronous tasks are not cancelled when the V8 context is destroyed.

    Seen in 1 report
  2. Raw C++ references to a restore entry were held across a call chain that could synchronously mutate and free the entry list.

    Seen in 1 report
  3. Raw iterators walked a mutable vector while synchronously invoking observer callbacks that could modify it.

    Seen in 1 report
  4. Raw pointers are held in a local vector across an operation that can trigger garbage collection.

    Seen in 1 report
  5. Raw pointers to a focused view were cached in locals and then code ran that could synchronously destroy that view, so the locals dangled.

    Seen in 1 report
  6. Raw pointers to buffer helpers were not cleared when transform feedback ended, and the dirty-bit handler did not check whether transform feedback was active.

    Seen in 1 report
  7. Raw pointers to default vertex attribute buffers were not cleared when the buffer helpers were deleted during a resize.

    Seen in 1 report
  8. Raw pointers to the navigation context were passed to observer callbacks without weak pointers or validity checks.

    Seen in 1 report
  9. Raw tagged pointers are cached on the C++ stack and not updated when a synchronous collection moves the array.

    Seen in 1 report
  10. Re-specifying a texture level bumps the global counter without invalidating attached framebuffers, so a wrapped counter lets a stale snapshot match.

    Seen in 1 report
  11. Reachability analysis ignores that descriptor-based casts can fail even when static types are subtypes, marking the false branch unreachable.

    Seen in 1 report
  12. Read size is calculated from the biClrUsed header field while the buffer was allocated with a static size.

    Seen in 1 report
  13. A length or offset is read from user-supplied data without checking it against the actual buffer size.

    Seen in 1 report
  14. Reallocating the per-texture mip level array does not update or invalidate framebuffer attachment pointers that referenced the old array.

    Seen in 1 report
  15. Reassembly assumed the next-header field sat inside the extension header, but in an ESP packet it comes after the encrypted payload, so its offset could exceed the header buffer.

    Seen in 1 report
  16. Redefining a texture array level frees the storage object while an image object still references it.

    Seen in 1 report
  17. Reference buffer indices from the renderer are copied into driver structures without checking each index is within the valid range.

    Seen in 1 report
  18. Reference counting on a netlink socket is decremented twice on one path, freeing a live object.

    Seen in 1 report
  19. Reference handling in node replacement frees an object that is still in use.

    Seen in 1 report
  20. The regexp interpreter writes match offsets into a fixed-size static offsets vector without checking that the number of capture positions fits.

    Seen in 1 report
  21. Register index and length supplied in expressions were not validated against the register array bounds.

    Seen in 1 report
  22. Release of an invalid pointer or reference leads to memory corruption.

    Seen in 1 report
  23. Removing a synchronisation barrier from the cancel method lets the watcher be destroyed while an already-running OS callback still holds a raw pointer.

    Seen in 1 report
  24. Render bundles store only canvas context dependencies and not external texture objects or source ids, so the command buffer lacks the lifetime dependency checked at submit.

    Seen in 1 report
  25. Renderer-supplied strings are passed to key-value coding methods without sanitisation.

    Seen in 1 report
  26. Renderer-supplied texture coordinates and resource sizes are not validated against the actual GPU texture dimensions.

    Seen in 1 report
  27. Reporting functions held raw pointers to the session across a callout into page JavaScript that could disconnect and free it.

    Seen in 1 report
  28. Request data from a destroyed memory pool was still referenced and passed into a string formatting function.

    Seen in 1 report
  29. Request header data is copied into a fixed-size stack buffer without a length check.

    Seen in 1 report
  30. Request query data was copied into a fixed-size stack buffer without a length check.

    Seen in 1 report
  31. Request structures hold non-owning string views into state that can be destroyed before an asynchronous operation completes.

    Seen in 1 report
  32. A resource is accessed using an incompatible type.

    Seen in 1 report
  33. Restore delegates to the platform window, which can synchronously destroy the host through an observer, and then calls show on the freed object without a weak pointer check.

    Seen in 1 report
  34. Restore rebuilds queue pointers and driver status from separate saved fields without checking they agree.

    Seen in 1 report
  35. Resume validation did not check that the bound program matched the one active at begin, and cached buffer handles were not cleared when transform feedback ended.

    Seen in 1 report
  36. Resuming transform feedback recomputes capacity from the new buffer size but does not reset the accumulated write position.

    Seen in 1 report
  37. The return value of a memory reallocation was not checked for failure before the pointer was used in a write loop.

    Seen in 1 report
  38. The return value of object_init_ex is not checked, leaving a null object that is later dereferenced.

    Seen in 1 report
  39. Row pitch and Y offset are 32-bit signed integers whose product can overflow before being added to a 64-bit pointer.

    Seen in 1 report
  40. RSRC segment parsing does not validate loop counters and offsets before using them to compute addresses to clear.

    Seen in 1 report
  41. Sampler names are built by plain string concatenation and the only collision check is a debug-only assertion.

    Seen in 1 report
  42. Sanitisation mutates the limits array in place, freeing inline dictionaries still referenced elsewhere.

    Seen in 1 report
  43. Saved IP options are freed with a plain free instead of waiting for a grace period, so another CPU can still read them.

    Seen in 1 report
  44. Scale factors were fetched only for the last frame and reused for golden and altref frames with different resolutions.

    Seen in 1 report
  45. Scripting methods do not check the type of user-supplied data before using it.

    Seen in 1 report
  46. Sector count and sector size were multiplied in a 32-bit integer without an overflow check, so the allocation wrapped small while the copy loop still wrote the full number of entries.

    Seen in 1 report
  47. Secure coding is disabled and no class allowlist is used when decoding archived objects.

    Seen in 1 report
  48. Selecting a bitmap into a different device context updates only one field and leaves a stale device pointer and hook flags.

    Seen in 1 report
  49. Separate variables for copy length and buffer allocation size are used with insufficient validation, allowing the allocation to be smaller than the copy.

    Seen in 1 report
  50. Sequence parameters are only re-checked on IRAP pictures, so a non-IRAP slice can change resolution without triggering buffer reallocation.

    Seen in 1 report