CWE-14βCompiler Removal of Code to Clear Buffers
PUBLISHEDweakness record
released 2006-07-19 Β· last modified 2025-12-11
Metadata
- CWE ID:
- CWE-14
- Abstraction:
- Variant
- Structure:
- Simple
- Status:
- Draft
- Release Date:
- 2006-07-19
- Latest Modification Date:
- 2025-12-11
Weakness Name
Compiler Removal of Code to Clear Buffers
Description
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:
Common Consequences
- Scope:
- Confidentiality, Access Control
- Impact:
- Read Memory, Bypass Protection Mechanism
- Notes:
- 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.