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,751 to 2,800 of 3,817
  1. 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.

    Seen in 1 report
  2. 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
  3. 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
  4. The content stream type was not validated, so a text object stream was treated as a CharProcs stream.

    Seen in 1 report
  5. 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
  6. The context-destroyed callback reset the context provider but not the scoped secondary draw state.

    Seen in 1 report
  7. The controller checks its own lifetime but not a raw menu item pointer that a re-entrant call can destroy.

    Seen in 1 report
  8. 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
  9. The controller's existence is not checked after a synchronous authentication call that spins a nested run loop.

    Seen in 1 report
  10. The conversion function used a 4-byte output stride for a 2-byte-per-pixel staging texture format.

    Seen in 1 report
  11. 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.

    Seen in 1 report
  12. The conversion routine copied user-supplied data into a fixed-length stack buffer without checking its length.

    Seen in 1 report
  13. 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
  14. The copy constructor keeps a stale facet count after degenerate facets are removed, so later writes pass the bounds check.

    Seen in 1 report
  15. The copy into a fixed destination buffer was done without checking that the input array length matched the buffer size.

    Seen in 1 report
  16. The copy is clamped but the terminating NUL write uses the unclamped field width.

    Seen in 1 report
  17. The copy length came from the whole buffer capacity rather than the dirty range size.

    Seen in 1 report
  18. 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
  19. The copy length was taken from the attacker-supplied input rather than the destination buffer size, overflowing a fixed stack buffer.

    Seen in 1 report
  20. 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
  21. 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
  22. 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
  23. The crash reporter module trusted a process type value stored in the crashing process's own memory.

    Seen in 1 report
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. The decoder checked one metadata field to enter a parsing path but used a different field as the loop increment.

    Seen in 1 report
  30. 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
  31. The decoder checks destination capacity but not remaining input length before copying.

    Seen in 1 report
  32. The decoder checks the x-coordinate but not the y-coordinate before writing pixels.

    Seen in 1 report
  33. The decoder confuses incomplete input with invalid input and keeps processing after a block-type switch error.

    Seen in 1 report
  34. The decoder did not check the sample buffer was large enough for the LPC order and block size.

    Seen in 1 report
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. The decoder trusted the run-length packet count without checking it against the allocated scanline buffer size.

    Seen in 1 report
  41. 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
  42. The decompressed or copied length is not checked against the remaining space of a destination buffer sized independently from the file-controlled length.

    Seen in 1 report
  43. 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
  44. The decompression loop subtracts the length from the remaining size but never checks the length against the buffer size before writing.

    Seen in 1 report
  45. The decompression routine copies user data into a fixed-length stack buffer without checking its length.

    Seen in 1 report
  46. The decompression routine trusts a length from the compressed file without comparing it to the destination buffer size.

    Seen in 1 report
  47. The decrypted buffer size is calculated from the IV and encrypted size without checking it against the encrypted buffer.

    Seen in 1 report
  48. 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
  49. The decryption routine did not validate the authentication tag length before reading it.

    Seen in 1 report