1630
Strategy = Resource Limitation
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).
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories 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.
Nature Type ID Name Page
MemberOf 982 SFP Secondary Cluster: Failure to Release Resource 888 2410
MemberOf 1163 SEI CERT C Coding Standard - Guidelines 09. Input
Output (FIO)
1154 2459
MemberOf 1416 Comprehensive Categorization: Resource Lifecycle
Management
1400 2545
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
CERT C Secure Coding FIO42-C CWE More
Abstract
Close files when they are no longer
needed
Software Fault Patterns SFP14 Failure to Release Resource
CWE-774: Allocation of File Descriptors or Handles Without Limits or
Throttling
Weakness ID : 774
Structure : Simple
Abstraction : Variant
Description
The product allocates file descriptors or handles on behalf of an actor without imposing any
restrictions on how many descriptors can be allocated, in violation of the intended security policy for
that actor.
Extended Description
This can cause the product to consume all available file descriptors or handles, which can prevent
other processes from performing critical file processing operations.
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, MemberOr 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 may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 770 Allocation of Resources Without Limits or Throttling 1613
CWE Version 4.14
CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime
CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime