CWE一覧に戻る
CWE-543

マルチスレッドコンテキストでの同期なしのシングルトン・パターンの使用

Use of Singleton Pattern Without Synchronization in a Multithreaded Context
脆弱性 作成中
JA

本製品は、マルチスレッド環境でリソースを作成する際にシングルトンパターンを使用します。

シングルトンパターンの使用はスレッドセーフではないかもしれない。

EN

The product uses the singleton pattern when creating a resource within a multithreaded environment.

The use of a singleton pattern may not be thread-safe.

Scope: Other, Integrity / Impact: Other; Modify Application Data
Use the Thread-Specific Storage Pattern. See References.
Do not use member fields to store information in the Servlet. In multithreading environments, storing user data in Servlet member fields introduces a data access race condition.
Avoid using the double-checked locking pattern in language versions that cannot guarantee thread safety. This pattern may be used to avoid the overhead of a synchronized call, but in certain versions of Java (for example), this has been shown to be unsafe because it still introduces a race condition (CWE-209).
MITRE公式ページ — CWE-543