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.
-
The connection send-window counter was restored without checking the HTTP/2 maximum, so a later subtraction underflowed and the oversized value was cast to a signed response length.
-
The constant lookup returns strings without checking they are safe to read on a background thread, unlike the equivalent check in the optimising compiler.
Seen in 1 report
-
The constructor attached the new view to the buffer before re-checking whether the buffer had been detached during the user-controlled length conversion.
Seen in 1 report
-
The content stream type was not validated, so a text object stream was treated as a CharProcs stream.
Seen in 1 report
-
The context pointer is incremented unconditionally after the encoding loop even when the loop breaks on the first iteration without decrementing.
Seen in 1 report
-
The context-destroyed callback reset the context provider but not the scoped secondary draw state.
Seen in 1 report
-
The controller checks its own lifetime but not a raw menu item pointer that a re-entrant call can destroy.
Seen in 1 report
-
The controller is deallocated synchronously inside its own action handler because automatic reference counting does not retain self for the duration of the method.
Seen in 1 report
-
The controller's existence is not checked after a synchronous authentication call that spins a nested run loop.
Seen in 1 report
-
The conversion function used a 4-byte output stride for a 2-byte-per-pixel staging texture format.
Seen in 1 report
-
The conversion parser set a long-double flag but never mapped floating-point conversions to a long-double type, so the argument was always read as a double.
-
The conversion routine copied user-supplied data into a fixed-length stack buffer without checking its length.
-
The coordinator stored a raw pointer to the web state instead of a weak or observed reference, so it was not invalidated on destruction.
Seen in 1 report
-
$2,000 Medium
-
-
The copy constructor keeps a stale facet count after degenerate facets are removed, so later writes pass the bounds check.
Seen in 1 report
-
The copy into a fixed destination buffer was done without checking that the input array length matched the buffer size.
Seen in 1 report
-
The copy is clamped but the terminating NUL write uses the unclamped field width.
-
The copy length came from the whole buffer capacity rather than the dirty range size.
Seen in 1 report
-
$16,000 High
-
-
The copy length is set from the volume sector size without checking the caller's output buffer is at least that large.
Seen in 1 report
-
The copy length was taken from the attacker-supplied input rather than the destination buffer size, overflowing a fixed stack buffer.
-
The copy loop ignored the boolean result of the map insertion and treated the last backing element as the new one.
Seen in 1 report
-
The copy size was calculated from file-controlled values while the destination buffer used a different calculation, so the two did not match.
Seen in 1 report
-
The CPU fallback copy calls the native buffer unbind path directly, bypassing the frontend state tracker so its dirty bits are never set.
Seen in 1 report
-
$97,000 Critical
-
-
The crash reporter module trusted a process type value stored in the crashing process's own memory.
Seen in 1 report
-
The credential validation function copied an attacker-controlled body into a 128-byte stack buffer without checking that it fits, while the XDR layer allowed up to 400 bytes.
Seen in 1 report
-
The cube size function multiplied grid dimensions without an overflow check, and the caller multiplied the result by the output channel count unchecked.
Seen in 1 report
-
The custom event notification takes the element as a bare pointer by value, unlike the shown and activated paths which use a checked raw pointer.
Seen in 1 report
-
The datapath clears the shared-frag flag on a packet it continues to forward, so an in-place decrypt writes over shared page-cache pages.
Seen in 1 report
-
The decoded input length is multiplied by two without checking for overflow before allocation, so a very large input causes a small allocation and a buffer overflow.
Seen in 1 report
-
The decoder checked one metadata field to enter a parsing path but used a different field as the loop increment.
Seen in 1 report
-
The decoder checked only individual section sizes, not the total module size, so a module could exceed the limit and cause offset truncation in constant expressions.
Seen in 1 report
-
$55,000 High
-
-
The decoder checks destination capacity but not remaining input length before copying.
-
The decoder checks the x-coordinate but not the y-coordinate before writing pixels.
Seen in 1 report
-
The decoder confuses incomplete input with invalid input and keeps processing after a block-type switch error.
Seen in 1 report
-
The decoder did not check the sample buffer was large enough for the LPC order and block size.
Seen in 1 report
-
The decoder did not check the sequence header's maximum frame dimensions against the platform dimension limit before configuring hardware decoders.
Seen in 1 report
-
The decoder only re-evaluates picture dimensions when the first-slice flag is set, and hardware delegates trust the parameter set dimensions without checking the surface size.
Seen in 1 report
-
The decoder records new texture dimensions and the immutable flag before the native storage call and has no trailing error check or rollback.
Seen in 1 report
-
The decoder reference is updated with the new channel configuration before all setup succeeds, and on failure the staging buffers are not reallocated or cleared.
Seen in 1 report
-
The decoder sized the tile-part index array from TLM entries but set the current tile-part number from the SOT marker without validating it against the declared count.
Seen in 1 report
-
The decoder trusted the run-length packet count without checking it against the allocated scanline buffer size.
Seen in 1 report
-
The decoder uses an attacker-controlled run-length count to copy bytes into a heap buffer without validating that the count fits the allocation.
Seen in 1 report
-
The decompressed or copied length is not checked against the remaining space of a destination buffer sized independently from the file-controlled length.
-
The decompression loop does not validate table entries, allowing a circular reference and an out-of-bounds write to a static buffer.
Seen in 1 report
-
The decompression loop subtracts the length from the remaining size but never checks the length against the buffer size before writing.
-
The decompression routine copies user data into a fixed-length stack buffer without checking its length.
-
The decompression routine trusts a length from the compressed file without comparing it to the destination buffer size.
-
The decompression wrapper checks only for a zero return and stores the signed result in an unsigned size type.
-
The decrypted buffer size is calculated from the IV and encrypted size without checking it against the encrypted buffer.
Seen in 1 report
-
The decryption function read a 16-bit length field without checking the parameter area existed and did not reduce the remaining buffer size after advancing past it.
Seen in 1 report
-
The decryption routine did not validate the authentication tag length before reading it.
Seen in 1 report