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,401 to 2,450 of 3,817
  1. Server-returned identifier names are copied into fixed-size stack buffers without a length check, assuming the server enforces limits.

    Seen in 1 report
  2. 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
  3. Session key handling copies attacker-controlled data into a fixed-size heap buffer without validating its length.

    Seen in 1 report
  4. 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
  5. SetConfig commits the new configuration to internal state before validating it, so a failed call leaves invalid configuration cached.

    Seen in 1 report
  6. 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
  7. Setting a handler triggers a storage access check that frees internal memory, then the code continues to use it.

    Seen in 1 report
  8. 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
  9. 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
  10. 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
  11. 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
  12. The shader compiler fails to properly validate the ATOMIC_ADD instruction, leading to an out-of-bounds write.

    Seen in 1 report
  13. 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
  14. Shadow page structures were reused without sufficient validation, giving a use-after-free.

    Seen in 1 report
  15. Shared member variables and Mojo remotes are mutated from the UI thread without synchronisation while the VSync thread reads them.

    Seen in 1 report
  16. Shared member variables are read and written by the main and video threads without locking or sequence checking.

    Seen in 1 report
  17. Shared memory path data was validated before it was copied, leaving a time-of-check time-of-use window.

    Seen in 1 report
  18. 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
  19. Shared ownership state of packet fragments is not propagated during a zero-copy transfer.

    Seen in 1 report
  20. Shared parser state is tracked incorrectly, so the generated WebAssembly stream is malformed before decoding.

    Seen in 1 report
  21. Short-circuit evaluation in a loop of callbacks skips later items while transports are still destroyed unconditionally.

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

    Seen in 1 report
  23. A signed integer is passed to a function expecting an unsigned size, so a negative value is interpreted as a huge positive number.

    Seen in 1 report
  24. A signed subtraction result is assigned to an unsigned size variable without checking for negative values, causing wraparound.

    Seen in 1 report
  25. Size and length values from the stream are trusted before writing into fixed-size buffers.

    Seen in 1 report
  26. Size and offset fields in the file are trusted without checking them against the actual buffer length.

    Seen in 1 report
  27. Size calculation doubled the input length and only checked for wraparound after the multiplication.

    Seen in 1 report
  28. Size calculation saturates at the integer maximum while offset calculation sums field sizes without the same clamping.

    Seen in 1 report
  29. The size check passes incorrectly when the stream size is larger than the fixed buffer.

    Seen in 1 report
  30. 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
  31. 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
  32. Size validation and allocation used raw 32-bit multiplication instead of checked arithmetic.

    Seen in 1 report
  33. 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
  34. A size value from the uploaded file is used in arithmetic without bounds checking, causing an integer overflow before allocation.

    Seen in 1 report
  35. Size values from the input were used without validation, causing an integer underflow before writing to memory.

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

    Seen in 1 report
  38. SLC triplets were written into a fixed-size global buffer without checking the number of entries.

    Seen in 1 report
  39. 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
  40. Socket buffer coalescing fails to preserve shared-fragment tracking metadata, so memory-backed fragments are treated as safe to modify.

    Seen in 1 report
  41. Software does not properly validate the size or structure of data in 3GP files before reading it.

    Seen in 1 report
  42. Some callback paths invoked the application callback without setting the active-callback flag, so recursive API checks never ran.

    Seen in 1 report
  43. Space is allocated for a string but not for its terminating null byte, so later string functions read past the buffer.

    Seen in 1 report
  44. Spread argument handling allocated stack space per element without checking available space.

    Seen in 1 report
  45. The sscanf format did not limit characters copied into fixed-size stack buffers.

    Seen in 1 report
  46. Stack maps were installed at the wrong offset so the garbage collector missed roots.

    Seen in 1 report
  47. 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
  48. Status Information Element data was copied into a fixed-length stack buffer without a length check.

    Seen in 1 report
  49. strcpy copied a base64 nonce into a fixed-size buffer without checking the input length.

    Seen in 1 report
  50. strcpy is used without checking the source length against the destination buffer size.

    Seen in 1 report