Katalog CWE

CWE-400 · Słabość

Uncontrolled Resource Consumption

Abstrakcja
Klasa
Status
Szkic
Ryzyko wykorzystania
wysokie
Dodano
19 lipca 2006
Ostatnia zmiana
30 kwietnia 2026

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

The product does not properly control the allocation and maintenance of a limited resource.

Inne nazwy

Resource Exhaustion

Skutki

  • Availability

    DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)

    If an attacker can trigger the allocation of the limited resources, but the number or size of the resources is not controlled, then the most common result is denial of service. This would prevent valid users from accessing the product, and it could potentially have an impact on the surrounding environment, i.e., the product may slow down, crash due to unhandled errors, or lock out legitimate users. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.

  • Access Control, Other

    Bypass Protection Mechanism; Other

    In some cases it may be possible to force the product to "fail open" in the event of resource exhaustion. The state of the product -- and possibly the security functionality - may then be compromised.

Zapobieganie

  • Architecture and Design

    Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.

  • Architecture and Design

    Mitigation of resource exhaustion attacks requires that the target system either:

    - recognizes the attack and denies that user further access for a given amount of time, or

    - uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.

    The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.

    The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.

  • Architecture and Design

    Ensure that protocols have specific limits of scale placed on them.

  • Implementation

    Ensure that all failures in resource allocation place the system into a safe posture.

Przykłady podatności

Słabość nadrzędna

Słabości podrzędne

Kiedy powstaje

Dotyczy

Not Language-Specific, Not Technology-Specific, AI/ML

Uwagi

Vulnerability theory is largely about how behaviors and resources interact. "Resource exhaustion" can be regarded as either a consequence or an attack, depending on the perspective. This entry is an attempt to reflect the underlying weaknesses that enable these attacks (or consequences) to take place.

Database queries that take a long time to process are good DoS targets. An attacker would have to write a few lines of code to generate enough traffic to exceed the site's ability to keep up. This would effectively prevent authorized users from using the site at all. Resources can be exploited simply by ensuring that the target machine must do much more work and consume more resources in order to service a request than the attacker must do to initiate a request.

A prime example of this can be found in old switches that were vulnerable to "macof" attacks (so named for a tool developed by Dugsong). These attacks flooded a switch with random IP and MAC address combinations, therefore exhausting the switch's cache, which held the information of which port corresponded to which MAC addresses. Once this cache was exhausted, the switch would fail in an insecure way and would begin to act simply as a hub, broadcasting all traffic on all ports and allowing for basic sniffing attacks.

Limited resources include memory, file system storage, database connection pool entries, CPU, and others.

Źródła

  1. The CLASP Application Security Process — Secure Software, Inc., 2005
  2. Detection and Prediction of Resource-Exhaustion Vulnerabilities — Joao Antunes, Nuno Ferreira Neves, Paulo Verissimo, Proceedings of the IEEE International Symposium on Software Reliability Engineering (ISSRE), 2008
  3. Resource exhaustion — D.J. Bernstein
  4. Resource exhaustion — Pascal Meunier, Secure Programming Educational Material, 2004
  5. Writing Secure Code — Michael Howard, David LeBlanc, Chapter 17, "Protecting Against Denial of Service Attacks" Page 517, Microsoft Press, 2002

Wpis z katalogu CWE 4.20.