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 2,551 to 2,600 of 3,817
  1. The bit counter was not checked to stay non-negative before being used as an index into the masks array.

    Seen in 1 report
  2. 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
  3. The blitFramebuffer implementation failed to validate that the source and destination coordinates were within the bounds of the renderbuffers.

    Seen in 1 report
  4. 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
  5. 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
  6. The bounds check compares against total received bytes rather than the actual response structure, so reads reach uninitialised heap memory.

    Seen in 1 report
  7. The bounds check happens after the array write, allowing one extra element.

    Seen in 1 report
  8. The bounds check only verifies the start pointer is inside the buffer, not that the full four-byte read fits.

    Seen in 1 report
  9. 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
  10. 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
  11. The bounds check used the total message buffer size instead of the available data space.

    Seen in 1 report
  12. 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
  13. 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
  14. The bounds check uses the buffer size instead of one less, so the terminating NUL is written one byte past the buffer.

    Seen in 1 report
  15. 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
  16. The browser dereferenced a pointer it had not validated in a path reachable from a crafted web page.

    Seen in 1 report
  17. The browser did not validate that a frame's unique name was globally unique, breaking the assumption of the lookup.

    Seen in 1 report
  18. 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
  19. The browser does not randomise memory layout correctly, leaving predictable addresses.

    Seen in 1 report
  20. 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
  21. 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
  22. 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
  23. 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
  24. The browser UI does not handle a profile being deleted while a tab drag is in progress.

    Seen in 1 report
  25. The buffer allocator does not correctly track nursery ownership when elements are promoted during tenuring.

    Seen in 1 report
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. The buffer length is set to the full buffer size rather than the remaining space, so a second copy overflows.

    Seen in 1 report
  32. 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
  33. 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
  34. 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
  35. The buffer resize happened after the write and the only bounds checks were debug assertions removed in release builds.

    Seen in 1 report
  36. 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
  37. The buffer size calculation assumes three or four colour components but the header can specify a different number.

    Seen in 1 report
  38. The buffer size formula multiplied width, samples per pixel and colour depth without checking for integer overflow.

    Seen in 1 report
  39. 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
  40. 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
  41. 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
  42. The buffer size was calculated from a sign-extended ssizDepth value, giving an undersized allocation.

    Seen in 1 report
  43. 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
  44. 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
  45. The bundled libtiff did not verify that JPEG data precision matched the output sample width of libjpeg-turbo.

    Seen in 1 report
  46. 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
  47. The ByteString TLV length was not bounded, so the total length calculation overflowed and bypassed the buffer check.

    Seen in 1 report
  48. The C extension does not properly validate or handle lone UTF-16 surrogate escape sequences, leading to a segmentation fault.

    Seen in 1 report
  49. 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
  50. 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