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,101 to 3,150 of 3,817
  1. The keepalive count can be decremented without validation, and the closing loop stores raw frame pointers that dangle after synchronous web contents destruction.

    Seen in 1 report
  2. The kernel allowed userland to set the kind field of an id entry to a value that was not a unique power of two, and later code cast the entry to a different structure type without validation.

    Seen in 1 report
  3. The kernel allowed writes to internal file buffer pages that should only have been readable.

    Seen in 1 report
  4. The kernel did not check that a network packet object was still valid before using it after it had been freed.

    Seen in 1 report
  5. The kernel did not take a reference on the clear pages before asynchronous decryption, so the callback's page release dropped the count to zero.

    Seen in 1 report
  6. The kernel does not validate a user-supplied value before dereferencing it as a pointer.

    Seen in 1 report
  7. The kernel failed to account for the target size offset when allocating memory for a converted firewall rule.

    Seen in 1 report
  8. The kernel mishandled debug exceptions, leading to memory corruption.

    Seen in 1 report
  9. The kernel size product is computed in 32-bit signed arithmetic without overflow checking, so a large width times height wraps to zero and matches an empty matrix.

    Seen in 1 report
  10. The kernel slept in the semaphore get path and the structure could be freed before the sleeping thread resumed, leaving a dangling pointer.

    Seen in 1 report
  11. The kernel stored a raw pointer to the sending thread and never cleared it when the thread terminated before the message was cancelled.

    Seen in 1 report
  12. The kernel used an array index derived from user-supplied data without validating it.

    Seen in 1 report
  13. The kext copies the requested byte count without checking how many bytes the server actually returned.

    Seen in 1 report
  14. The keyed service stored a raw pointer to the render frame host without ensuring it outlived the service.

    Seen in 1 report
  15. The keyframe effect kept a raw pointer to its target element and did not clear or re-check it after removal and collection.

    Seen in 1 report
  16. The last index is computed as length minus one without checking that the length is greater than zero.

    Seen in 1 report
  17. The late load elimination pass invalidates memory before clearing cached map facts, so a stale map fact is used to decide two objects cannot alias.

    Seen in 1 report
  18. The layout loop never increases the distance between an actor and itself, so the position grows without bound while the buffer is sized from it.

    Seen in 1 report
  19. The legacy JScript engine evaluating PAC files contained memory-safety bugs such as use-after-free, heap overflow, uninitialised variable and out-of-bounds read.

    Seen in 1 report
  20. The length accumulator lacked an overflow check when adding line lengths after a newline, so it wrapped and allocated too little.

    Seen in 1 report
  21. The length calculation in mb_split did not account for a trailing incomplete multibyte sequence, producing a negative length that was passed unchecked to an internal string-creation routine.

    Seen in 1 report
  22. The length calculation multiplies a 32-bit size by 3 before dividing by 4, so large inputs overflow and produce a length smaller than the real output.

    Seen in 1 report
  23. The length check only required the ticket to be non-empty, not to be at least the 32-byte ID length subtracted in the pointer arithmetic.

    Seen in 1 report
  24. The length field is read from the wrong offset, and destructor ordering lets an inner object call into a partly destroyed outer object.

    Seen in 1 report
  25. The length of user-supplied data was not validated before copying it into a fixed-size stack buffer.

    Seen in 1 report
  26. The length or structure of cookie data was not validated before reading.

    Seen in 1 report
  27. The length parameter was not validated, so an integer underflow produced a negative string length used for a null terminator write.

    Seen in 1 report
  28. The level parameter is not validated against the maximum allowed level before indexing the image info array.

    Seen in 1 report
  29. The library does not copy the POST body buffer when the caller sets it, so freeing it before the transfer leaves a dangling pointer.

    Seen in 1 report
  30. The liveness check tracked the drag controller rather than the drag context, and the local guard was only updated for scroll-update events.

    Seen in 1 report
  31. The liveness guard checks only for a context group ID in a map, not the identity of the storage object, so a freed storage replaced by a new one with the same ID passes.

    Seen in 1 report
  32. The load elimination reducer failed to clear a stale replacement for a phi when a later loop revisit made the inputs differ.

    Seen in 1 report
  33. The loader did not validate that the page count or data size read from the file fitted the fixed buffer.

    Seen in 1 report
  34. The local-href branch returned early without clearing the pending resource fetch, so its completion bypassed the loading guards.

    Seen in 1 report
  35. The local-versus-remote resolution decision is reset on each state machine invocation, so a later pass copies a long hostname into a too-small buffer.

    Seen in 1 report
  36. The locale name length was not checked against the range of the internal 32-bit index, causing an integer overflow.

    Seen in 1 report
  37. The locale string was copied into a fixed-size stack buffer inside ICU without a length check.

    Seen in 1 report
  38. The lock byte count check was insufficient because the loop could run multiple times during detection, letting the counter exceed the buffer.

    Seen in 1 report
  39. The lock protecting the callback pointer was released before the virtual method was called.

    Seen in 1 report
  40. The lock protecting the MIME type map is released before the lookup and iterator dereference.

    Seen in 1 report
  41. The login handler copied username and password into fixed global buffers with an unbounded string copy.

    Seen in 1 report
  42. The lookup accepted either of two object types but the publish routine used the smaller context object as if it were the larger stream object.

    Seen in 1 report
  43. The loop analysis failed to reject degenerate bounds for strict inequality comparisons and did not verify that the exit branch was reachable.

    Seen in 1 report
  44. The loop condition only checked the starting index, not that the full four-float load and store stayed in bounds.

    Seen in 1 report
  45. The loop had no bound on bytes written to a fixed-size stack buffer and did not check the hex input had even length.

    Seen in 1 report
  46. The loop mutated the vector it iterated and erase left stale pointers in trailing slots, so the cached end iterator reached freed fetchers.

    Seen in 1 report
  47. The loop parsing abbreviation attributes lacks a bounds check on the number of iterations, allowing writes beyond the stack buffer.

    Seen in 1 report
  48. The loop snapshot omits the replacement side table, so stale replacement facts from an earlier loop view remain visible during phi simplification.

    Seen in 1 report
  49. The loop traversal only walked the loop body, skipping the init, condition and expression subtrees.

    Seen in 1 report
  50. The loop unrolling analysis uses floating-point arithmetic for trip counts without simulating 32-bit integer wraparound on the GPU.

    Seen in 1 report