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.
-
Reserve the growable array before appending so element pointers stay valid.
Seen in 1 report
-
Reset freed pointers on the error path so they are not freed twice.
Seen in 1 report
-
Reset the accumulated write position when recomputing transform feedback capacity on resume.
Seen in 1 report
-
Reset the connect-only handle when its connection is freed.
Seen in 1 report
-
Reset the pointer after freeing so the same chunk is not freed again in a loop.
Seen in 1 report
-
Reset the scoped secondary draw state when the context is destroyed.
Seen in 1 report
-
Reset the stored read length when swapping in a smaller buffer mid-read.
Seen in 1 report
-
Resize the buffer before writing and add runtime bounds checks.
Seen in 1 report
-
Restore all lower-layer callbacks when the TLS layer is closed so no callback writes into a freed transfer buffer.
-
Restore texture state on the early-return paths of multi-draw when texture preparation fails.
Seen in 1 report
-
Restrict IOCTL handlers to privileged callers and validate user arguments before passing them to memory copies.
-
Return a parsing error when the assertion consumer service URL is missing.
-
Return an error and avoid freeing shared state when initialisation fails.
-
Return an error when the size calculation overflows instead of continuing to copy data.
Seen in 1 report
-
Return immediately after the size check fails.
Seen in 1 report
-
Rewrite or invalidate stored values when a composite attribute's type is altered, or re-check types at execution.
Seen in 1 report
-
Security update corrects how DirectX handles objects in memory.
Seen in 1 report
-
Security update corrects how Office handles objects in memory.
Seen in 1 report
-
Security update corrects how the runtime handles memory.
Seen in 1 report
-
Security update corrects how the TSF server validates and handles messages from TSF clients.
Seen in 1 report
-
Security update corrects how the VBScript engine handles objects in memory.
Seen in 1 report
-
Security update corrects how Windows GDI handles objects in memory.
Seen in 1 report
-
Security update corrects the memory handling in wlansvc.dll.
Seen in 1 report
-
Security update corrects the uninitialized variable that caused the out-of-bounds read.
Seen in 1 report
-
Security updates were issued for affected Mac versions of Office.
Seen in 1 report
-
Select the SIMD kernel based on the narrowest plane width it will process.
Seen in 1 report
-
Set an error code on unsupported bit depth so the data phase does not run.
Seen in 1 report
-
Size scratch buffers using the same format used by the packing routine and check the result of size arithmetic.
Seen in 1 report
-
Size the buffer so the null terminator fits when the alias length is set to the manifest length minus fourteen.
Seen in 1 report
-
Size the character array to allow for the minus sign and terminator of the longest negative value.
Seen in 1 report
-
Size the copy from the number of values actually pushed, not from the declared count.
Seen in 1 report
-
Size the destination buffer by the actual multi-byte width of the characters.
Seen in 1 report
-
Size the ellipse shape buffer from the same values used to index it.
Seen in 1 report
-
Size the realpath buffer to at least PATH_MAX rather than a pathconf value or 256-byte fallback.
Seen in 1 report
-
Store the compressed size in a wide enough type so it cannot truncate.
Seen in 1 report
-
Synchronise fence destruction with asynchronous fence signalling.
Seen in 1 report
-
Synchronise session teardown against other connections holding the same user object.
Seen in 1 report
-
Synchronise texture parameter state to the backend before calculating level indices.
Seen in 1 report
-
Take the shared mutex on every path that touches the buffer handle.
Seen in 1 report
-
The credential helper double free was fixed in version 0.6.3.
Seen in 1 report
-
The DataView constructor should re-check whether the ArrayBuffer was detached after calling the prototype getter.
-
The decoder should check skip and count pairs cumulatively against the line width, not each pair on its own.
-
The decompressed size calculation should match the actual decompressed stream before the buffer is handed to the decompression routine.
Seen in 1 report
-
The error path should clear the input pointer when the buffer allocation fails so a later call does not write into freed memory.
Seen in 1 report
-
$1,500 Critical
-
-
The fixed version stops copying the filename after six characters.
-
The maximum array size macro should divide by the element size so the allocation check rejects oversized requests.
Seen in 1 report
-
The update removes Equation Editor functionality rather than patching the parser.
Seen in 1 report
-
The vendor classified the risk as shared and will not release a patch, so the fix is to restrict which Bluetooth devices can pair.
Seen in 1 report
-
The vendor fixed the wowlan_config use-after-free in a firmware release.
Seen in 1 report
-
Track 32-bit sub-register bounds using the 32-bit values rather than the 64-bit ones.
Seen in 1 report