CWE•Variant•Incomplete•2 recent CVEs
CWE-762Mismatched Memory Management Routines
Description
The product attempts to return a memory resource to the system, but it calls a release function that is not compatible with the function that was originally used to allocate that resource.
[object Object]
Common consequences
- Integrity,Availability,Confidentiality→Modify Memory,DoS: Crash, Exit, or Restart,Execute Unauthorized Code or Commands
Potential mitigations
- ImplementationOnly call matching memory management functions. Do not mix and match routines. For example, when you allocate a buffer with malloc(), dispose of the original pointer with free().
- Implementation[object Object]
- Architecture and Design[object Object]
- Architecture and DesignUse a language that provides abstractions for memory allocation and deallocation.