5
References
[REF-960]Object Management Group (OMG). "Automated Source Code Maintainability Measure
(ASCMM)". 2016 January. < https://www.omg.org/spec/ASCMM/ >.2023-04-07.
CWE-1096: Singleton Class Instance Creation without Proper Locking or
Synchronization
Weakness ID : 1096
Structure : Simple
Abstraction : Variant
Description
The product implements a Singleton design pattern but does not use appropriate locking or other
synchronization mechanism to ensure that the singleton class is only instantiated once.
Extended Description
This issue can prevent the product from running reliably, e.g. by making the instantiation process
non-thread-safe and introducing deadlock (CWE-833) or livelock conditions. If the relevant code is
reachable by an attacker, then this reliability problem might introduce a vulnerability.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 820 Missing Synchronization 1720
Relevant to the view "CISQ Quality Measures (2020)" (CWE-1305)
Nature Type ID Name Page
ChildOf 662 Improper Synchronization 1448
Relevant to the view "CISQ Data Protection Measures" (CWE-1340)
Nature Type ID Name Page
ChildOf 662 Improper Synchronization 1448
Weakness Ordinalities
Indirect :
CWE Version 4.14
CWE-1097: Persistent Storable Data Element without Associated Comparison Control Element
CWE-1097: Persistent Storable Data Element
without Associated Comparison Control Element