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.
-
A buffer size is computed from untrusted values without an overflow check, so the allocation is smaller than the data written.
-
A buffer size is computed with a 32-bit shift that becomes undefined when the exponent reaches 32, leading to an undersized allocation.
Seen in 1 report
-
A buffer size stored as a jump offset was truncated from a larger unsigned type to a signed 32-bit type without an overflow check.
Seen in 1 report
-
A buffer used while painting colour glyphs was reallocated and shrunk by another thread while still being read.
Seen in 1 report
-
$7,000 High
-
-
A buffer was allocated from one size field but filled using a second, larger size field without validation.
Seen in 1 report
-
A buffer was allocated from the PropertySet size field but written using the unchecked NumProperties field.
-
A buffer was allocated using one length from the message but filled using a second, larger length from the same message.
Seen in 1 report
-
A buffer was freed and then accessed again, giving a double free.
Seen in 1 report
-
A buffer was reallocated but the stale pointer to the old buffer was still used.
Seen in 1 report
-
A bug in scope analysis causes type confusion that can be turned into arbitrary read and write.
Seen in 1 report
-
A builtin's declared effects say no-throw and no-write, but it can call back into JavaScript through an accessor and write memory.
Seen in 1 report
-
$2,500 Medium
-
-
A byte count reported by the TLS backend is trusted without validating it against the remaining length.
Seen in 1 report
-
A byte from the file is used as a loop counter without bounds checking.
Seen in 1 report
-
A byte offset derived from the side-information bit position was added to the frame base without checking the tag identifier still lay inside the buffer.
Seen in 1 report
-
A byte offset is treated as an array index, and a feature handler does not check that offset plus copy length stays within the target structure.
Seen in 1 report
-
A byte-oriented length helper was applied to whole wide characters, so the surrogate check inspected only the low byte and misclassified characters.
-
A C++ exception thrown by a JavaScript binding is caught during nested execution, leaving the engine runtime inconsistent.
Seen in 1 report
-
A C++ reference into a hash map backing store is held across a call that can trigger a synchronous garbage collection which shrinks the map.
Seen in 1 report
-
A cache assertion compares the stored mapped surface against the requested surface, so a different surface sharing the same mapped surface can receive cached memory.
-
A cache check compares format and extents but not the texture resource type.
Seen in 1 report
-
A cache is not invalidated when the underlying address changes, so old translations are reused.
-
A cache key omits a backend-specific size field, so entries with different real sizes alias.
Seen in 1 report
-
A cache lookup returned a reference to an entry after releasing the lock, so a concurrent trim could free it.
Seen in 1 report
-
$16,000 High
-
-
A cache of raw pointers is left populated after the handler stops observing the service.
Seen in 1 report
-
A cached DOM-side buffer did not observe detachment performed directly in the script engine and kept treating the backing store as valid.
Seen in 1 report
-
A cached or referenced object is freed and then dereferenced again when the application closes.
Seen in 1 report
-
A callback assumes a fixed argument count and uses fixed stack loads and cleanup regardless of the actual count.
Seen in 1 report
-
A callback bound with an unretained pointer does not keep the message handler alive, so it runs after the handler is destroyed.
Seen in 1 report
-
$1,000 Medium
-
-
A callback bound with an unretained pointer synchronously deletes the owning window, and the caller then writes to a member of the freed observer.
Seen in 1 report
-
A callback can erase the element an iterator points at, and the invalidated iterator is then used.
Seen in 1 report
-
A callback closure held the only reference to the socket, so resetting it inside the release method destroyed the object mid-call.
Seen in 1 report
-
A callback holding raw view pointers is passed to an asynchronous authenticator without a weak pointer, and hide paths other than navigation do not cancel it.
Seen in 1 report
-
A callback holds a raw pointer to a WebContents object without keeping it alive.
Seen in 1 report
-
$3,000 High
-
-
A callback is bound with base::Unretained to the provider pointer, assuming the sub-object cannot outlive the provider.
Seen in 1 report
-
Critical
-
-
A callback is posted via a weak pointer but the object's lifetime is not kept alive until the task runs.
Seen in 1 report
-
$7,000 Medium
-
-
A callback loop runs code that can re-enter and mutate the collection being iterated, invalidating the iterator.
Seen in 1 report
-
A callback member is read and written from two threads without a lock and the delegate does not hop back to the device thread.
Seen in 1 report
-
A callback member is written on one thread and read on another without synchronisation.
Seen in 1 report
-
A callback owning a UI-thread-bound object is cancelled on a background sequence, so its destructor runs off the UI thread.
Seen in 1 report
-
A callback ran without holding the sink lock, violating the thread-safety contract and using stale state.
Seen in 1 report
-
A callback registered with an unretained pointer can fire after the object has self-deleted, causing a use-after-free.
Seen in 1 report
-
A callback was bound with an unretained pointer and posted as a deferred task, so it did not keep the owning object alive.
Seen in 1 report
-
A callbacks hash map is read and modified from two threads without synchronisation.
Seen in 1 report
-
A caller-supplied length or buffer size was trusted without checking it against the allocated buffer.
-
A cancellation callback deletes the profile state from its owning map while the caller still holds a bare stack pointer to it.
Seen in 1 report
-
A cancellation handler block captures a raw pointer to the download item instead of a safe reference, so the task can run after destruction.
Seen in 1 report
-
A canonical type id is passed into a constructor expecting a narrower heap type, silently truncating the value.
Seen in 1 report
-
A canvas filter observer holds a pointer to an element that the cycle collector frees before the observer is destroyed.
Seen in 1 report
-
A canvas object was destroyed twice because ownership was not tracked.
-
A capability number exceeds the size of the capability set structure when rendered to text.
Seen in 1 report