Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-820 (缺失同步机制) — Vulnerability Class 10

10 vulnerabilities classified as CWE-820 (缺失同步机制). AI Chinese analysis included.

CWE-820, Missing Synchronization, is a concurrency weakness where software accesses shared resources without proper coordination mechanisms. This flaw typically arises when multiple threads or processes interact with the same data structure or file simultaneously, assuming exclusive access. Attackers exploit this by triggering race conditions, manipulating the timing of concurrent operations to corrupt data, bypass security checks, or cause denial of service. By influencing the shared resource’s state, adversaries can induce unexpected behaviors that compromise integrity or confidentiality. Developers prevent this by implementing robust synchronization primitives, such as mutexes, semaphores, or locks, to ensure atomic access. Additionally, using thread-safe libraries and designing immutable data structures can eliminate the need for explicit synchronization, thereby reducing the attack surface and ensuring consistent resource states across concurrent executions.

MITRE CWE Description
The product utilizes a shared resource in a concurrent manner but does not attempt to synchronize access to the resource. If access to a shared resource is not synchronized, then the resource may not be in a state that is expected by the product. This might lead to unexpected or insecure behaviors, especially if an attacker can influence the shared resource.
Common Consequences (1)
Integrity, Confidentiality, OtherModify Application Data, Read Application Data, Alter Execution Logic
Examples (1)
The following code intends to fork a process, then have both the parent and child processes print a single line.
static void print (char * string) { char * word; int counter; for (word = string; counter = *word++; ) { putc(counter, stdout); fflush(stdout); /* Make timing window a little larger... */ sleep(1); } } int main(void) { pid_t pid; pid = fork(); if (pid == -1) { exit(-2); } else if (pid == 0) { print("child\n"); } else { print("PARENT\n"); } exit(0); }
Bad · C

Vulnerabilities classified as CWE-820 (缺失同步机制) represent 10 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.