Skip to content
OpenAdvisories

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)
  1. Implementation

    Store the sensitive data in a "volatile" memory location if available.

  2. Build and Compilation

    If possible, configure the compiler so that it does not remove dead stores.

  3. 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.