Operation on a Resource after Expiration or ReleaseID: 672 | Date: (C)2012-05-14 (M)2022-10-10 |
Type: weakness | Status: DRAFT |
Abstraction Type: Base |
Description
The software uses, accesses, or otherwise operates on a
resource after that resource has been expired, released, or
revoked.
Applicable PlatformsNone
Time Of Introduction
- Architecture and Design
- Implementation
- Operation
Common Consequences
Scope | Technical Impact | Notes |
---|
IntegrityConfidentiality | Modify application
dataRead application
data | If a released resource is subsequently reused or reallocated, then an
attempt to use the original resource might allow access to sensitive
data that is associated with a different user or entity. |
OtherAvailability | OtherDoS: crash / exit /
restart | When a resource is released it might not be in an expected state,
later attempts to access the resource may lead to resultant errors that
may lead to a crash. |
Detection MethodsNone
Potential MitigationsNone
Relationships
Related CWE | Type | View | Chain |
---|
CWE-672 ChildOf CWE-892 | Category | CWE-888 | |
Demonstrative Examples (Details)
- In the following C/C++ example the method processMessage is used to
process a message received in the input array of char arrays. The input
message array contains two char arrays: the first is the length of the
message and the second is the body of the message. The length of the message
is retrieved and used to allocate enough memory for a local char array,
messageBody, to be created for the message body. The messageBody is
processed in the method processMessageBody that will return an error if an
error occurs while processing. If an error occurs then the return result
variable is set to indicate an error and the messageBody char array memory
is released using the method free and an error message is sent to the
logError method.
- The following code shows a simple example of a double free
error: (Demonstrative Example Id DX-72)
- The following code shows a simple example of a use after free
error: (Demonstrative Example Id DX-71)
Observed Examples
- CVE-2009-3547 : chain: race condition might allow resource to be released before operating on it, leading to NULL dereference
For more examples, refer to CVE relations in the bottom box.
White Box Definitions None
Black Box Definitions None
Taxynomy MappingsNone
References:None