CWEweakness

CWE-772 Missing Release of Resource after Effective Lifetime

High Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Likelihood of exploit
High
CWE version
5.0

Description

The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.

Common consequences

• Availability: DoS: Resource Consumption (Other), DoS: Resource Consumption (Memory), DoS: Resource Consumption (CPU) — An attacker that can influence the allocation of resources that are not properly released could deplete the available resource pool and prevent all other processes from accessing the same type of resource. Frequently-affected resources include memory, CPU, disk space, power or battery, etc.

Potential mitigations

• [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, languages such as Java, Ruby, and Lisp perform automatic garbage collection that releases memory for objects that have been deallocated. • [Implementation] It is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free resources in a function. If you allocate resources that you intend to free upon completion of the function, you must be sure to free the resources at all exit points for that function including error conditions. • [Operation, Architecture and Design] Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems. When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users. Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2007-0897: Chain: anti-virus product encounters a malformed file but returns from a function without closing a file descriptor (CWE-775) leading to file descriptor consumption (CWE-400) and failed scans. • CVE-2001-0830: Sockets not properly closed when attacker repeatedly connects and disconnects from server. • CVE-1999-1127: Does not shut down named pipe connections if malformed data is sent. • CVE-2009-2858: Chain: memory leak (CWE-404) leads to resource exhaustion. • CVE-2009-2054: Product allows exhaustion of file descriptors when processing a large number of TCP packets. • CVE-2008-2122: Port scan triggers CPU consumption with processes that attempt to read data from closed sockets. • CVE-2007-4103: Product allows resource exhaustion via a large number of calls that do not complete a 3-way handshake. • CVE-2002-1372: Chain: Return values of file/socket operations are not checked (CWE-252), allowing resultant consumption of file descriptors (CWE-772).

Related

Attack pattern · CAPEC (1)

Observed example · CVE (8)

  • CVE-2009-2054 Cisco Unified Communications Manager (aka CUCM, formerly CallManager) 4.x, 5.x before 5.1(3g), 6.x before 6.1(4), 7.0 before 7.0(2a)su1,… vulnerability
  • CVE-2009-2858 Memory leak in the Security component in IBM DB2 8.1 before FP18 on Unix platforms allows attackers to cause a denial of service (memory… vulnerability
  • CVE-2008-2122 IBM Rational Build Forge 7.0.2 allows remote attackers to cause a denial of service (CPU consumption) via a port scan, which spawns… vulnerability
  • CVE-2007-4103 The IAX2 channel driver (chan_iax2) in Asterisk Open 1.2.x before 1.2.23, 1.4.x before 1.4.9, and Asterisk Appliance Developer Kit before… vulnerability
  • CVE-2007-0897 Clam AntiVirus ClamAV before 0.90 does not close open file descriptors under certain conditions, which allows remote attackers to cause a… vulnerability
  • CVE-2002-1372 Common Unix Printing System (CUPS) 1.1.14 through 1.1.17 does not properly check the return values of various file and socket operations,… vulnerability
  • CVE-2001-0830 6tunnel 0.08 and earlier does not properly close sockets that were initiated by a client, which allows remote attackers to cause a denial… vulnerability
  • CVE-1999-1127 Windows NT 4.0 does not properly shut down invalid named pipe RPC connections, which allows remote attackers to cause a denial of service… vulnerability

Child of · CWE (1)

  • CWE-404 Improper Resource Shutdown or Release weakness

Referenced by CAPEC · weakness (1)

Referenced by CVE · weakness (523)

  • CVE-2026-112200 P-Net before 1.0.3 does not release the Application Relationship (AR) and the RPC session when an RPC request is rejected because its data… vulnerability
  • CVE-2026-115793 P-Net before 1.0.3 does not release the RPC session allocated for an RPC request that names an unknown interface or object UUID, and does… vulnerability
  • CVE-2026-90870 A missing release of backend receiver sessions in the Ad Hoc Transfer component of Progress Software WS_FTP Server versions prior to… vulnerability
  • CVE-2026-118262 Echo is a Go web framework. vulnerability
  • CVE-2026-81039 The Bluetooth host pre-allocates a bt_conn object (a "reservation") from the fixed acl_conns[] pool for every connectable advertising set… vulnerability
  • CVE-2026-114236 storage/pkg/archive.ApplyLayer and ApplyUncompressedLayer may, when processing corrupt or malicious inputs, leak a file descriptor;… vulnerability
  • CVE-2026-95108 One logical thread of a user-mode ThreadX module costs the Module Manager's shared object pool two allocations, not one. vulnerability
  • CVE-2026-89096 A flaw was found in nfs-utils. vulnerability
  • CVE-2026-59951 The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). vulnerability
  • CVE-2026-19937 The Bluetooth Mesh Access layer delayable-message machinery in subsys/bluetooth/mesh/delayable_msg.c manages a static pool of… vulnerability
  • CVE-2026-77205 Libreswan in FIPS mode has a vulnerability where badly formed received certificates are rejected, but not deleted from the NSS cache. vulnerability
  • CVE-2026-16678 IBM Power Systems Firmware FW1110.00 through FW1110.31, FW1120.00 through FW1120.01, and FW1060.00 through FW1060.81 could allow a remote… vulnerability
  • CVE-2026-19739 The Bluetooth Link Layer control procedure code in subsys/bluetooth/controller/ll_sw/ull_llcp_conn_upd.c retains the received RX node while… vulnerability
  • CVE-2026-19740 The Link Layer Control Procedure (LLCP) implementation of the Zephyr software Bluetooth LE Controller retains the receive node that carried… vulnerability
  • CVE-2026-104112 A missing release of resources in the illumos name service cache daemon (nscd) allows a local user to exhaust kernel memory. vulnerability
  • CVE-2026-107834 OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. vulnerability
  • CVE-2026-107286 Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. vulnerability
  • CVE-2026-104031 A flaw was found in SSSD. vulnerability
  • CVE-2026-104035 A flaw was found in SSSD. vulnerability
  • CVE-2026-104045 A flaw was found in SSSD. vulnerability
  • CVE-2026-93926 Missing release of memory after effective lifetime, Missing release of resource after effective lifetime vulnerability in Apache Thrift… vulnerability
  • CVE-2026-94651 improper handling of exceptional conditions, Missing release of resource after effective lifetime vulnerability in Apache Thrift java… vulnerability
  • CVE-2026-97686 Wind River VxWorks 7 prior to 26.09, specific system call arguments can result in the IPNET subsystem failing to properly release allocated… vulnerability
  • CVE-2026-100079 In the Linux kernel, the following vulnerability has been resolved: usb: typec: ucsi: unregister debugfs entries on teardown… vulnerability
  • CVE-2026-79677 Missing release of resource after effective lifetime, Comparison using wrong factors vulnerability in Apache Tomcat allows a denial of… vulnerability
  • CVE-2026-94625 vLLM through 0.29.0 contains a resource exhaustion vulnerability in MooncakeConnector where rejected prefill requests create ownerless… vulnerability
  • CVE-2026-85718 The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. vulnerability
  • CVE-2026-92230 Apache Karaf's XmlUtils cached XML parser/transformer factories in static ThreadLocal fields on long-lived container threads. vulnerability
  • CVE-2026-92983 InternLM LMDeploy through 0.17.0 in DistServe prefill/decode disaggregation mode fails to release scheduler sessions because the proxy uses… vulnerability
  • CVE-2026-20250 A vulnerability in Datagram TLS (DTLS) message handling of Cisco Secure Firewall Adaptive Security Appliance (ASA) Software and Cisco… vulnerability
Show all 523 ›

Referenced by CWE · can precede (1)

  • CWE-911 Improper Update of Reference Count weakness

Referenced by CWE · child of (3)

  • CWE-1091 Use of Object without Invoking Destructor Method weakness
  • CWE-401 Missing Release of Memory after Effective Lifetime weakness
  • CWE-775 Missing Release of File Descriptor or Handle after Effective Lifetime weakness

Referenced by CWE · has member (2)

  • CWE-1200 Weaknesses in the 2019 CWE Top 25 Most Dangerous Software Errors view
  • CWE-884 CWE Cross-section view