CWEweakness

CWE-832 Unlock of a Resource that is not Locked

Official page ↗
Abstraction
Base
Structure
Simple
Status
Incomplete
Languages
Not Language-Specific
CWE version
5.0

Description

The product attempts to unlock a resource that is not locked.

Common consequences

• Integrity, Confidentiality, Availability, Other: DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Modify Memory, Other — Depending on the locking functionality, an unlock of a non-locked resource might corrupt the state of the product, possibly including denial of service, memory corruption, or other modification to the resource (or its associated metadata that is used for tracking locks). In some cases, an unlock operation might not have any adverse effects.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2010-4210: function in OS kernel unlocks a mutex that was not previously locked, causing a panic or overwrite of arbitrary memory. • CVE-2008-4302: Chain: OS kernel does not properly handle a failure of a function call (CWE-755), leading to an unlock of a resource that was not locked (CWE-832), with resultant crash. • CVE-2009-1243: OS kernel performs an unlock in some incorrect circumstances, leading to panic.

Related

Observed example · CVE (3)

  • CVE-2010-4210 The pfs_getextattr function in FreeBSD 7.x before 7.3-RELEASE and 8.x before 8.0-RC1 unlocks a mutex that was not previously locked, which… vulnerability
  • CVE-2009-1243 net/ipv4/udp.c in the Linux kernel before 2.6.29.1 performs an unlocking step in certain incorrect circumstances, which allows local users… vulnerability
  • CVE-2008-4302 fs/splice.c in the splice subsystem in the Linux kernel before 2.6.22.2 does not properly handle a failure of the add_to_page_cache_lru… vulnerability

Child of · CWE (1)

  • CWE-667 Improper Locking weakness

Referenced by CVE · weakness (1)

  • CVE-2024-31143 An optional feature of PCI MSI called "Multiple Message" allows a device to use multiple consecutive interrupt vectors. vulnerability