CWE-763
Weakness AllowedRelease of Invalid Pointer or Reference
Abstraction: Base · Status: Incomplete
The product attempts to return a memory resource to the system, but it calls the wrong release function or calls the appropriate release function incorrectly.
Technical nuance
This weakness can take several forms, such as:
The memory was allocated, explicitly or implicitly, via one memory management method and deallocated using a different, non-compatible function (CWE-762).
The function calls or memory management routines chosen are appropriate, however they are used incorrectly, such as in CWE-761.
Mapping guidance
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
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.
Relationships and members
Modes of introduction
Detection methods
Fuzzing
Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.
Effectiveness: High
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].
Effectiveness: Moderate
Crafted inputs are necessary to reach the code containing the error, such as generated by fuzzers. Also, these tools may reduce performance, and they only report the error condition - not the original mistake that led to the error.
Notes
Maintenance
The view-1000 subtree that is associated with this weakness needs additional work. Several entries will likely be created in this branch. Currently the focus is on free() of memory, but delete and other related release routines may require the creation of intermediate entries that are not specific to a particular function. In addition, the role of other types of invalid pointers, such as an expired pointer, i.e. CWE-415 Double Free and release of uninitialized pointers, related to CWE-457.
Content history
updated Description
updated Relationships
updated Common_Consequences
updated Common_Consequences, Demonstrative_Examples, Relationships
updated Potential_Mitigations
updated Potential_Mitigations
updated Relationships, Taxonomy_Mappings
updated Relationships
updated Relationships
updated Relationships
updated Relationships
updated Maintenance_Notes
updated Description
updated Detection_Factors, References, Relationships
updated Mapping_Notes
updated Observed_Examples
updated Applicable_Platforms
updated Functional_Areas, References
updated Applicable_Platforms, Detection_Factors, References, Weakness_Ordinalities
updated Detection_Factors, Potential_Mitigations
updated Demonstrative_Examples, Description, Observed_Examples, Technical_Nuance
174 vulnerabilities reference this CWE, most recent first.
GHSA-W833-PX7J-Q64C
Vulnerability from github – Published: 2023-10-19 12:30 – Updated: 2024-04-04 08:47The Motorola MTM5000 series firmwares lack pointer validation on arguments passed to trusted execution environment (TEE) modules. Two modules are used, one responsible for KVL key management and the other for TETRA cryptographic functionality. In both modules, an adversary with non-secure supervisor level code execution can exploit the issue in order to gain secure supervisor code execution within the TEE. This constitutes a full break of the TEE module, exposing the device key as well as any TETRA cryptographic keys and the confidential TETRA cryptographic primitives.
{
"affected": [],
"aliases": [
"CVE-2022-26942"
],
"database_specific": {
"cwe_ids": [
"CWE-763",
"CWE-822"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-10-19T10:15:09Z",
"severity": "HIGH"
},
"details": "The Motorola MTM5000 series firmwares lack pointer validation on arguments passed to trusted execution environment (TEE) modules. Two modules are used, one responsible for KVL key management and the other for TETRA cryptographic functionality. In both modules, an adversary with non-secure supervisor level code execution can exploit the issue in order to gain secure supervisor code execution within the TEE. This constitutes a full break of the TEE module, exposing the device key as well as any TETRA cryptographic keys and the confidential TETRA cryptographic primitives. ",
"id": "GHSA-w833-px7j-q64c",
"modified": "2024-04-04T08:47:34Z",
"published": "2023-10-19T12:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-26942"
},
{
"type": "WEB",
"url": "https://tetraburst.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WG63-8XJW-5WVX
Vulnerability from github – Published: 2022-06-17 00:01 – Updated: 2022-06-28 00:00In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when using Postgres database extension, supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized data as pointers. This could lead to RCE vulnerability or denial of service.
{
"affected": [],
"aliases": [
"CVE-2022-31625"
],
"database_specific": {
"cwe_ids": [
"CWE-763"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-06-16T06:15:00Z",
"severity": "CRITICAL"
},
"details": "In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when using Postgres database extension, supplying invalid parameters to the parametrized query may lead to PHP attempting to free memory using uninitialized data as pointers. This could lead to RCE vulnerability or denial of service.",
"id": "GHSA-wg63-8xjw-5wvx",
"modified": "2022-06-28T00:00:55Z",
"published": "2022-06-17T00:01:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31625"
},
{
"type": "WEB",
"url": "https://bugs.php.net/bug.php?id=81720"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3T4MMEEZYYAEHPQMZDFN44PHORJWJFZQ"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZZTZQKRGEYJT5UB4FGG3MOE72SQUHSL4"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202209-20"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20220722-0005"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2022/dsa-5179"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X97V-6WF2-6FFP
Vulnerability from github – Published: 2022-08-26 00:03 – Updated: 2022-08-28 00:00An invalid memory address reference was discovered in the elf_lookup function in p_lx_elf.cpp in UPX 4.0.0 via a crafted Mach-O file.
{
"affected": [],
"aliases": [
"CVE-2020-27797"
],
"database_specific": {
"cwe_ids": [
"CWE-119",
"CWE-763"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-08-25T20:15:00Z",
"severity": "MODERATE"
},
"details": "An invalid memory address reference was discovered in the elf_lookup function in p_lx_elf.cpp in UPX 4.0.0 via a crafted Mach-O file.",
"id": "GHSA-x97v-6wf2-6ffp",
"modified": "2022-08-28T00:00:28Z",
"published": "2022-08-26T00:03:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-27797"
},
{
"type": "WEB",
"url": "https://github.com/upx/upx/issues/390"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XXXV-9J5G-VQFC
Vulnerability from github – Published: 2026-05-28 12:30 – Updated: 2026-07-30 12:32In the Linux kernel, the following vulnerability has been resolved:
RDMA/vmw_pvrdma: Fix double free on pvrdma_alloc_ucontext() error path
Sashiko points out that pvrdma_uar_free() is already called within pvrdma_dealloc_ucontext(), so calling it before triggers a double free.
{
"affected": [],
"aliases": [
"CVE-2026-46189"
],
"database_specific": {
"cwe_ids": [
"CWE-1341",
"CWE-415",
"CWE-763"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-28T10:16:34Z",
"severity": "HIGH"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/vmw_pvrdma: Fix double free on pvrdma_alloc_ucontext() error path\n\nSashiko points out that pvrdma_uar_free() is already called within\npvrdma_dealloc_ucontext(), so calling it before triggers a double free.",
"id": "GHSA-xxxv-9j5g-vqfc",
"modified": "2026-07-30T12:32:08Z",
"published": "2026-05-28T12:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-46189"
},
{
"type": "WEB",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46189.json"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/ecc36a82ecfcfdf3c6606d209f22ec5543c410e0"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/e38e86995df27f1f854063dab1f0c6a513db3faf"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/935ee27d0904aa944cbcc979094c20e5ef62eead"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/45d25e3ec17900bf5a9d6876ff16ceee31c4c0e0"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/3a231c34c5bc3d3cfc850b877758ec9fdaa8a483"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/269967d7693304e1f06ed2dff4ebbbeeb397cda4"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/1df5711121cdc11e76b889408fdbe459feba1d39"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/0c63333ff97bd1275294fd12840a0efe9d7a4c59"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2482588"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-46189"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:47633"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:40760"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:40068"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:38902"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:36767"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:36073"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:36049"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:35904"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:33743"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:33685"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:30848"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
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().
Mitigation
When programming in C++, consider using smart pointers provided by the boost library to help correctly and consistently manage memory.
Mitigation MIT-4.6
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- For example, glibc in Linux provides protection against free of invalid pointers.
Mitigation
Use a language that provides abstractions for memory allocation and deallocation.
No CAPEC attack patterns related to this CWE.