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.
-
Add improved type checks.
-
Add rate limiting or throttling to the password reset endpoint per user or email address.
Seen in 1 report
-
Add runtime bounds checks instead of relying on debug assertions.
Seen in 1 report
-
Add the missing privilege check in the Win32 kernel subsystem.
Seen in 1 report
-
Address the issue with improved locking.
-
Adjust the facet count to the actual allocated size after degenerate facets are removed.
Seen in 1 report
-
Allocate space for the terminating null byte when copying method strings.
-
Allocate the MAC context zeroed so callback pointers are not uninitialised.
Seen in 1 report
-
Allocate the temporary filename buffer once or track whether it has been freed.
Seen in 1 report
-
Apply post-IDN-decode hostname validation in the transfer path as well as the URL getters.
-
Apply the same nesting depth limit to cleanup and sizing functions as to the read path.
Seen in 1 report
-
Apply the same size check to anonymous temporaries as to declared variables.
Seen in 1 report
-
Assign correct permissions to shared memory mappings so apps cannot reach memory they should not.
-
Avoid calling non-thread-safe services from worker threads, or make the service thread-safe.
-
Avoid freeing memory still referenced by the callinfo structure during reallocation.
Seen in 1 report
-
Avoid freeing the worker global scope in the same task that schedules a callback which later accesses it.
Seen in 1 report
-
$11,000 High
-
-
Avoid holding a pointer to a stack or call frame that can be reallocated during method_missing dispatch.
Seen in 1 report
-
Avoid holding references into a vector across operations that can reallocate it.
Seen in 1 report
-
Avoid leaving a stale pointer when the call stack is reallocated during a type conversion that raises.
Seen in 1 report
-
Avoid mapping thread stacks at fixed addresses over existing mappings.
Seen in 1 report
-
Avoid unretained callbacks on data pipe watchers that can fire after the object self-deletes.
Seen in 1 report
-
Bound file-supplied counts against the destination size before walking arrays.
-
Bound SIMD loops by a size rounded down to a multiple of the step.
Seen in 1 report
-
Bound the 4D point arithmetic to the stack buffer.
Seen in 1 report
-
Bound the BaseFont copy to the destination buffer size instead of using an unchecked string copy.
Seen in 1 report
-
Bound the colour argument to the valid range for palette images.
Seen in 1 report
-
Bound the copy by the destination field size, not the source string length.
Seen in 1 report
-
$1,500 High
-
-
Bound the DNS value length before copying into the fixed stack buffer.
Seen in 1 report
-
Bound the formatted hex output length before appending to the fixed-size stack log buffer.
Seen in 1 report
-
Bound the integral row load to the allocated buffer.
Seen in 1 report
-
Bound the length of a URI directory before copying it into a stack buffer.
Seen in 1 report
-
Bound the number of bytes written to fixed-size stack buffers in varint decoding loops.
Seen in 1 report
-
Bound the number of client-supplied SLC triplets stored in the global array.
-
Bound the path copy to the 255-character stack buffer instead of looping without a length check.
Seen in 1 report
-
Bound the product of window dimensions before size arithmetic.
Seen in 1 report
-
$43,000 Critical
-
-
Bound the recursion in the string-conversion path.
Seen in 1 report
-
Bound the string scan to the size of the destination stack buffers.
Seen in 1 report
-
Bound the URL length before copying it into a fixed-size stack buffer for the XSS blacklist comparison.
Seen in 1 report
-
Bound the user-supplied length against the 32-byte stack buffer before copying.
-
Bounds check RPC-supplied array indices and restrict which save-file flags can be written.
-
Bounds-check array indexes taken from AVRCP data.
-
Bounds-check the clipboard type value supplied by the content process before indexing the cache array.
-
Bounds-check the copy counter against the fixed stack array size.
Seen in 1 report
-
Bounds-check the length value before using it as an index into the fixed-size stack buffer.
Seen in 1 report
-
Bounds-check the packet type before using it as an index into the statistics array.
Seen in 1 report
-
Bounds-check the password length field from CONNECT packets before using it.
Seen in 1 report
-
Calculate the node count correctly or avoid raw pointers across vector reallocation.
Seen in 1 report
-
Call the existing cleanup helper that unlinks a handle from its peers before clearing its fields.
Seen in 1 report
-
Cancel or join validation workers before tearing down the streaming processor.
Seen in 1 report
-
$1,000 High
-
-
Cancel pending selection commands when the editor state is freed.
Seen in 1 report