CWE-761: Free of Pointer not at Start of Buffer

ID CWE-761
Abstraction Variant
Structure Simple
Status Incomplete
The product calls free() on a pointer to a memory resource that was allocated on the heap, but the pointer is not at the start of the buffer.

This can cause the product to crash, or in some cases, modify critical program variables or execute code.

This weakness often occurs when the memory is allocated explicitly on the heap with one of the malloc() family functions and free() is called, but pointer arithmetic has caused the pointer to be in the interior or end of the buffer.

Modes of Introduction

Phase Note
Implementation

Relationships

View Weakness
# ID View Status # ID Name Abstraction Structure Status
CWE-1000 Research Concepts Draft CWE-763 Release of Invalid Pointer or Reference Base Simple Incomplete
CWE-1340 CISQ Data Protection Measures Incomplete CWE-404 Improper Resource Shutdown or Release Class Simple Draft
Loading...
Loading...