CWE-562

Return of Stack Variable Address

Medium

Description

A function returns the address of a stack variable, which will cause unintended program behavior, typically in the form of a crash.

Potential Impact

How to Fix

Testing

Use static analysis tools to spot return of the address of a stack variable.

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-562 vulnerabilities in your codebase.

Get Security Assessment