Weakness (CWE)
CWE-14: Compiler Removal of Code to Clear Buffers
Variant Draft
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."
How to prevent it (3 mitigations)
-
Implementation
Store the sensitive data in a "volatile" memory location if available.
-
Build and Compilation
If possible, configure the compiler so that it does not remove dead stores.
-
Architecture and Design
Where possible, encrypt sensitive data that are used by a software system.
Source: MITRE CWE-14
0 results · Clear filters · Feed
Nothing found.