Common Weakness Enumeration

A Community-Developed List of Software Weakness Types

CWE/SANS Top 25 Most Dangerous Software Errors
Home > CWE List > CWE- Individual Dictionary Definition (3.0)  

CWE-664: Improper Control of a Resource Through its Lifetime

Weakness ID: 664
Abstraction: Class
Structure: Simple
Status: Draft
Presentation Filter:
+ Description
The software does not maintain or incorrectly maintains control over a resource throughout its lifetime of creation, use, and release.
+ Extended Description

Resources often have explicit instructions on how to be created, used and destroyed. When software does not follow these instructions, it can lead to unexpected behaviors and potentially exploitable states.

Even without explicit instructions, various principles are expected to be adhered to, such as "Do not use an object until after its creation is complete," or "do not use an object after it has been slated for destruction."

+ Relationships

The table(s) below shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.

+ Relevant to the view "Research Concepts" (CWE-1000)
MemberOfViewView1000Research Concepts
ParentOfClassClass216Containment Errors (Container Errors)
ParentOfClassClass221Information Loss or Omission
ParentOfClassClass284Improper Access Control
ParentOfBaseBase400Uncontrolled Resource Consumption ('Resource Exhaustion')
ParentOfBaseBase404Improper Resource Shutdown or Release
ParentOfClassClass405Asymmetric Resource Consumption (Amplification)
ParentOfBaseBase410Insufficient Resource Pool
ParentOfBaseBase471Modification of Assumed-Immutable Data (MAID)
ParentOfVariantVariant487Reliance on Package-level Scope
ParentOfVariantVariant488Exposure of Data Element to Wrong Session
ParentOfVariantVariant495Private Array-Typed Field Returned From A Public Method
ParentOfVariantVariant496Public Data Assigned to Private Array-Typed Field
ParentOfVariantVariant498Cloneable Class Containing Sensitive Information
ParentOfVariantVariant499Serializable Class Containing Sensitive Data
ParentOfBaseBase501Trust Boundary Violation
ParentOfVariantVariant580clone() Method Without super.clone()
ParentOfClassClass610Externally Controlled Reference to a Resource in Another Sphere
ParentOfBaseBase662Improper Synchronization
ParentOfClassClass665Improper Initialization
ParentOfBaseBase666Operation on Resource in Wrong Phase of Lifetime
ParentOfClassClass668Exposure of Resource to Wrong Sphere
ParentOfClassClass669Incorrect Resource Transfer Between Spheres
ParentOfClassClass673External Influence of Sphere Definition
ParentOfClassClass704Incorrect Type Conversion or Cast
ParentOfClassClass706Use of Incorrectly-Resolved Name or Reference
ParentOfBaseBase749Exposed Dangerous Method or Function
ParentOfBaseBase908Use of Uninitialized Resource
ParentOfBaseBase911Improper Update of Reference Count
ParentOfClassClass913Improper Control of Dynamically-Managed Code Resources
ParentOfClassClass922Insecure Storage of Sensitive Information
+ Relevant to the view "Weaknesses for Simplified Mapping of Published Vulnerabilities" (CWE-1003)
+ Relevant to the view "Development Concepts" (CWE-699)
+ Modes Of Introduction

The different Modes of Introduction provide information about how and when this weakness may be introduced. The Phase identifies a point in the software life cycle at which introduction may occur, while the Note provides a typical scenario related to introduction during the given phase.

+ Common Consequences

The table below specifies different individual consequences associated with the weakness. The Scope identifies the application security area that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in exploiting this weakness. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a weakness will be exploited to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.


Technical Impact: Other

+ Potential Mitigations

Phase: Testing

Use Static analysis tools to check for unreleased resources.
+ Memberships
This MemberOf Relationships table shows additional CWE Categories and Views that reference this weakness as a member. This information is often useful in understanding where a weakness fits within the context of external information sources.
MemberOfCategoryCategory3617PK - Time and State
MemberOfCategoryCategory984SFP Secondary Cluster: Life Cycle
+ Notes


More work is needed on this node and its children. There are perspective/layering issues; for example, one breakdown is based on lifecycle phase (CWE-404, CWE-665), while other children are independent of lifecycle, such as CWE-400. Others do not specify as many bases or variants, such as CWE-704, which primarily covers numbers at this stage.
+ Taxonomy Mappings
Mapped Taxonomy NameNode IDFitMapped Node Name
CERT C Secure CodingFIO39-CCWE More AbstractDo not alternately input and output from a stream without an intervening flush or positioning call
+ Content History
Modification DateModifierOrganization
2008-07-01Eric DalciCigital
updated Potential_Mitigations, Time_of_Introduction
2008-09-08CWE Content TeamMITRE
updated Description, Maintenance_Notes, Relationships, Type
2009-03-10CWE Content TeamMITRE
updated Related_Attack_Patterns
2009-05-27CWE Content TeamMITRE
updated Description, Name, Relationships
2009-07-27CWE Content TeamMITRE
updated Relationships
2010-02-16CWE Content TeamMITRE
updated Relationships
2010-12-13CWE Content TeamMITRE
updated Description, Relationships
2011-03-29CWE Content TeamMITRE
updated Relationships
2011-06-01CWE Content TeamMITRE
updated Common_Consequences, Relationships
2012-05-11CWE Content TeamMITRE
updated Related_Attack_Patterns, Relationships
2012-10-30CWE Content TeamMITRE
updated Potential_Mitigations
2013-02-21CWE Content TeamMITRE
updated Relationships
2013-07-17CWE Content TeamMITRE
updated Relationships
2014-07-30CWE Content TeamMITRE
updated Relationships
2015-12-07CWE Content TeamMITRE
updated Relationships
2017-01-19CWE Content TeamMITRE
updated Relationships
2017-11-08CWE Content TeamMITRE
updated Relationships, Taxonomy_Mappings
Previous Entry Names
Change DatePrevious Entry Name
2009-05-27Insufficient Control of a Resource Through its Lifetime

More information is available — Please select a different filter.
Page Last Updated: January 18, 2018