BaseIncomplete

CWE-412Unrestricted Externally Accessible Lock

Category: other

Description

The product properly checks for the existence of a lock, but the lock can be externally controlled or influenced by an actor that is outside of the intended sphere of control. This prevents the product from acting on associated resources or performing other behaviors that are controlled by the presence of the lock. Relevant locks might include an exclusive lock or mutex, or modifying a shared resource that is treated as a lock. If the lock can be held for an indefinite period of time, then the denial of service could be permanent.

Common consequences· 1

  • Availability — DoS: Resource Consumption (Other)
    When an attacker can control a lock, the program may wait indefinitely until the attacker releases the lock, causing a denial of service to other users of the program. This is especially problematic if there is a blocking operation on the lock.

Potential mitigations· 3

  • [Architecture and Design, Implementation]Use any access control that is offered by the functionality that is offering the lock.
  • [Architecture and Design, Implementation]Use unpredictable names or identifiers for the locks. This might not always be possible or feasible.
  • [Architecture and Design]Consider modifying your code to use non-blocking synchronization methods.

Related CAPEC attack patterns· 1

CAPEC-25

References

  1. https://cwe.mitre.org/data/definitions/412.html

Exploits (incoming)1

TypeTargetConfidenceTier
AttackPatternForced Deadlockcapec-25100%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Improper Resource Locking
CWE
Missing Lock Check
CWE
Incorrect Synchronization
CWE
Improper Locking
CWE
Missing Synchronization
CWE
Multiple Unlocks of a Critical Resource
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.