CWE-825

Expired Pointer Dereference

High

Description

The product dereferences a pointer that contains a location for memory that was previously valid, but is no longer valid.

Potential Impact

How to Fix

Architecture and Design

Choose a language that provides automatic memory management.

Implementation

When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

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-825 vulnerabilities in your codebase.

Get Security Assessment