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 1,901 to 1,950 of 3,817
  1. An unsigned chunk size was cast to a signed integer, so the bounds check made the wrong decision about the destination buffer size.

    Seen in 1 report
  2. An unsigned counter is decremented without a zero check, wrapping to a huge value used as an array index.

    Seen in 1 report
  3. An unsigned frame count had 2 subtracted from it and was used to index the output buffer without checking that at least two frames were processed.

    Seen in 1 report
  4. An unsigned integer underflow in the fully-connected operator when the input tensor has zero dimensions.

    Seen in 1 report
  5. An unsigned offset is narrowed to a signed type and cast to a pointer, sign-extending on 64-bit systems.

    Seen in 1 report
  6. An unsigned size check underflowed when the accumulated size reached 4095 or more, allowing an unbounded heap overflow.

    Seen in 1 report
  7. An unsigned size of zero has one subtracted, wrapping to a huge value so the whole string is written out of bounds.

    Seen in 1 report
  8. An unsigned subtraction in the allocator's size check wraps when the current size exceeds the block size after alignment, bypassing the bounds check.

    Seen in 1 report
  9. An unsigned value from the binding layer was cast to a signed 32-bit integer without range validation.

    Seen in 1 report
  10. Annotation object handling does not validate user-supplied data before writing into a fixed-size buffer.

    Seen in 1 report
  11. Array index validation checked only the upper bound, letting negative indices through.

    Seen in 1 report
  12. Array indices from a file header used without range validation.

    Seen in 1 report
  13. Array indices from file data are not validated before use.

    Seen in 1 report
  14. Arrays are sized from the declared point count but written using an index that increments for every line without a bounds check.

    Seen in 1 report
  15. ASN.1 string data was copied into a fixed-size heap buffer without a length check.

    Seen in 1 report
  16. atoi accepted a numeric prefix and the full string was then copied with strcpy into a small stack buffer.

    Seen in 1 report
  17. Attacker-controlled bitsPerPixelId used as an index into a fixed-size array without bounds validation.

    Seen in 1 report
  18. Attacker-controlled data copied into fixed-size stack buffers without bounds checks, and a pointer dereferenced that could be null.

    Seen in 1 report
  19. Attacker-controlled metadata and decrypted payload are copied into fixed-size stack buffers without a length check.

    Seen in 1 report
  20. Attacker-controlled orderType used as an index into a fixed-size array without bounds validation.

    Seen in 1 report
  21. Attacker-controlled stream endpoint data is copied into a fixed-size stack buffer without a length check.

    Seen in 1 report
  22. Attacker-supplied width and height were multiplied to size an allocation and an unchecked byte count was copied in.

    Seen in 1 report
  23. Authentication header data was copied into a fixed stack buffer without a length check.

    Seen in 1 report
  24. Available buffer space was checked only with an assert that is compiled out in release builds, so the following memcpy overflows.

    Seen in 1 report
  25. Background-finalisation status of an object is not compared with the object it is swapped with during transplantation.

    Seen in 1 report
  26. Base dimensions are checked but per-layer dimensions are not, and a 32-bit value is truncated into a 16-bit driver field.

    Seen in 1 report
  27. Baseband software does not validate or handle unexpected SIM messages properly.

    Seen in 1 report
  28. Batching limits input count to the index buffer capacity but does not account for items being split during clipping.

    Seen in 1 report
  29. Bindings passed base::Unretained(this) into V8 callbacks while the owning object deleted itself synchronously on frame detachment, so a JavaScript reference outlived the C++ object.

    Seen in 1 report
  30. Boundary check uses greater-than instead of greater-than-or-equal, allowing an index equal to the size to pass.

    Seen in 1 report
  31. Boundary checks accepted all-zero block addresses and segment counts, so areas overlapped and a journal pointer landed in uninitialised memory.

    Seen in 1 report
  32. Bounds validation when parsing a linear timing function leaves an internal point list that the range evaluation does not handle safely.

    Seen in 1 report
  33. Bounds-check and alignment logic dereferences a missing or invalid value for certain store operations.

    Seen in 1 report
  34. Breakpoint tracing does not follow an object after its cross-compartment wrapper is nuked.

    Seen in 1 report
  35. Buffer grown by a fixed amount once without ensuring it fits the requested level.

    Seen in 1 report
  36. Buffer length is calculated with 32-bit signed arithmetic without an overflow check before setting the length.

    Seen in 1 report
  37. Buffer over-read in the DHCP server service.

    Seen in 1 report
  38. Buffer over-read returning uninitialised stack memory.

    Seen in 1 report
  39. Buffer size calculation did not account for alignment padding added before the copy.

    Seen in 1 report
  40. Buffer size comes from the RATE header's display rate while the copy length comes from the ANIH header's width, with no check that the copy fits.

    Seen in 1 report
  41. Buffer sized from pathconf or a 256-byte fallback instead of at least PATH_MAX.

    Seen in 1 report
  42. Buffer sizes are computed with unchecked integer arithmetic on attacker-controlled counts, causing undersized allocations.

    Seen in 1 report
  43. Buffer sizes are estimated rather than checked against actual frame sizes before copying.

    Seen in 1 report
  44. Buffer storage pointer not cleared after free, leaving a dangling pointer.

    Seen in 1 report
  45. Buffer-size doubling without an overflow check, so the size wraps to zero and the write pointer is set beyond the real allocation.

    Seen in 1 report
  46. Buffers allocated with one allocator were released with the standard C library free, mixing two heaps.

    Seen in 1 report
  47. Bytecode generation for return statements inside case statements produces an incorrect jump target and stack inconsistency.

    Seen in 1 report
  48. Bytes per compressed block are treated as bytes per pixel, inflating the destination row pitch.

    Seen in 1 report
  49. Cache invalidation multiplies an already byte-based offset by the index element size, so real updates to the selected bytes miss the cached interval.

    Seen in 1 report
  50. Cache names are converted lossily between UTF-16 and UTF-8, so distinct names become identical.

    Seen in 1 report