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,651 to 3,700 of 3,817
  1. The typer omitted the negative-zero case for a maths builtin, so a comparison against negative zero was typed as always false and a bounds check was removed.

    Seen in 1 report
  2. The uncompressed header parser reads 16-bit dimensions and adds one without comparing against the maximum dimension limit.

    Seen in 1 report
  3. The undefined-behaviour isolation mechanism wrapped loops but did not protect against out-of-bounds accesses inside them.

    Seen in 1 report
  4. The unescape routine does not check that two characters follow a percent sign before shifting the rest of the string left, causing an out-of-bounds read and write.

    Seen in 1 report
  5. The uniqueness check for pattern strings exists only in debug builds, so release builds allow duplicates to overflow the edge array.

    Seen in 1 report
  6. The unmarshalling code frees a buffer without updating the remaining length or invalidating the pointer, so a later copy writes to freed memory.

    Seen in 1 report
  7. The untagged phi optimisation assumed a value would always be a small integer and did not account for a heap number being assigned.

    Seen in 1 report
  8. The unwinder's switch omitted the WebAssembly-to-JavaScript frame type, so stack-switch information was never cleared and the collector computed a wrong parameter limit.

    Seen in 1 report
  9. The upload handler copied the fileparam parameter into a fixed stack buffer without validating its length.

    Seen in 1 report
  10. The upmix path substituted a fixed 640-frame silent buffer for missing channels but iterated over the chunk's own duration, which can exceed 640 frames.

    Seen in 1 report
  11. The URL path parser stores a non-owning pointer into the share buffer, which is freed on connection reuse while the path pointer is not cleared.

    Seen in 1 report
  12. The URL was copied into a fixed-size stack buffer without a length check before being compared against the XSS blacklist.

    Seen in 1 report
  13. The user name parameter is copied into a fixed-size stack buffer without checking its length.

    Seen in 1 report
  14. The userdata field of a reused Varlink struct held two different object types across back-to-back requests.

    Seen in 1 report
  15. The username field from the network message is copied with an unbounded string copy into a stack buffer smaller than the maximum message length.

    Seen in 1 report
  16. The username parameter is extracted with a maximum length larger than the destination buffer and then copied with an unbounded string copy.

    Seen in 1 report
  17. The utility process does not check that clear plus encrypted byte counts match the actual buffer size before creating a sample.

    Seen in 1 report
  18. The utility process entry point omitted the Skia initialisation call, leaving process-global flags on the insecure C++ parser defaults.

    Seen in 1 report
  19. The UVC driver allocated a frame buffer without accounting for the undefined frame subtype, so the filling pass wrote past the end.

    Seen in 1 report
  20. The V8 context is created without a dedicated microtask queue, so pending microtasks from terminated execution run later against deallocated bindings.

    Seen in 1 report
  21. The validation loop took the required size from the last uniform block processed rather than keeping the maximum.

    Seen in 1 report
  22. The variable number from the file is used directly as an index into the fixed-size parameter array without a bounds check.

    Seen in 1 report
  23. The variable-length header is decoded without validating the resulting length, and a later pointer comparison overflows so the end pointer wraps around.

    Seen in 1 report
  24. The variable-name extraction called the value accessor on a token without checking that the token was string-backed, so uninitialised length and pointer fields were used.

    Seen in 1 report
  25. The vendored library snapshot predates security fix commits merged upstream and no cherry-picks of those commits exist in the patch stack.

    Seen in 1 report
  26. The verifier derived known bits for the low half of a register from the unsigned minimum and maximum alone, ignoring values in between.

    Seen in 1 report
  27. The verifier's 32-bit bounds tracking used 64-bit register values, so the computed range was wrong.

    Seen in 1 report
  28. The version is not removed from the live versions map before synchronous observers are notified.

    Seen in 1 report
  29. The vertex array deletion handler fails to mark the element array binding dirty, so the decoder cache goes stale after the driver reverts the binding.

    Seen in 1 report
  30. The vertex buffer was not initialised before drawArrays, so a uniform access added an offset to a null pointer.

    Seen in 1 report
  31. The vertex index starts at minus one and the bounds check passes for positive maximums, so an index calculation writes before the start of the array.

    Seen in 1 report
  32. The view destructor does not clear the focus change observer it registered on the window.

    Seen in 1 report
  33. The virtual SCSI adapter used an object after freeing it because it did not check the object still existed first.

    Seen in 1 report
  34. The visibility check fails to account for content-visibility hidden, so a layout object is freed during style recalculation but still used later in the selection code.

    Seen in 1 report
  35. The visibility-change handler updates transient children without checking whether the manager object was destroyed during the loop.

    Seen in 1 report
  36. The VM does not check the size of the array being assigned, so it writes beyond the allocated stack buffer.

    Seen in 1 report
  37. The VM keeps a pointer to a stack or call frame that is reallocated while a method_missing call is dispatched, so it writes through a stale reference.

    Seen in 1 report
  38. The VM keeps a pointer to the stack buffer across a call that can reallocate the stack.

    Seen in 1 report
  39. The VM stack is reallocated mid-rescue and a stale pointer to the old stack is written to.

    Seen in 1 report
  40. The VM's call stack is reallocated during a type conversion that raises an exception, leaving a stale pointer that is then written to.

    Seen in 1 report
  41. The VRDP service does not properly validate the size or content of USB request messages.

    Seen in 1 report
  42. The waiter removal function assumes the current task is the waiter, but on the proxy path it is the requeuer, so it clears the wrong task's blocked pointer.

    Seen in 1 report
  43. The Wasm deoptimisation path omitted the stack limit checks the JavaScript path enforces and reserved no extra stack slack.

    Seen in 1 report
  44. The wc_statemach function recurses for each file in a directory listing, leading to stack exhaustion with a large number of files.

    Seen in 1 report
  45. The weak pointer factory is invalidated on the main thread without the class lock while a background thread may call for a weak pointer under the lock.

    Seen in 1 report
  46. The weapon id from the network message is used directly as an array index without a bounds check.

    Seen in 1 report
  47. The web server and SDK code failed to validate the length of user input before copying it into fixed-size buffers.

    Seen in 1 report
  48. The web view deallocation path does not nullify the navigation manager pointer in its associated back-forward list, unlike the explicit shutdown method.

    Seen in 1 report
  49. The WebSocket object is freed when its frame is detached during a document reload, but a subsequent call to close() still accesses the freed object.

    Seen in 1 report
  50. The whitespace-skipping loop advances both pointers after a space without checking that one string has ended, so a null byte lets a pointer move past its buffer.

    Seen in 1 report