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.
-
The bit counter was not checked to stay non-negative before being used as an index into the masks array.
Seen in 1 report
-
The bitstream parser reads the long-term frame index without a range check, unlike other fields, so a large value reaches hardware decoder structures.
Seen in 1 report
-
The blitFramebuffer implementation failed to validate that the source and destination coordinates were within the bounds of the renderbuffers.
Seen in 1 report
-
The block count for an empty switch body does not account for the merge block, so a vector is allocated with one element but accessed at index one.
Seen in 1 report
-
The bounds check compares a signed sample index only against the upper limit, so a negative value from the timestamp search is used to index the array.
Seen in 1 report
-
$3,000 Medium
-
-
The bounds check compares against total received bytes rather than the actual response structure, so reads reach uninitialised heap memory.
Seen in 1 report
-
The bounds check happens after the array write, allowing one extra element.
Seen in 1 report
-
The bounds check only verifies the start pointer is inside the buffer, not that the full four-byte read fits.
Seen in 1 report
-
$3,000 High
-
-
The bounds check underflows when the block size is smaller than the mode string plus fixed overhead, making the comparison always false.
Seen in 1 report
-
The bounds check used a strict greater-than instead of greater-or-equal, so an index equal to the length was treated as in bounds.
Seen in 1 report
-
The bounds check used the total message buffer size instead of the available data space.
Seen in 1 report
-
The bounds check uses a greater-than comparison instead of greater-or-equal, so an index equal to the tag count is accepted.
Seen in 1 report
-
The bounds check uses signed integers, so an integer overflow slips past it and allows an out-of-bounds heap write.
Seen in 1 report
-
The bounds check uses the buffer size instead of one less, so the terminating NUL is written one byte past the buffer.
-
The browser context pointer is not cleared when the context is destroyed and an early abort in cleanup leaves it dangling for later use.
Seen in 1 report
-
The browser dereferenced a pointer it had not validated in a path reachable from a crafted web page.
Seen in 1 report
-
The browser did not validate that a frame's unique name was globally unique, breaking the assumption of the lookup.
Seen in 1 report
-
The browser does not enforce unique field identifiers within a form and the undo loop frees a list node while a stale iterator remains.
Seen in 1 report
-
The browser does not randomise memory layout correctly, leaving predictable addresses.
Seen in 1 report
-
The browser process deserialised tree updates without checking that node IDs were strictly positive, allowing a negative ID to collide with an internal one.
Seen in 1 report
-
The browser process did not validate or clamp a font size parameter received from the renderer before passing it to platform text APIs.
Seen in 1 report
-
The browser process trusted a get_offset value read from shared memory without validating it before using it to compute available ring space.
Seen in 1 report
-
The browser trusts ICC profile data written to X11 root window properties by any client, and the colour library uses 32-bit signed arithmetic for CLUT index calculations.
Seen in 1 report
-
The browser UI does not handle a profile being deleted while a tab drag is in progress.
Seen in 1 report
-
$1,000 Medium
-
-
The buffer allocator does not correctly track nursery ownership when elements are promoted during tenuring.
Seen in 1 report
-
The buffer cleanup only reset the next-append iterator when the deleted range's end timestamp matched the last appended timestamp, so an unset timestamp skipped the reset.
Seen in 1 report
-
The buffer freeing routine popped a range without resetting the next-append iterator, unlike the delete-and-remove path which did reset it.
Seen in 1 report
-
The buffer growth check only grows while the requested length is at least the current size, so a negative length skips resizing, and the snprintf return value is added to the offset without checking for an error.
Seen in 1 report
-
The buffer is allocated from DICOM header dimensions but the write loop uses larger JPEG2000 decoder dimensions with no bounds check.
Seen in 1 report
-
The buffer is sized from one record's counts but written using row and column values from another record without bounds checks.
Seen in 1 report
-
The buffer length is set to the full buffer size rather than the remaining space, so a second copy overflows.
Seen in 1 report
-
Critical
-
-
The buffer offset is not incremented in the 20-bit case, so the same byte is copied repeatedly and the write runs past the buffer.
Seen in 1 report
-
The buffer pointer is passed by value rather than by reference, so the caller's pointer is not updated or cleared after the function frees it, leading to a second free on the error path.
Seen in 1 report
-
The buffer pool check verified offset plus size was inside the mapping but did not check the size was large enough for the fragment's internal state.
Seen in 1 report
-
The buffer resize happened after the write and the only bounds checks were debug assertions removed in release builds.
Seen in 1 report
-
The buffer setter copies without checking the incoming size against capacity, and the receive path never validates message lengths against the global or per-transporter buffers.
Seen in 1 report
-
The buffer size calculation assumes three or four colour components but the header can specify a different number.
Seen in 1 report
-
The buffer size formula multiplied width, samples per pixel and colour depth without checking for integer overflow.
Seen in 1 report
-
The buffer size is calculated from one field but the copy length comes from a different field, and neither is validated against the other.
Seen in 1 report
-
The buffer size is computed from attacker-controlled header offsets plus fixed padding, but the copied attribute data can exceed it.
Seen in 1 report
-
The buffer size is computed with unchecked 32-bit multiplication and never compared with the actual texture buffer size, and the Rust-side length check wraps the same way.
Seen in 1 report
-
The buffer size was calculated from a sign-extended ssizDepth value, giving an undersized allocation.
Seen in 1 report
-
The buffer size was computed by multiplying five dimensions in 32-bit arithmetic, so the product overflowed before being stored in a 64-bit size.
Seen in 1 report
-
$33,000 Critical
-
-
The buffer size was computed with signed integer arithmetic and an unsigned length was cast to signed without an overflow check, so a small allocation was followed by a large copy.
Seen in 1 report
-
The bundled libtiff did not verify that JPEG data precision matched the output sample width of libjpeg-turbo.
Seen in 1 report
-
The byteness check is based on the string's map rather than its actual content, and a sliced string can keep a two-byte map after its parent is internalised.
Seen in 1 report
-
$7,000 Medium
-
-
The ByteString TLV length was not bounded, so the total length calculation overflowed and bypassed the buffer check.
Seen in 1 report
-
The C extension does not properly validate or handle lone UTF-16 surrogate escape sequences, leading to a segmentation fault.
Seen in 1 report
-
The cache eviction loop does not exclude the storage object currently being processed, and the safety check is compiled out in release builds.
Seen in 1 report
-
The cache merge accepts a cached scope info based only on source position, scope type and context length, without checking the simple-parameters bit.
Seen in 1 report