CWE-820: Missing Synchronization

Export to Word

Description

The product utilizes a shared resource in a concurrent manner but does not attempt to synchronize access to the resource.

Extended Description

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.


ThreatScore

Threat Mapped score: 1.8

Industry: Finiancial

Threat priority: P4 - Informational (Low)


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)

N/A


Attack TTPs

N/A

Modes of Introduction

Phase Note
None listed.

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: The following code intends to fork a process, then have both the parent and child processes print a single line.

Body: One might expect the code to print out something like:

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); }

Notes

← Back to CWE list