CWE-14: Compiler Removal of Code to Clear Buffers
VariantDraft
Sensitive memory is cleared according to the source code, but compiler optimizations leave the memory untouched when it is not read from again, aka "dead store removal."
View on MITREBack to CWE Lookup
Extended Description
This compiler optimization error occurs when: Secret data are stored in memory. The secret data are scrubbed from memory by overwriting its contents. The source code is compiled using an optimizing compiler, which identifies and removes the function that overwrites the contents as a dead store because the memory is not used subsequently.
Technical Details
- Structure
- Simple
Applicable To
CC++