Skip to content
OpenAdvisories

Weakness (CWE)

CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization

Class Draft

The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

How to prevent it (8 mitigations)
  1. Architecture and Design

    In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.

  2. Architecture and Design

    Use thread-safe capabilities such as the data access abstraction in Spring.

  3. Architecture and Design

    Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring.

    Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).

  4. Implementation

    When using multithreading and operating on shared variables, only use thread-safe functions.

  5. Implementation

    Use atomic operations on shared variables. Be wary of innocent-looking constructs such as "x++". This may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read, followed by a computation, followed by a write.

  6. Implementation

    Use a mutex if available, but be sure to avoid related weaknesses such as CWE-412.

  7. Implementation

    Avoid double-checked locking (CWE-609) and other implementation errors that arise when trying to avoid the overhead of synchronization.

  8. Implementation

    Disable interrupts or signals over critical parts of the code, but also make sure that the code does not go into a large or infinite loop.

Source: MITRE CWE-362

57 results · Clear filters · Feed

  • Critical 9.1

    Combination Path Traversal and Concurrent Execution vulnerability exists within the embedded web server

    The vulnerability can be leveraged by an attacker to execute arbitrary code as an unprivileged user and/or modify the contents of any data on the filesystem.

  • Critical 9.8

    A vulnerability was found in Weaver E-cology allows attackers use race conditions to bypass security mechanisms to uplo…

  • Critical 9.8

    TP-Link AX1800 hotplugd Firewall Rule Race Condition Vulnerability

    TP-Link AX1800 hotplugd Firewall Rule Race Condition Vulnerability. This vulnerability allows remote attackers to gain access to LAN-side services on affected installations of TP-Link Archer AX21 routers. Authentication is not required to exploit this vulnera…

  • Critical 10.0

    Improper isolation of server file access in github.com/pterodactyl/wings

    Wings is the server control plane for Pterodactyl Panel. This vulnerability impacts anyone running the affected versions of Wings. The vulnerability can potentially be used to access files and directories on the host system. The full scope of impact is exactl…

  • Critical 9.8

    In multiple functions of MetaDataBase.cpp, there is a possible UAF write due to a race condition. This could lead to re…

  • Critical 9.8

    Tree connection race condition remote code execution vulnerability

    A flaw was found in the Linux kernel's ksmbd, a high-performance in-kernel SMB server. The specific flaw exists within the processing of SMB2_TREE_DISCONNECT commands. The issue results from the lack of proper locking when performing operations on an object. …

  • Critical 9.0

    Session race condition remote code execution vulnerability

    A flaw was found in the Linux kernel's ksmbd, a high-performance in-kernel SMB server. The specific flaw exists within the processing of SMB2_SESSION_SETUP commands. The issue results from the lack of proper locking when performing operations on an object. An…

  • Critical 9.8

    This issue was addressed with improved state management. This issue is fixed in macOS Ventura 13.3, Safari 16.4, iOS 16…

  • Critical 9.8

    The iaware module has a vulnerability in thread security. Successful exploitation of this vulnerability will affect con…

  • Critical 9.8

    Grafana vulnerable to race condition allowing privilege escalation

    Grafana is an open-source platform for monitoring and observability. Versions starting with 9.2.0 and less than 9.2.4 contain a race condition in the authentication middlewares logic which may allow an unauthenticated user to query an administration endpoint …

  • Critical 10.0

    A vulnerability regarding concurrent execution using shared resource with improper synchronization ('Race Condition') i…

  • Critical 9.8

    Out-of-bounds Write in actix-web

    An issue was discovered in the actix-web crate before 0.7.15 for Rust. It can unsoundly coerce an immutable reference into a mutable reference, leading to memory corruption.

  • Critical 9.8

    Data race in crossbeam-deque

    crossbeam-deque is a package of work-stealing deques for building task schedulers when programming in Rust. In versions prior to 0.7.4 and 0.8.0, the result of the race condition is that one or more tasks in the worker queue can be popped twice instead of oth…

  • Critical 9.8

    Data race in internment

    An issue was discovered in the internment crate before 0.4.2 for Rust. There is a data race that can cause memory corruption because of the unconditional implementation of Sync for Intern<T>.

  • Critical 9.8

    Data races in rusqlite

    An issue was discovered in the rusqlite crate before 0.23.0 for Rust. Memory safety can be violated via VTab / VTabCursor.

  • Critical 9.8

    Data races in rulinalg

    An issue was discovered in the rulinalg crate through 2020-02-11 for Rust. There are incorrect lifetime-boundary definitions for RowMut::raw_slice and RowMut::raw_slice_mut.

  • Critical 9.8

    Multiple security issues including data race, buffer overflow, and uninitialized memory drop in arr

    An issue was discovered in the arr crate through 2020-08-25 for Rust. An attacker can smuggle non-Sync/Send types across a thread boundary to cause a data race.