Because the programme does not effectively manage the allocation and upkeep of
a finite resource, an actor is able to affect how much is used, eventually
causing the finite resource to run out.
Memory, file system storage, database connection pool entries, and CPU all
have limited resources. An attacker could produce a denial of service that
exhausts all resources if they are able to force the allocation of these
scarce resources but the quantity or size of the resources is not regulated.
This would hinder legitimate users from using the software, and it might have
an effect on the environment. A memory depletion attack against a programme,
for instance, can cause both the application and its host operating system to
lag.
There are at least three distinct scenarios which can commonly lead to
resource exhaustion:
Lack of throttling for the number of allocated resources
Losing all references to a resource before reaching the shutdown stage
Not closing/returning a resource after processing
Resource exhaustion problems are often result due to an incorrect
implementation of the following situations:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for releasing the
resource.