Locking is a type of synchronization behavior that ensures that multiple independently-operating processes or threads do not interfere with each other when accessing the same resource. All processes/threads are expected to follow the same steps for locking. If these steps are not followed precisely - or if no locking is done at all - then another process/thread could modify the shared resource in a way that is not visible or predictable to the original process. This can lead to data or memory corruption, denial of service, etc.
Scope | Impact | Likelihood |
---|---|---|
Availability | DoS: Resource Consumption (CPU) Note: Inconsistent locking discipline can lead to deadlock. |
References | Description |
---|---|
CVE-2021-1782 | Chain: improper locking (CWE-667) leads to race condition (CWE-362), as exploited in the wild per CISA KEV. |
CVE-2009-0935 | Attacker provides invalid address to a memory-reading function, causing a mutex to be unlocked twice |
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. |
CVE-2009-2857 | OS deadlock |
CVE-2009-1961 | OS deadlock involving 3 separate functions |
CVE-2009-2699 | deadlock in library |
CVE-2009-4272 | deadlock triggered by packets that force collisions in a routing table |
CVE-2002-1850 | read/write deadlock between web server and script |
CVE-2004-0174 | web server deadlock involving multiple listening connections |
CVE-2009-1388 | multiple simultaneous calls to the same function trigger deadlock. |
CVE-2006-5158 | chain: other weakness leads to NULL pointer dereference (CWE-476) or deadlock (CWE-833). |
CVE-2006-4342 | deadlock when an operation is performed on a resource while it is being removed. |
CVE-2006-2374 | Deadlock in device driver triggered by using file handle of a related device. |
CVE-2006-2275 | Deadlock when large number of small messages cannot be processed quickly enough. |
CVE-2005-3847 | OS kernel has deadlock triggered by a signal during a core dump. |
CVE-2005-3106 | Race condition leads to deadlock. |
CVE-2005-2456 | Chain: array index error (CWE-129) leads to deadlock (CWE-833) |
CVE-2001-0682 | Program can not execute when attacker obtains a mutex. |
CVE-2002-1914 | Program can not execute when attacker obtains a lock on a critical output file. |
CVE-2002-1915 | Program can not execute when attacker obtains a lock on a critical output file. |
CVE-2002-0051 | Critical file can be opened with exclusive read access by user, preventing application of security policy. Possibly related to improper permissions, large-window race condition. |
CVE-2000-0338 | Chain: predictable file names used for locking, allowing attacker to create the lock beforehand. Resultant from permissions and randomness. |
CVE-2000-1198 | Chain: Lock files with predictable names. Resultant from randomness. |
CVE-2002-1869 | Product does not check if it can write to a log file, allowing attackers to avoid logging by accessing the file using an exclusive lock. Overlaps unchecked error condition. This is not quite CWE-412, but close. |
CAPEC-ID | Attack Pattern Name |
---|---|
CAPEC-25 | Forced Deadlock The adversary triggers and exploits a deadlock condition in the target software to cause a denial of service. A deadlock can occur when two or more competing actions are waiting for each other to finish, and thus neither ever does. Deadlock conditions can be difficult to detect. |
CAPEC-26 | Leveraging Race Conditions The adversary targets a race condition occurring when multiple processes access and manipulate the same resource concurrently, and the outcome of the execution depends on the particular order in which the access takes place. The adversary can leverage a race condition by "running the race", modifying the resource and modifying the normal execution flow. For instance, a race condition can occur while accessing a file: the adversary can trick the system by replacing the original file with their version and cause the system to read the malicious file. |
CAPEC-27 | Leveraging Race Conditions via Symbolic Links This attack leverages the use of symbolic links (Symlinks) in order to write to sensitive files. An attacker can create a Symlink link to a target file not otherwise accessible to them. When the privileged program tries to create a temporary file with the same name as the Symlink link, it will actually write to the target file pointed to by the attackers' Symlink link. If the attacker can insert malicious content in the temporary file they will be writing to the sensitive file by using the Symlink. The race occurs because the system checks if the temporary file exists, then creates the file. The attacker would typically create the Symlink during the interval between the check and the creation of the temporary file. |
Name | Organization | Date | Date release | Version |
---|---|---|---|---|
CWE Content Team | MITRE | Draft 9 |
Name | Organization | Date | Comment |
---|---|---|---|
Sean Eidemiller | Cigital | added/updated demonstrative examples | |
Eric Dalci | Cigital | updated Potential_Mitigations, Time_of_Introduction | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Related_Attack_Patterns | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Common_Consequences | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Description, Name, Relationships | |
CWE Content Team | MITRE | updated Common_Consequences, Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Demonstrative_Examples, Observed_Examples, Relationships | |
CWE Content Team | MITRE | updated Potential_Mitigations | |
CWE Content Team | MITRE | updated Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Related_Attack_Patterns | |
CWE Content Team | MITRE | updated Taxonomy_Mappings | |
CWE Content Team | MITRE | updated References, Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Description, Maintenance_Notes, Relationships | |
CWE Content Team | MITRE | updated Relationships, Type | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Demonstrative_Examples | |
CWE Content Team | MITRE | updated Observed_Examples | |
CWE Content Team | MITRE | updated Description | |
CWE Content Team | MITRE | updated Detection_Factors, Relationships | |
CWE Content Team | MITRE | updated Mapping_Notes |