Szczegóły CWE-762

CWE-762

Mismatched Memory Management Routines
2009-05-27
00h00 +00:00
Niski
Incomplete
2026-10-28
00h00 +00:00
Powiadomienia dla konkretnego CWE
Bądź na bieżąco z wszelkimi zmianami dotyczącymi konkretnego CWE.
Zarządzaj powiadomieniami

Nazwa: Mismatched Memory Management Routines

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.

Informacje ogólne

Sposoby wprowadzenia

Implementation

Odpowiednie platformy

Język

Klasa: Memory-Unsafe (Often)
Nazwa: C (Undetermined)
Nazwa: C++ (Undetermined)

Typowe konsekwencje

Zakres Wpływ Prawdopodobieństwo
Integrity
Availability
Confidentiality
Modify Memory, DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands

Uwaga: When the memory management functions are mismatched, the consequences may be as severe as code execution, memory corruption, or program crash. Consequences and ease of exploit will vary depending on the implementation of the routines and the object being managed.

Zaobserwowane przykłady

Odniesienia Opis

CVE-2025-11015

3D engine rendering backend performs a delete[] on a buffer that was allocated using malloc()

Potencjalne środki zaradcze

Phases : Implementation
Only 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().
Phases : Implementation
Phases : Architecture and Design
Phases : Architecture and Design
Use a language that provides abstractions for memory allocation and deallocation.

Metody wykrywania

Automated Dynamic Analysis

Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518] or valgrind [REF-480].
Skuteczność : Moderate

Uwagi dotyczące mapowania podatności

Uzasadnienie : This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Komentarz : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Notatki


Odniesienia

REF-657

boost C++ Library Smart Pointers
https://www.boost.org/doc/libs/1_38_0/libs/smart_ptr/smart_ptr.htm

REF-480

Valgrind
https://valgrind.org/

REF-391

Transitioning to ARC Release Notes
iOS Developer Library.
https://developer.apple.com/library/archive/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html

REF-1518

AddressSanitizer
https://clang.llvm.org/docs/AddressSanitizer.html

Zgłoszenie

Nazwa Organizacja Data Data wydania Version
CWE Content Team MITRE 2009-05-08 +00:00 2009-05-27 +00:00 1.4

Modyfikacje

Nazwa Organizacja Data Komentarz
CWE Content Team MITRE 2009-12-28 +00:00 updated Applicable_Platforms, Likelihood_of_Exploit
CWE Content Team MITRE 2010-06-21 +00:00 updated Description, Potential_Mitigations
CWE Content Team MITRE 2011-06-01 +00:00 updated Common_Consequences
CWE Content Team MITRE 2011-09-13 +00:00 updated Relationships, Taxonomy_Mappings
CWE Content Team MITRE 2012-05-11 +00:00 updated Demonstrative_Examples, Relationships
CWE Content Team MITRE 2012-10-30 +00:00 updated Potential_Mitigations
CWE Content Team MITRE 2014-02-18 +00:00 updated Demonstrative_Examples, Potential_Mitigations, References
CWE Content Team MITRE 2014-07-30 +00:00 updated Relationships, Taxonomy_Mappings
CWE Content Team MITRE 2017-11-08 +00:00 updated Applicable_Platforms, References, Taxonomy_Mappings
CWE Content Team MITRE 2019-01-03 +00:00 updated Relationships
CWE Content Team MITRE 2020-02-24 +00:00 updated Relationships
CWE Content Team MITRE 2020-12-10 +00:00 updated Relationships
CWE Content Team MITRE 2021-03-15 +00:00 updated Relationships
CWE Content Team MITRE 2023-01-31 +00:00 updated Description
CWE Content Team MITRE 2023-04-27 +00:00 updated References, Relationships
CWE Content Team MITRE 2023-06-29 +00:00 updated Mapping_Notes
CWE Content Team MITRE 2025-09-09 +00:00 updated Functional_Areas, References
CWE Content Team MITRE 2025-12-11 +00:00 updated Applicable_Platforms, Detection_Factors, Potential_Mitigations, References, Weakness_Ordinalities
CWE Content Team MITRE 2026-04-30 +00:00 updated Detection_Factors
CWE Content Team MITRE 2026-10-28 +00:00 updated Common_Consequences, Description, Observed_Examples, Technical_Nuance