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."
This compiler optimization error occurs when: 1. Secret data are stored in memory. 1. The secret data are scrubbed from memory by overwriting its contents. 1. 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.
Impact: Read MemoryBypass Protection Mechanism
This weakness will allow data that has not been cleared from memory to be read. If this data contains sensitive password information, then an attacker can read the password and use the information to bypass protection mechanisms.
c
// Interaction with mainframe* }} memset(pwd, 0, sizeof(pwd));}