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 201 to 250 of 3,817
  1. A memory resource is used before it has been initialised, letting crafted input steer writes or leak data.

    Seen in 8 reports
  2. A resource is accessed using an incompatible type, causing type confusion and memory corruption.

    Seen in 8 reports
  3. Unsafe integer arithmetic such as overflow, underflow, wraparound and truncation of size or length values is a root cause.

    Seen in 8 reports
  4. Database and JSON field values copied into fixed-size stack buffers with strcpy, strncpy, memcpy or sprintf without a length check.

    Seen in 8 reports
  5. Insufficient input validation or bounds checking when parsing media files.

    Seen in 8 reports
  6. Integer overflow, underflow or wraparound not handled safely before use.

    Seen in 8 reports
  7. Kernel components mishandle object lifetimes or pointers, allowing a crafted local application to corrupt memory.

    Seen in 8 reports
  8. Numeric truncation, integer overflow or underflow is not handled safely before a size calculation or memory write.

    Seen in 8 reports
  9. Objects are freed and then referenced again while processing crafted documents.

    Seen in 8 reports
  10. Objects are freed while still referenced, often because a synchronous callback or nested loop destroys the owner mid-operation.

    Seen in 8 reports
  11. PDF editor object handling uses objects after they are freed because their existence is not checked before use.

    Seen in 8 reports
  12. PDF form fields use objects after they are freed without checking they still existed.

    Seen in 8 reports
  13. File format parsers trust size or length fields in the file and copy or read data without checking it fits the destination or source buffer.

    Seen in 8 reports
  14. Size and offset values from files are used in arithmetic without overflow or underflow checks, so allocations are too small or checks wrap around.

    Seen in 8 reports
  15. Size calculations overflow, underflow or truncate before allocation.

    Seen in 8 reports
  16. The parser copies user-supplied data into a fixed-size buffer without checking the supplied length first.

    Seen in 8 reports
  17. The scripting engine mishandled objects in memory, leading to memory corruption.

    Seen in 8 reports
  18. The software does not check the length or size of data read from DPA files before copying it into a fixed-size buffer.

    Seen in 8 reports
  19. The webproc CGI handler copies request parameters into fixed-length buffers without checking their length.

    Seen in 8 reports
  20. Use-after-free where an object is freed while still reachable or reused.

    Seen in 8 reports
  21. User-controlled strings are copied into fixed-size buffers with functions that do not take a length limit.

    Seen in 8 reports
  22. A recurring mistake is copying a user-controlled length into a fixed-size buffer without checking that it fits.

    Seen in 7 reports
  23. A resource is accessed using an incompatible type, or a value from a file is used as a pointer without validation.

    Seen in 7 reports
  24. A user-supplied index or length was used to access an array or buffer without validating it against the real size.

    Seen in 7 reports
  25. An object is used after being freed, exploitable through a race condition.

    Seen in 7 reports
  26. Callbacks invoked during a method could synchronously destroy the object, and the code kept using its members afterwards.

    Seen in 7 reports
  27. Code frees an object and later uses a pointer to it without checking that it still exists.

    Seen in 7 reports
  28. Data is copied into a fixed-size stack buffer without a length check.

    Seen in 7 reports
  29. Data size is not checked before copying into a heap buffer.

    Seen in 7 reports
  30. Double free where the same memory is released more than once.

    Seen in 7 reports
  31. Input lengths or sizes are not checked before copying into fixed-size heap or stack buffers.

    Seen in 7 reports
  32. Integer overflow, underflow or wraparound in size and offset calculations used unsafely.

    Seen in 7 reports
  33. Length and size fields in file and network formats were trusted without bounds checks, leading to overflows.

    Seen in 7 reports
  34. Length or offset values read from the file used without checking them against the allocated buffer size.

    Seen in 7 reports
  35. Length, size or offset values from input are trusted without checking them against the destination buffer.

    Seen in 7 reports
  36. Lengths, offsets and element counts from files are trusted, causing reads before or past buffers.

    Seen in 7 reports
  37. Reading data in a USB driver lacks a bounds check.

    Seen in 7 reports
  38. Packet capture parsers lack bounds checks before reading fields from packet buffers.

    Seen in 7 reports
  39. Missing bounds checks when reading data allow reads past the end of a buffer.

    Seen in 7 reports
  40. Several drawing routines of the display driver lack NULL checks before dereferencing pointers.

    Seen in 7 reports
  41. Network or file input is copied into a fixed-size stack buffer without bounds checking.

    Seen in 7 reports
  42. The cycle collector frees objects while they are still referenced elsewhere, giving use-after-free.

    Seen in 7 reports
  43. File format parsers copy user-supplied lengths into fixed-size stack buffers without checking the length first.

    Seen in 7 reports
  44. Parsers read or write past allocated buffers because the size and structure of file data are not validated.

    Seen in 7 reports
  45. File format parsers trust size or length fields in the file without checking them against the allocated buffer.

    Seen in 7 reports
  46. File format parsers trust size or offset fields in the file without checking them against the actual buffer size.

    Seen in 7 reports
  47. File format parsers trusted length or offset values from the file without comparing them to the real buffer size.

    Seen in 7 reports
  48. CAD file parsers use objects after freeing them because they do not check that the object still exists.

    Seen in 7 reports
  49. Router tmpServer handlers trust payload lengths and TLV counts and use them in copies into fixed buffers without bounds checks.

    Seen in 7 reports
  50. Size or offset fields in files are trusted without checking them against the real buffer length.

    Seen in 7 reports