1467
Example Language: (Bad)
helper = new Helper();
If a second thread, thread B, takes over in the middle of this call and helper has not finished
running the constructor, then thread B may make calls on helper while its fields hold incorrect
values.
Observed Examples
Reference Description
CVE-2021-1782 Chain: improper locking (CWE-667) leads to race condition (CWE-362), as
exploited in the wild per CISA KEV.
https://www.cve.org/CVERecord?id=CVE-2021-1782
CVE-2009-0935 Attacker provides invalid address to a memory-reading function, causing a
mutex to be unlocked twice
https://www.cve.org/CVERecord?id=CVE-2009-0935
CVE-2010-4210 function in OS kernel unlocks a mutex that was not previously locked, causing
a panic or overwrite of arbitrary memory.
https://www.cve.org/CVERecord?id=CVE-2010-4210
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.
https://www.cve.org/CVERecord?id=CVE-2008-4302
CVE-2009-1243 OS kernel performs an unlock in some incorrect circumstances, leading to
panic.
https://www.cve.org/CVERecord?id=CVE-2009-1243
CVE-2009-2857 OS deadlock
https://www.cve.org/CVERecord?id=CVE-2009-2857
CVE-2009-1961 OS deadlock involving 3 separate functions
https://www.cve.org/CVERecord?id=CVE-2009-1961
CVE-2009-2699 deadlock in library
https://www.cve.org/CVERecord?id=CVE-2009-2699
CVE-2009-4272 deadlock triggered by packets that force collisions in a routing table
https://www.cve.org/CVERecord?id=CVE-2009-4272
CVE-2002-1850 read/write deadlock between web server and script
https://www.cve.org/CVERecord?id=CVE-2002-1850
CVE-2004-0174 web server deadlock involving multiple listening connections
https://www.cve.org/CVERecord?id=CVE-2004-0174
CVE-2009-1388 multiple simultaneous calls to the same function trigger deadlock.
https://www.cve.org/CVERecord?id=CVE-2009-1388
CVE-2006-5158 chain: other weakness leads to NULL pointer dereference (CWE-476) or
deadlock (CWE-833).
https://www.cve.org/CVERecord?id=CVE-2006-5158
CVE-2006-4342 deadlock when an operation is performed on a resource while it is being
removed.
https://www.cve.org/CVERecord?id=CVE-2006-4342
CVE-2006-2374 Deadlock in device driver triggered by using file handle of a related device.
https://www.cve.org/CVERecord?id=CVE-2006-2374
CVE-2006-2275 Deadlock when large number of small messages cannot be processed quickly
enough.
https://www.cve.org/CVERecord?id=CVE-2006-2275
CVE-2005-3847 OS kernel has deadlock triggered by a signal during a core dump.
https://www.cve.org/CVERecord?id=CVE-2005-3847
CVE-2005-3106 Race condition leads to deadlock.
https://www.cve.org/CVERecord?id=CVE-2005-3106
CWE Version 4.14
CWE-667: Improper Locking
CWE-667: Improper Locking