CWE-591

Variant Abstraction Level
Pillar — Highest-level weakness category
Class — Abstract, language-independent
Base — Specific enough to detect
Variant — Tied to specific technology
Compound — Requires multiple weaknesses
Draft MITRE CWE Status
Stable — Fully reviewed and complete
Draft — Under development, may change
Incomplete — Partially defined by MITRE
Deprecated — No longer recommended
Obsolete — Replaced by another CWE
Sensitive Data Storage in Improperly Locked Memory

Description

The product stores sensitive data in memory that is not locked, or that has been incorrectly locked.

Top Monitored CVEs

Consequences

Confidentiality — Read Application Data, Read Memory

The memory, including sensitive data, might be written to swap files on disk by the virtual memory manager, possibly making the data more accessible to adversaries.

Mitigations

Phase: Architecture and Design

Identify data that needs to be protected from swapping and choose platform-appropriate protection mechanisms.

Phase: Implementation

When using potentially risky functions such as mlock() or VirtualLock(), check return values to ensure that locking operations are successful.