CWE-666: Operation on Resource in Wrong Phase of Lifetime
Operation on Resource in Wrong Phase of Lifetime
Weakness ID: 666 (Weakness Base)
Status: Draft
Description
Description Summary
The software performs an operation on a resource at the wrong
phase of the resource's lifecycle, which can lead to unexpected
behaviors.
Extended Description
When a developer wants to initialize, use or release a resource, it is
important to follow the specifications outlined for how to operate on that
resource and to ensure that the resource is in the expected state. In this
case, the software wants to perform a normally valid operation,
initialization, use or release, on a resource when it is in the incorrect
phase of its lifetime.
Time of Introduction
Implementation
Operation
Potential Mitigations
Phase
Description
Follow the resource's lifecycle from creation to release.