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,351 to 3,400 of 3,817
  1. The pending-show completion attached a child unconditionally without checking it was already attached, and the child array allowed duplicates.

    Seen in 1 report
  2. The per-isolate singleton wait node is not protected against re-entrant Atomics.wait calls.

    Seen in 1 report
  3. The physical_lsn field was not validated, giving an incorrect size calculation and a heap overflow during a memmove.

    Seen in 1 report
  4. The plaintext size calculation underestimated the required buffer because it did not account for the ciphertext length.

    Seen in 1 report
  5. The plane-ordering check used raw 32-bit addition instead of checked arithmetic and never verified that plane offsets were non-negative.

    Seen in 1 report
  6. The player object's decoder pointer is not cleared during initialisation, and the pcm16 code path reads it instead of allocating a decoder.

    Seen in 1 report
  7. The pointer decrement after the accumulation macro runs even when the macro skipped writing because the buffer was full.

    Seen in 1 report
  8. The pointer to a freed object was not nulled, so later checks were bypassed and the object was reused.

    Seen in 1 report
  9. The polyfill interpolant location is allocated per shader stage by scanning only that stage's own locations, with no shared inter-stage allocation.

    Seen in 1 report
  10. The posted task did not re-check the active flag before re-registering the module, and the destructor returned early and skipped deregistration.

    Seen in 1 report
  11. The pre-finalizer destroys the audio source without taking the consumer lock, so the audio thread keeps writing through stale spans.

    Seen in 1 report
  12. The precision reduction loop only checks values greater than or equal to ten, so negative values skip it and the buffer is undersized.

    Seen in 1 report
  13. The predictor assumes at least four bytes are available in the last row, but the row can be three bytes.

    Seen in 1 report
  14. The preparse step does not include the formula record when calculating the maximum row and column, so the column value is later used as an array index without bounds checking.

    Seen in 1 report
  15. The pretty-printer triggers a style flush that tears down and frees the presentation shell it still holds a reference to, then dereferences it.

    Seen in 1 report
  16. The print API mishandled crafted parameters, so a memory region was freed and then accessed again.

    Seen in 1 report
  17. The priority calculation does not check that its result is finite, so an overflow produces NaN that breaks the strict weak ordering used by the sort.

    Seen in 1 report
  18. The private-key blob path skips the null-termination step that the certificate and CA blob paths perform, so a pointer-plus-length blob reaches an API expecting a terminated string.

    Seen in 1 report
  19. The process watcher destructor does not wait for its background thread-pool task, so a raw pointer is used after the session object is freed.

    Seen in 1 report
  20. The ProcXIQueryPointer function does not validate a client-supplied array index before using it to access memory.

    Seen in 1 report
  21. The product of an attacker-controlled element size and a count parsed with atoi is not checked for overflow before being used in malloc.

    Seen in 1 report
  22. The product of FAT sector count and sector size is computed in 32 bits and overflows, giving an undersized allocation.

    Seen in 1 report
  23. The product of palette entry and palette counts is multiplied by four without an integer overflow check, so a small allocation is followed by a larger write.

    Seen in 1 report
  24. The product of two file-supplied values is used as an allocation size without an overflow check before decompression writes into the buffer.

    Seen in 1 report
  25. The product of width, height and bit depth is computed without overflow checking, so a large bit depth gives a small allocation used as a stride.

    Seen in 1 report
  26. The program copies a user-controlled length from the Modbus message into a fixed-size stack buffer without validating that the length is within bounds.

    Seen in 1 report
  27. The program lets a pointer be taken to the return address on the stack and modified because it does not prevent such access.

    Seen in 1 report
  28. The promise is resolved before the request object is used for metrics, so a user callback can free it in between.

    Seen in 1 report
  29. The promise was resolved synchronously during layout instead of being deferred to a post-traversal task, so the thenable check ran attacker JavaScript while layout held style references.

    Seen in 1 report
  30. The protocol dispatch path lacked a session-pinning scope and the agent stored the inspector session as a bare pointer without clearing it on detach.

    Seen in 1 report
  31. The protocol handler does not validate the destination address in the receive-data command.

    Seen in 1 report
  32. The prototype validity cell is set to a sentinel when the prototype is not a plain object, so later map changes do not invalidate the inline cache.

    Seen in 1 report
  33. The proxy stores a raw pointer to the shadow root that is not invalidated on collection, and adopters hold raw pointers without keeping the object alive.

    Seen in 1 report
  34. The PUBACK handler trusts a length or field from the incoming packet without checking it against the destination buffer size.

    Seen in 1 report
  35. The public header handle stores a raw pointer to an internal list node that is freed on the next request, with no invalidation or generation check.

    Seen in 1 report
  36. The pushed URL was validated only after the parent handle and its MIME tree were duplicated, so a rejected push freed callback state the parent still owned.

    Seen in 1 report
  37. The qualifier check only inspects the immediate base expression, so a comma operator hides the gl_FragData tracking and clamping.

    Seen in 1 report
  38. The queuing discipline used an object without confirming it was still alive.

    Seen in 1 report
  39. The range's linked-list node is freed by the cycle collector before the range destructor unlinks itself.

    Seen in 1 report
  40. The raster buffer size is calculated from file values and the write loop uses a width that can exceed it.

    Seen in 1 report
  41. The raw character reader does not check the buffer boundary when reading an identifier.

    Seen in 1 report
  42. The raw string pointer is read without first checking that the scalar holds a string.

    Seen in 1 report
  43. The re-entrancy guard in the window destructor was non-fatal, so a nested message loop could re-enter and free the object.

    Seen in 1 report
  44. The read loop did not reduce the remaining count by the amount already read, so later iterations read the full original count again.

    Seen in 1 report
  45. The read size is computed by subtracting the offset from the buffer length without checking the offset is in bounds.

    Seen in 1 report
  46. The readback workaround did not check whether a pixel buffer object was bound and treated its byte offset as a host pointer, and release builds ignored native driver errors.

    Seen in 1 report
  47. The reader does not check that an Annotation object still exists before using it.

    Seen in 1 report
  48. The reader does not check that an object referenced as a geometry really is a geometry before reading its attributes.

    Seen in 1 report
  49. The reallocation size was hard-coded instead of doubling as the buffer grew, so entries beyond 1024 were written past the end.

    Seen in 1 report
  50. The reallocator was unaware of folded allocations and did not track reserved memory, so reallocation caused overlapping objects.

    Seen in 1 report