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,201 to 3,250 of 3,817
  1. The native dialog controller is destroyed without dismissing the associated Java dialog, leaving a dangling raw pointer used in JNI callbacks.

    Seen in 1 report
  2. The native DRM bridge field was accessed without synchronisation, so a stale pointer could be read after the native object was freed.

    Seen in 1 report
  3. The native glue between JavaScript and the C++ runtime mishandles object lifetimes and counts, placing bugs on a heap outside the sandbox cage and memory protection keys.

    Seen in 1 report
  4. The NDR array interpreter uses the lower offset field unchecked to compute a destination pointer.

    Seen in 1 report
  5. The negotiation-needed check in the signalling session used a pointer to an object that had already been freed.

    Seen in 1 report
  6. The neighbour facet index from the file is used to index the norm_sw array without validating it against the allocated facet count.

    Seen in 1 report
  7. The NetBIOS name parsing routine does not validate the length of user-supplied data before copying to a heap buffer.

    Seen in 1 report
  8. The new imported-strings implementation produced a type the canonicaliser did not expect.

    Seen in 1 report
  9. The node count calculation underestimated the nodes required, causing a vector reallocation that invalidated raw subtree pointers.

    Seen in 1 report
  10. The node was added to a global set after a synchronous call that could re-enter and destroy it, and the destructor did not remove it from the set.

    Seen in 1 report
  11. The notify callback path re-enters event handling without guarding against a handle being removed from a nested socket callback, so the pollset is freed while still being iterated.

    Seen in 1 report
  12. The nuke routine likely skips debugger wrappers when marking a realm as no-new-wrappers, so a cached debugger wrapper survives while the wrapper policy later replaces the value with a dead proxy.

    Seen in 1 report
  13. The number of atoms from the input file is used without validation to allocate a buffer and control a loop.

    Seen in 1 report
  14. The number of bytes requested is copied without checking it matches the actual payload length.

    Seen in 1 report
  15. The number of coordinates stored for a path segment does not match the fixed size assumed when cloning a curve segment, so the clone copies more floats than the source holds.

    Seen in 1 report
  16. The number of segments read from the file is not validated against the fixed size of the Offset array, leading to an out-of-bounds read when the loop iterates beyond the array bounds.

    Seen in 1 report
  17. The number of server domains from the JSON count field is used as a loop bound without validation, allowing writes beyond the fixed-size array.

    Seen in 1 report
  18. The number of skipped characters is subtracted from the remaining buffer length twice, causing an integer underflow.

    Seen in 1 report
  19. The number of strings from the file is used to allocate an array, but the code later writes more entries than allocated.

    Seen in 1 report
  20. The number of style levels is not validated against the fixed array size before the parser loops over them.

    Seen in 1 report
  21. The observable array backing adopted stylesheets used a plain JS array whose indices could be intercepted by prototype setters, so the JS view and the internal adopter list fell out of sync.

    Seen in 1 report
  22. The observer held a raw reference to an observed element that garbage collection could free, and the update path did not check it was still alive.

    Seen in 1 report
  23. The ODBC driver did not validate replies received from the SQL server.

    Seen in 1 report
  24. The offset increase fallback added to the index without accounting for element scale, so the scale was applied twice.

    Seen in 1 report
  25. The offset parameter was not checked to be non-negative before calculating a memory position.

    Seen in 1 report
  26. The offset used to access the shared memory section is not validated before an atomic decrement, allowing access beyond the allocated region.

    Seen in 1 report
  27. The on-stack replacement prologue adjusts the stack pointer by the full frame size in one subtraction with no stack probing, and the stack check runs only after the frame is built.

    Seen in 1 report
  28. The only bounds check on the certificate info array index was a debug assertion that compiles to nothing in release builds.

    Seen in 1 report
  29. The opener chain was held as raw pointers and a nested message loop during fullscreen exit destroyed one before it was dereferenced.

    Seen in 1 report
  30. The optimisation assumes a negative shift amount always means a left shift with a large positive amount and replaces the operation with a constant zero.

    Seen in 1 report
  31. The optimised finally path creates internal helper closures with a constructable map while the generic path uses a non-constructable one, and the optimiser assumes construct results are objects.

    Seen in 1 report
  32. The optimiser writes an absolute offset for a sequence-end marker without registering it in the jump edges, so later shrinking passes leave a stale offset.

    Seen in 1 report
  33. The optimising compiler treats type information as reliable when an earlier operation could have changed it, so a type check is skipped.

    Seen in 1 report
  34. The output buffer size was calculated as four times the input length plus two, which overflows for very large inputs.

    Seen in 1 report
  35. The output buffer size was computed as input length times six in a 32-bit integer, so the multiplication wrapped and allocated a tiny buffer.

    Seen in 1 report
  36. The output buffer size was computed from bitmap width and height while the rows written came from a different attacker-controlled size field.

    Seen in 1 report
  37. The output index is incremented twice per input character during Unicode to SJIS conversion, so the written name exceeds the fixed limit.

    Seen in 1 report
  38. The output length computation overflowed for a very large input, wrapping to a negative value.

    Seen in 1 report
  39. The output length is computed with an unchecked arithmetic expression and the copy uses the input length rather than the actual decoded length.

    Seen in 1 report
  40. The output length is not bounded against the fixed key_block stack buffer before HMAC/SHA-1 writes into it.

    Seen in 1 report
  41. The output size is computed as length times three plus one without an overflow check, and the caller-supplied length is trusted without matching it to the real buffer.

    Seen in 1 report
  42. The overflow check adds two lengths before comparing, so the addition itself can wrap around and bypass the check.

    Seen in 1 report
  43. The overflow check ignored primitive restart expansion and the size was stored in an unsigned int that truncated to zero.

    Seen in 1 report
  44. The overflow check in the hex string parser is incorrect when the maximum equals the type's maximum, allowing multiplication and addition to wrap undetected.

    Seen in 1 report
  45. The overflow check sets the maximum buffer length to zero but the code continues to compute the length and copy data instead of returning an error.

    Seen in 1 report
  46. The packet cloning function failed to preserve the flag that protects file-backed page cache pages from in-place writes.

    Seen in 1 report
  47. The packet length field is trusted before data is copied into a fixed-length heap buffer.

    Seen in 1 report
  48. The packet length field was trusted and copied into a fixed stack buffer without bounds checking.

    Seen in 1 report
  49. The packet type field is used directly as an index into a fixed-size global statistics array without a bounds check.

    Seen in 1 report
  50. The padding helper returned valid padding early when explicit padding was all zeros, skipping the ceil-rounding adjustment and causing a shape mismatch.

    Seen in 1 report