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,601 to 2,650 of 3,817
  1. The cached frame index was not reset when cached pixel buffers were freed, so a later decode skipped re-initialisation and wrote through a dangling pointer.

    Seen in 1 report
  2. The cached memory index was truncated to a single byte, so different memory indices were confused and the wrong start pointer and size were used.

    Seen in 1 report
  3. The callback fanout loop did not hold a reference while invoking callbacks that could release the last reference.

    Seen in 1 report
  4. The callback ID counter is a signed 32-bit integer incremented without skipping the reserved sentinel values used by the hash map.

    Seen in 1 report
  5. The callee Phi width is checked when snapshotting the candidate but read again at finalisation without re-checking.

    Seen in 1 report
  6. The caller caches the list head in a local variable while the release helper updates only the member, so a second removal unlinks the wrong node.

    Seen in 1 report
  7. The caller does not check whether the returned query set is an error placeholder before casting it to the backend type.

    Seen in 1 report
  8. The caller freed a buffer after a write failure while the write helper had already freed the same buffer when no callback was supplied.

    Seen in 1 report
  9. The caller obtained the clipboard buffer and its length but called the image converter without passing the length.

    Seen in 1 report
  10. The cancel handler triggers a step change that synchronously destroys its own owning objects, then keeps using its member pointer.

    Seen in 1 report
  11. The cancellation path did not check whether the tool objects were destroyed during a synchronous event dispatch that can run attacker script.

    Seen in 1 report
  12. The cancellation path fails to abort the pending fetch because the session identifier is nil, and the callback stores the tab group pointer in an assign property.

    Seen in 1 report
  13. The canvas code did not validate the source rectangle and image dimensions before premultiplying pixels into the destination buffer.

    Seen in 1 report
  14. The capacity check compares a signed 32-bit size against the capacity, so an increment past the maximum wraps negative and the reallocation branch is never taken.

    Seen in 1 report
  15. The capture code validates the cursor image width and pixel format but never checks its height before copying rows.

    Seen in 1 report
  16. The capture delegate loop re-checks the old capture window's liveness after each update but not the new capture window's.

    Seen in 1 report
  17. The capture method did not check whether the widget was destroyed during the synchronous, reentrant native capture call before continuing to use itself.

    Seen in 1 report
  18. The captured length was replaced by the full on-wire length when calling the Ethernet printer, so bounds checks used the wrong value.

    Seen in 1 report
  19. The certificate stats cache is reused across getStats() calls without invalidation, and only a debug-only check confirms the lookup succeeded.

    Seen in 1 report
  20. The certificate string conversion function calls free on a stack buffer, corrupting the allocator state.

    Seen in 1 report
  21. The CGI handler stores the original client connection as user data, but that connection is closed and freed before the handler later dereferences the stale pointer.

    Seen in 1 report
  22. The channel attribute value was cast to the colour channel enum and used as an array index without a range check.

    Seen in 1 report
  23. The channel ordering lookup returned indices up to five while the buffer was sized from the caller-supplied channel count, and a validation exemption let it through.

    Seen in 1 report
  24. The channel selection value is stored without verifying it is at least minus one, so other negative values pass and are used as array indices.

    Seen in 1 report
  25. The channel split descriptors into batches of 128, and later batches carried only descriptors with no message bytes, which the stream socket send did not handle.

    Seen in 1 report
  26. The character array for the formatted integer was sized without room for the minus sign and terminator of the longest negative value.

    Seen in 1 report
  27. The character count field is not validated against the documented maximum before the Unicode expansion loop writes two bytes per character.

    Seen in 1 report
  28. The CharStringsOffset value in the CFF2 table is not validated against the table bounds, allowing an arbitrarily large length.

    Seen in 1 report
  29. The check for whether an unload acknowledgement was expected happened after the inner delegate attachment branch.

    Seen in 1 report
  30. The check preventing drawing from a mapped buffer was skipped for WebGL contexts, and an internal reallocation freed the staging buffer without updating the cached pointer.

    Seen in 1 report
  31. The chunk size parsed from the request was used as the length in a memmove without a bounds check.

    Seen in 1 report
  32. The chunk size read from the file is used directly as the copy length into a fixed stack buffer with no bounds check.

    Seen in 1 report
  33. The class does not override release to route destruction back to its bound task runner, so the last reference dropped on a threadpool thread deletes it there.

    Seen in 1 report
  34. The class lock is not taken around reads and writes of the port vectors, so a push back reallocation frees storage another thread is reading.

    Seen in 1 report
  35. The cleanup length is not set when skipping an out-of-bounds read on a legitimate fat pointer, so the destination register is not zeroed.

    Seen in 1 report
  36. The cleanup loop destroyed shader module handles but did not reset them to the null handle, so a later cleanup destroyed them again.

    Seen in 1 report
  37. The cleanup routine freed the same filename pointer more than once and then used it again because overlapping upload structures were created.

    Seen in 1 report
  38. The clear-queue handler identified sockets by file descriptor number rather than by socket object, so a reused descriptor caused a double reference drop.

    Seen in 1 report
  39. The CLFS driver mishandled objects in memory, leading to memory corruption exploitable for privilege escalation.

    Seen in 1 report
  40. The client allocated a buffer for the password but copied the password without checking that it fitted.

    Seen in 1 report
  41. The client assumes each column descriptor's fixed header is at least 12 bytes without validating the actual field length.

    Seen in 1 report
  42. The client passed an attacker-controlled buffer length and serialised array counts to the deserialiser without checking them against the actual buffer size.

    Seen in 1 report
  43. The client picks a struct type from the context name in the reply instead of the request.

    Seen in 1 report
  44. The client processes a server response without a bounds check on the data size.

    Seen in 1 report
  45. The client uses the server-supplied per-row field length as the readable extent of a buffer sized from the smaller prepare-time length.

    Seen in 1 report
  46. The close path ignored the failure return of the internal removal call during a callback and freed the handle anyway.

    Seen in 1 report
  47. The code accessed the byte before the buffer when encoding an empty hostname.

    Seen in 1 report
  48. The code accesses the sequence member of the SDP data union without first checking that the element's type field is a sequence type.

    Seen in 1 report
  49. The code adds the header length to the data length without checking for overflow, so a huge data length wraps to a small frame length that passes the size check.

    Seen in 1 report
  50. The code allocates a buffer based on one file-controlled count but then reads a different file-controlled size into it without checking that the read fits.

    Seen in 1 report