The product unlocks a critical resource more times than intended, leading to an unexpected state in the system.
When locking and unlocking a resource, try to be sure that all control paths through the code in which the resource is locked one or more times correspond to exactly as many unlocks. If the product acquires a lock and then determines it is not able to perform its intended behavior, be sure to release the lock(s) before waiting for conditions to improve. Reacquire the lock(s) before trying again.
Our security experts can help you identify and remediate CWE-765 vulnerabilities in your codebase.
Get Security Assessment