CWE-764: Multiple Locks of a Critical Resource
The product locks a critical resource more times than intended, leading to an unexpected state in the system.
Last updated
The product locks a critical resource more times than intended, leading to an unexpected state in the system.
Last updated
CWE-764 (Multiple Locks of a Critical Resource) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
13 recorded CVEs are caused by CWE-764 (Multiple Locks of a Critical Resource). The highest-severity and most recent are shown first. 8 new CWE-764 CVEs have been recorded so far in 2026 (3 in 2025).
net: enetc: fix the deadlock of enetc_mdio_lock
net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll
i3c: master: Fix recursive locking during device registration
bpf: Fix mmap_lock deadlock on arena lock failure
bpf: Fix mmap_lock leak in irq_work path
media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error path
xfs: don't double-lock when deleting a self-referential directory
ftrace: Fix recursive locking direct_mutex in ftrace_modify_direct_caller
xdp: fix invalid wait context of page_pool_destroy()
net/smc: reduce rtnl pressure in smc_pnet_create_pnetids_list()
powerpc/eeh: Fix recursive locking on devices without EEH sensitive driver
gve: fix napi_disable deadlock when attempting to disable XSK pools
Showing 12 of 13 recorded CWE-764 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsWhat can happen when CWE-764 is exploited.
DoS: Resource Consumption (CPU), DoS: Crash, Exit, or Restart, Unexpected State
Affects: Availability, Integrity
When a product is operating in a concurrent environment and repeatedly locks a critical resource, the consequences will vary based on the type of lock, the lock's implementation, and the resource being protected. In some situations such as with semaphores, the resources are pooled and extra locking calls will reduce the size of the total available pool, possibly leading to degraded performance or a denial of service. If this can be triggered by an attacker, it will be similar to an unrestricted lock (CWE-412). In the context of a binary lock, it is likely that any duplicate locking attempts will never succeed, since the lock is already held and progress may not be possible.
Typically introduced during these phases of the software lifecycle.
Practical mitigations for CWE-764, grouped by where in the lifecycle they apply.
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 software 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.
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.)
Effectiveness: High
Common questions about CWE-764.
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get an alert when a new CWE-764 CVE affects your products, with AI-written analysis and remediation steps.