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 |
PQL Name:
std.defects.SENSITIVE_STACK_NOT_CLEARED
|
Version History
Introduced in R2015b
See Also
Sensitive heap memory not cleared before release | Sensitive data printed out | Find defects (-checkers)
Topics
- Interpret Polyspace Bug Finder Results in Polyspace Platform User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Polyspace Results Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)