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.
-
Server-returned identifier names are copied into fixed-size stack buffers without a length check, assuming the server enforces limits.
-
Session history does not hold a strong reference to the browsing context it walks, so it can be freed before it is dereferenced.
Seen in 1 report
-
Session key handling copies attacker-controlled data into a fixed-size heap buffer without validating its length.
Seen in 1 report
-
Set configuration destroys interface claimer objects synchronously on the main thread, violating the library's threading expectations and racing with concurrent use.
Seen in 1 report
-
SetConfig commits the new configuration to internal state before validating it, so a failed call leaves invalid configuration cached.
Seen in 1 report
-
SetPrototype only checked the target object, not the prototype value, so a WebAssembly object could be set as a prototype and later cast to a plain object.
Seen in 1 report
-
$10,000 High
-
-
Setting a handler triggers a storage access check that frees internal memory, then the code continues to use it.
Seen in 1 report
-
Setting the prelude text swapped only the wrapper's internal rule pointer without updating the stylesheet's rule graph, so a later index-based reattach cast a plain style rule to a grouping rule.
Seen in 1 report
-
Several layers each omitted the check that a YCbCr sampler must use clamp-to-edge address modes, so an invalid descriptor reached the driver.
Seen in 1 report
-
Several separate coding errors in the regular expression compiler and matcher, such as mishandled octal escapes, wrong validation order, uninitialised variables and invalid pointer arithmetic.
Seen in 1 report
-
The shader compiler failed to validate the index value supplied by the DCL_INDEXABLETEMP instruction before using it in a destination address calculation.
Seen in 1 report
-
The shader compiler fails to properly validate the ATOMIC_ADD instruction, leading to an out-of-bounds write.
Seen in 1 report
-
The shader compiler uses the attacker-supplied output register number as an unchecked index when calculating the destination address for a write.
Seen in 1 report
-
Shadow page structures were reused without sufficient validation, giving a use-after-free.
-
Shared member variables and Mojo remotes are mutated from the UI thread without synchronisation while the VSync thread reads them.
Seen in 1 report
-
Shared member variables are read and written by the main and video threads without locking or sequence checking.
Seen in 1 report
-
Shared memory path data was validated before it was copied, leaving a time-of-check time-of-use window.
Seen in 1 report
-
Shared mutable shift-position state can be set by nested subexpressions and then used to truncate the generated body, while the direct-call offset list is not pruned before serialisation.
Seen in 1 report
-
Shared ownership state of packet fragments is not propagated during a zero-copy transfer.
-
Shared parser state is tracked incorrectly, so the generated WebAssembly stream is malformed before decoding.
-
Short-circuit evaluation in a loop of callbacks skips later items while transports are still destroyed unconditionally.
Seen in 1 report
-
Signal lengths from the file are not checked against the actual data buffer before a memory copy, and a signed/unsigned mismatch allows a negative length.
-
A signed integer is passed to a function expecting an unsigned size, so a negative value is interpreted as a huge positive number.
-
A signed subtraction result is assigned to an unsigned size variable without checking for negative values, causing wraparound.
-
Size and length values from the stream are trusted before writing into fixed-size buffers.
-
Size and offset fields in the file are trusted without checking them against the actual buffer length.
Seen in 1 report
-
Size calculation doubled the input length and only checked for wraparound after the multiplication.
Seen in 1 report
-
Size calculation saturates at the integer maximum while offset calculation sums field sizes without the same clamping.
Seen in 1 report
-
The size check passes incorrectly when the stream size is larger than the fixed buffer.
Seen in 1 report
-
A size check subtracts one from an unsigned buffer size without guarding against zero, so the value underflows and bypasses the bounds check.
Seen in 1 report
-
Size fields from the file are not validated, so a crafted value overflows and leads to an out-of-bounds write.
Seen in 1 report
-
Size validation and allocation used raw 32-bit multiplication instead of checked arithmetic.
Seen in 1 report
-
Size validation only checked that stride times height fitted in shared memory and never checked that stride was at least width times bytes per pixel.
Seen in 1 report
-
A size value from the uploaded file is used in arithmetic without bounds checking, causing an integer overflow before allocation.
-
Size values from the input were used without validation, causing an integer underflow before writing to memory.
Seen in 1 report
-
Size values were passed directly to a printf precision argument that expects an int, without checking they were non-negative and within range.
Seen in 1 report
-
Size variables used when building the translated pipe path were 16-bit unsigned values, so a long name overflowed the allocation size and a later subtraction underflowed the string length.
-
SLC triplets were written into a fixed-size global buffer without checking the number of entries.
-
slice_qp_delta was read with no range validation, unlike neighbouring offset fields, and was narrowed from int to int8_t when building the VA-API slice parameter buffer.
Seen in 1 report
-
Socket buffer coalescing fails to preserve shared-fragment tracking metadata, so memory-backed fragments are treated as safe to modify.
Seen in 1 report
-
Software does not properly validate the size or structure of data in 3GP files before reading it.
-
Some callback paths invoked the application callback without setting the active-callback flag, so recursive API checks never ran.
-
Space is allocated for a string but not for its terminating null byte, so later string functions read past the buffer.
-
Spread argument handling allocated stack space per element without checking available space.
Seen in 1 report
-
The sscanf format did not limit characters copied into fixed-size stack buffers.
Seen in 1 report
-
Stack maps were installed at the wrong offset so the garbage collector missed roots.
-
Stale pipe buffer flags were not cleared when a pipe buffer was reused, allowing a read-only buffer to be written into the page cache.
Seen in 1 report
-
Status Information Element data was copied into a fixed-length stack buffer without a length check.
-
strcpy copied a base64 nonce into a fixed-size buffer without checking the input length.
Seen in 1 report
-
strcpy is used without checking the source length against the destination buffer size.
Seen in 1 report