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 3,151 to 3,200 of 3,817
  1. The LZW decoder does not check that the Predictor value is positive, so a negative value frees the object while a stale reference remains.

    Seen in 1 report
  2. The MAC context was allocated without zeroing, leaving callback pointers uninitialised, and a cleanup callback was still invoked during rekeying.

    Seen in 1 report
  3. The main function did not check that the argument count was greater than zero, so it read and wrote out of bounds at the first argument slot.

    Seen in 1 report
  4. The main process uses a worker-controlled index into the all_buckets array without bounds checking.

    Seen in 1 report
  5. The main scoreboard and its pointer array sit in shared memory writable by unprivileged workers.

    Seen in 1 report
  6. The make42charstring method copies user-supplied data into a fixed-length stack buffer without checking the length.

    Seen in 1 report
  7. The map iteration source accessed the map's internal storage after it had been freed during iteration.

    Seen in 1 report
  8. The map length is the full buffer size rather than the remaining size after the offset.

    Seen in 1 report
  9. The map of URL rewrite rules providers is accessed from multiple threads without locking, so a worker can read a pointer the main thread has freed.

    Seen in 1 report
  10. The mapped buffer manager was destroyed before the queue manager, so callbacks run during queue manager destruction accessed freed memory.

    Seen in 1 report
  11. The mapped handler lacks a weak pointer guard after calling maximise, so a synchronous observer can delete the window object.

    Seen in 1 report
  12. The mapping hysteresis state advances before the mapping call and is not rolled back on failure, so a later fast path returns success with a null pointer.

    Seen in 1 report
  13. The mark function uses a non-looping compare-exchange and assumes failure means the bit is set, while publish and unpublish use a plain store that can overwrite a concurrent mark.

    Seen in 1 report
  14. The maximum element index is narrowed from unsigned 64-bit to signed 32-bit before the vertex buffer bounds check, so large indices become negative and pass.

    Seen in 1 report
  15. The maximum handle value is not validated before use in allocation arithmetic, so the addition or multiplication wraps.

    Seen in 1 report
  16. The maximum manual reference frames was taken from the decoded picture buffer capacity instead of the long-term reference capacity.

    Seen in 1 report
  17. The maximum message size check uses signed 64-bit arithmetic that can overflow to a negative value.

    Seen in 1 report
  18. The mDNS packet handler copies user-supplied data into a fixed-length stack buffer without validating its length.

    Seen in 1 report
  19. The media session service object is destroyed on disconnect while the implementation still holds a raw pointer and dereferences it during navigation.

    Seen in 1 report
  20. The media stream kept a raw pointer to the media element and invoked a notification after the element had been collected.

    Seen in 1 report
  21. The mediator stored the web state as a raw, non-observed pointer that was never cleared when the web state was destroyed.

    Seen in 1 report
  22. The mediator stores raw pointers to password form objects owned by a cache that is destroyed on navigation, and the sheet is not dismissed on same-tab navigation.

    Seen in 1 report
  23. The memory access functions only check four-byte alignment, not whether the address is within the intended range.

    Seen in 1 report
  24. The menu teardown freed the root popup menu but never nulled the pointer, and a user-mode callback allowed re-entry.

    Seen in 1 report
  25. The merge condition fails to check the duplicate base vertex instance flag, allowing batches with different requirements to be merged.

    Seen in 1 report
  26. The mesh identifier option length was not checked against the destination buffer before a memory copy.

    Seen in 1 report
  27. The MeshId information element length is not checked before a memcpy into a fixed-size buffer in the scan entry structure.

    Seen in 1 report
  28. The message handling code fails to validate that an object still exists before operating on it.

    Seen in 1 report
  29. The message length is added to a 32-bit unsigned counter without an overflow check, so the counter wraps and misleads the keep-alive logic.

    Seen in 1 report
  30. The message type did not carry output padding or output sizes, so the service lost the information needed to distinguish padding modes.

    Seen in 1 report
  31. The method called into the IME subsystem without guarding against synchronous destruction and then used raw stack pointers after the object was freed.

    Seen in 1 report
  32. The method does not validate the type of its first argument, so a non-integer object is treated as a pointer.

    Seen in 1 report
  33. The method does not validate the type of user-supplied data before using it.

    Seen in 1 report
  34. The method fails to validate the existence of an object before using it.

    Seen in 1 report
  35. The MFER parser reads a length from the file and passes it to ifread without checking that the destination stack buffer is large enough.

    Seen in 1 report
  36. The minimum index check rejected only minus one and not other negative numbers, and the loop used a signed comparison.

    Seen in 1 report
  37. The mitigation only checked for 32-bit float types and ignored 16-bit floats, so negation and absolute value reached the vulnerable driver optimiser.

    Seen in 1 report
  38. The model parser did not validate a field, causing an out-of-bounds write on load.

    Seen in 1 report
  39. The Mojo traits pass the alternate images array through without enforcing Skia's limit of four, while Skia allocates fixed five-element arrays.

    Seen in 1 report
  40. The move assignment operator lacks a self-assignment check, so it releases the old pointer even when the new pointer is the same object.

    Seen in 1 report
  41. The move-assignment operator destroyed the destination and then read and wrote its members, which is undefined behaviour.

    Seen in 1 report
  42. The multi-child insertion path skipped the structural prerequisite check when more than one child was inserted, so a node reparented during a synchronous unload event was inserted while still referenced elsewhere.

    Seen in 1 report
  43. The multi-draw validation loop reads the vertices-drawn counter without advancing it between sub-draws, so every sub-draw is validated against the same stale base offset.

    Seen in 1 report
  44. The multilines log format parser fails to validate the length of user-supplied data, causing an integer underflow before a memory write.

    Seen in 1 report
  45. The multiplication of row bytes by height to size the temporary buffer is not checked for overflow, so on 32-bit systems a large product wraps to zero.

    Seen in 1 report
  46. The multiplication of the retry delay by 1000 is performed without checking for integer overflow, so a very large input wraps around.

    Seen in 1 report
  47. The multiplication of the URL length by 2 in the malloc call can overflow on 32-bit systems, resulting in an undersized buffer allocation.

    Seen in 1 report
  48. The multiplication of width by bytes per pixel was not checked for integer overflow before pointer arithmetic and copy.

    Seen in 1 report
  49. The name conversion function allocates a fixed 256-byte buffer but copies label data without validating the total length of the DNS name.

    Seen in 1 report
  50. The name-hashing cache checks only whether the original identifier was mapped, not whether the hashed identifier is already in use.

    Seen in 1 report