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.
-
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
-
An unsigned counter is decremented without a zero check, wrapping to a huge value used as an array index.
Seen in 1 report
-
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
-
An unsigned integer underflow in the fully-connected operator when the input tensor has zero dimensions.
Seen in 1 report
-
$33,000 Critical
-
-
An unsigned offset is narrowed to a signed type and cast to a pointer, sign-extending on 64-bit systems.
Seen in 1 report
-
An unsigned size check underflowed when the accumulated size reached 4095 or more, allowing an unbounded heap overflow.
-
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
-
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
-
An unsigned value from the binding layer was cast to a signed 32-bit integer without range validation.
Seen in 1 report
-
Annotation object handling does not validate user-supplied data before writing into a fixed-size buffer.
Seen in 1 report
-
Array index validation checked only the upper bound, letting negative indices through.
Seen in 1 report
-
Array indices from a file header used without range validation.
Seen in 1 report
-
Array indices from file data are not validated before use.
-
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
-
ASN.1 string data was copied into a fixed-size heap buffer without a length check.
Seen in 1 report
-
atoi accepted a numeric prefix and the full string was then copied with strcpy into a small stack buffer.
Seen in 1 report
-
Attacker-controlled bitsPerPixelId used as an index into a fixed-size array without bounds validation.
-
Attacker-controlled data copied into fixed-size stack buffers without bounds checks, and a pointer dereferenced that could be null.
Seen in 1 report
-
Attacker-controlled metadata and decrypted payload are copied into fixed-size stack buffers without a length check.
Seen in 1 report
-
Attacker-controlled orderType used as an index into a fixed-size array without bounds validation.
-
Attacker-controlled stream endpoint data is copied into a fixed-size stack buffer without a length check.
Seen in 1 report
-
Attacker-supplied width and height were multiplied to size an allocation and an unchecked byte count was copied in.
Seen in 1 report
-
Authentication header data was copied into a fixed stack buffer without a length check.
-
Available buffer space was checked only with an assert that is compiled out in release builds, so the following memcpy overflows.
-
Background-finalisation status of an object is not compared with the object it is swapped with during transplantation.
-
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
-
Baseband software does not validate or handle unexpected SIM messages properly.
-
Batching limits input count to the index buffer capacity but does not account for items being split during clipping.
Seen in 1 report
-
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
-
Boundary check uses greater-than instead of greater-than-or-equal, allowing an index equal to the size to pass.
-
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
-
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
-
Bounds-check and alignment logic dereferences a missing or invalid value for certain store operations.
Seen in 1 report
-
Breakpoint tracing does not follow an object after its cross-compartment wrapper is nuked.
Seen in 1 report
-
Buffer grown by a fixed amount once without ensuring it fits the requested level.
Seen in 1 report
-
Buffer length is calculated with 32-bit signed arithmetic without an overflow check before setting the length.
Seen in 1 report
-
Buffer over-read in the DHCP server service.
Seen in 1 report
-
Buffer over-read returning uninitialised stack memory.
Seen in 1 report
-
Buffer size calculation did not account for alignment padding added before the copy.
-
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
-
Buffer sized from pathconf or a 256-byte fallback instead of at least PATH_MAX.
Seen in 1 report
-
Buffer sizes are computed with unchecked integer arithmetic on attacker-controlled counts, causing undersized allocations.
Seen in 1 report
-
Buffer sizes are estimated rather than checked against actual frame sizes before copying.
Seen in 1 report
-
Buffer storage pointer not cleared after free, leaving a dangling pointer.
Seen in 1 report
-
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
-
Buffers allocated with one allocator were released with the standard C library free, mixing two heaps.
Seen in 1 report
-
Bytecode generation for return statements inside case statements produces an incorrect jump target and stack inconsistency.
-
Bytes per compressed block are treated as bytes per pixel, inflating the destination row pitch.
Seen in 1 report
-
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
-
Cache names are converted lossily between UTF-16 and UTF-8, so distinct names become identical.
Seen in 1 report