CWE-773: Missing Reference to Active File Descriptor or Handle
The product does not properly maintain references to a file descriptor or handle, which prevents that file descriptor/handle from being reclaimed.
Last updated
Overview
This can cause the product to consume all available file descriptors or handles, which can prevent other processes from performing critical file processing operations.
Common consequences
What can happen when CWE-773 is exploited.
DoS: Resource Consumption (Other)
Affects: Availability
An attacker that can influence the allocation of resources that are not properly maintained could deplete the available resource pool and prevent all other processes from accessing the same type of resource.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-773, grouped by where in the lifecycle they apply.
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.