Main Content
Uncleared sensitive data in stack
Variable in stack is not cleared and contains sensitive data
Description
This defect occurs when statically allocated memory contains sensitive data and you do not clear the data before exiting a function or program.
Risk
Leaving sensitive information in your stack, such as passwords or user information, allows an attacker additional access to the information after your program has ended.
Fix
Before exiting a function or program, clear out the memory zones
that contain sensitive data by using memset
or SecureZeroMemory
.
Examples
Result Information
Group: Security |
Language: C | C++ |
Default: Off |
Command-Line Syntax: SENSITIVE_STACK_NOT_CLEARED |
Impact: Medium |
Version History
Introduced in R2015b
See Also
Sensitive heap memory not cleared before release
| Sensitive data printed out
| Find defects (-checkers)
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)