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 451 to 500 of 976
  1. Add improved type checks.

    Seen in 1 report
  2. Add rate limiting or throttling to the password reset endpoint per user or email address.

    Seen in 1 report
  3. Add runtime bounds checks instead of relying on debug assertions.

    Seen in 1 report
  4. Add the missing privilege check in the Win32 kernel subsystem.

    Seen in 1 report
  5. Address the issue with improved locking.

    Seen in 1 report
  6. Adjust the facet count to the actual allocated size after degenerate facets are removed.

    Seen in 1 report
  7. Allocate space for the terminating null byte when copying method strings.

    Seen in 1 report
  8. Allocate the MAC context zeroed so callback pointers are not uninitialised.

    Seen in 1 report
  9. Allocate the temporary filename buffer once or track whether it has been freed.

    Seen in 1 report
  10. Apply post-IDN-decode hostname validation in the transfer path as well as the URL getters.

    Seen in 1 report
  11. Apply the same nesting depth limit to cleanup and sizing functions as to the read path.

    Seen in 1 report
  12. Apply the same size check to anonymous temporaries as to declared variables.

    Seen in 1 report
  13. Assign correct permissions to shared memory mappings so apps cannot reach memory they should not.

    Seen in 1 report
  14. Avoid calling non-thread-safe services from worker threads, or make the service thread-safe.

    Seen in 1 report
  15. Avoid freeing memory still referenced by the callinfo structure during reallocation.

    Seen in 1 report
  16. Avoid freeing the worker global scope in the same task that schedules a callback which later accesses it.

    Seen in 1 report
  17. Avoid holding a pointer to a stack or call frame that can be reallocated during method_missing dispatch.

    Seen in 1 report
  18. Avoid holding references into a vector across operations that can reallocate it.

    Seen in 1 report
  19. Avoid leaving a stale pointer when the call stack is reallocated during a type conversion that raises.

    Seen in 1 report
  20. Avoid mapping thread stacks at fixed addresses over existing mappings.

    Seen in 1 report
  21. Avoid unretained callbacks on data pipe watchers that can fire after the object self-deletes.

    Seen in 1 report
  22. Bound file-supplied counts against the destination size before walking arrays.

    Seen in 1 report
  23. Bound SIMD loops by a size rounded down to a multiple of the step.

    Seen in 1 report
  24. Bound the 4D point arithmetic to the stack buffer.

    Seen in 1 report
  25. Bound the BaseFont copy to the destination buffer size instead of using an unchecked string copy.

    Seen in 1 report
  26. Bound the colour argument to the valid range for palette images.

    Seen in 1 report
  27. Bound the copy by the destination field size, not the source string length.

    Seen in 1 report
  28. Bound the DNS value length before copying into the fixed stack buffer.

    Seen in 1 report
  29. Bound the formatted hex output length before appending to the fixed-size stack log buffer.

    Seen in 1 report
  30. Bound the integral row load to the allocated buffer.

    Seen in 1 report
  31. Bound the length of a URI directory before copying it into a stack buffer.

    Seen in 1 report
  32. Bound the number of bytes written to fixed-size stack buffers in varint decoding loops.

    Seen in 1 report
  33. Bound the number of client-supplied SLC triplets stored in the global array.

    Seen in 1 report
  34. Bound the path copy to the 255-character stack buffer instead of looping without a length check.

    Seen in 1 report
  35. Bound the product of window dimensions before size arithmetic.

    Seen in 1 report
  36. Bound the recursion in the string-conversion path.

    Seen in 1 report
  37. Bound the string scan to the size of the destination stack buffers.

    Seen in 1 report
  38. Bound the URL length before copying it into a fixed-size stack buffer for the XSS blacklist comparison.

    Seen in 1 report
  39. Bound the user-supplied length against the 32-byte stack buffer before copying.

    Seen in 1 report
  40. Bounds check RPC-supplied array indices and restrict which save-file flags can be written.

    Seen in 1 report
  41. Bounds-check array indexes taken from AVRCP data.

    Seen in 1 report
  42. Bounds-check the clipboard type value supplied by the content process before indexing the cache array.

    Seen in 1 report
  43. Bounds-check the copy counter against the fixed stack array size.

    Seen in 1 report
  44. Bounds-check the length value before using it as an index into the fixed-size stack buffer.

    Seen in 1 report
  45. Bounds-check the packet type before using it as an index into the statistics array.

    Seen in 1 report
  46. Bounds-check the password length field from CONNECT packets before using it.

    Seen in 1 report
  47. Calculate the node count correctly or avoid raw pointers across vector reallocation.

    Seen in 1 report
  48. Call the existing cleanup helper that unlinks a handle from its peers before clearing its fields.

    Seen in 1 report
  49. Cancel or join validation workers before tearing down the streaming processor.

    Seen in 1 report
  50. Cancel pending selection commands when the editor state is freed.

    Seen in 1 report