Katalog CWE

CWE-826 · Słabość

Premature Release of Resource During Expected Lifetime

Abstrakcja
Bazowa
Status
Niekompletny
Dodano
22 września 2010
Ostatnia zmiana
11 grudnia 2025

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

Opis

The product releases a resource that is still intended to be used by itself or another actor.

This weakness focuses on errors in which the product should not release a resource, but performs the release anyway. This is different than a weakness in which the product releases a resource at the appropriate time, but it maintains a reference to the resource, which it later accesses. For this weakness, the resource should still be valid upon the subsequent access.

When a product releases a resource that is still being used, it is possible that operations will still be taken on this resource, which may have been repurposed in the meantime, leading to issues similar to CWE-825. Consequences may include denial of service, information exposure, or code execution.

Skutki

  • Confidentiality

    Read Application Data; Read Memory

    If the released resource is subsequently reused or reallocated, then a read operation on the original resource might access sensitive data that is associated with a different user or entity.

  • Availability

    DoS: Crash, Exit, or Restart

    When the resource is released, the software might modify some of its structure, or close associated channels (such as a file descriptor). When the software later accesses the resource as if it is valid, the resource might not be in an expected state, leading to resultant errors that may lead to a crash.

  • Integrity, Confidentiality, Availability

    Execute Unauthorized Code or Commands; Modify Application Data; Modify Memory

    When the resource is released, the software might modify some of its structure. This might affect logic in the sections of code that still assume the resource is active. If the released resource is related to memory and is used in a function call, or points to unexpected data in a write operation, then code execution may be possible upon subsequent accesses.

Przykłady podatności

Słabość nadrzędna

Może prowadzić do

Kiedy powstaje

Dotyczy

Not Language-Specific

Uwagi

Under-studied and under-reported as of September 2010. This weakness has been reported in high-visibility software, although the focus has been primarily on memory allocation and de-allocation. There are very few examples of this weakness that are not directly related to memory management, although such weaknesses are likely to occur in real-world software for other types of resources.

Wpis z katalogu CWE 4.20.