Skip to content

In-depth lesson · Memory corruption

Typical fixes

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 951 to 976 of 976
  1. Validate the size and contents of user-supplied data before writing to a memory buffer.

    Seen in 1 report
  2. Validate the size of data in protocol messages before copying into a heap buffer.

    Seen in 1 report
  3. Validate the size of decoded license data against the allocated buffer before copying.

    Seen in 1 report
  4. Validate the size of user-supplied data before arithmetic.

    Seen in 1 report
  5. Validate the total Huffman entry count against the allocated table size.

    Seen in 1 report
  6. Validate the type of file-supplied data before using it.

    Seen in 1 report
  7. Validate the type of objects referenced by the associated file entry before using them.

    Seen in 1 report
  8. Validate the type of the first argument to checkThisBox.

    Seen in 1 report
  9. Validate the type of the object passed to addIcon.

    Seen in 1 report
  10. Validate the type of the object passed to the colour conversion page function.

    Seen in 1 report
  11. Validate the user-supplied MTU value against the allocated buffer size before using it in memory calculations.

    Seen in 1 report
  12. Validate user-supplied array indexes before using them to access memory.

    Seen in 1 report
  13. Validate user-supplied data before writing to memory in the driver.

    Seen in 1 report
  14. Validate user-supplied data length before copying.

    Seen in 1 report
  15. Validate user-supplied data to prevent integer underflow before writing to memory.

    Seen in 1 report
  16. Validate user-supplied parameters before computing the allocation size in the PUBLISH handler.

    Seen in 1 report
  17. Validate user-supplied size data before allocating a buffer.

    Seen in 1 report
  18. Validate user-supplied sizes before buffer allocation to prevent integer overflow.

    Seen in 1 report
  19. Validate user-supplied values before using them in size calculations.

    Seen in 1 report
  20. Verify the claimed size fits within the remaining buffer before copying.

    Seen in 1 report
  21. Verify the output buffer has enough space before writing decompressed data.

    Seen in 1 report
  22. Verify the parser level is within bounds before using it as an array index.

    Seen in 1 report
  23. Verify the type of arguments before calling string length macros on them.

    Seen in 1 report
  24. Widen the integers in the size check so the sum cannot overflow to a negative value.

    Seen in 1 report
  25. XOR each stored free-list pointer with a per-process value so a plain overflow cannot redirect allocations.

    Seen in 1 report
  26. Zero the destination register when skipping an out-of-bounds read on a fat pointer.

    Seen in 1 report