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

1,600 results · Feed

  • Medium 4.0

    An use after free vulnerability in sdp driver prior to SMR Mar-2022 Release 1 allows kernel crash.

  • Unscored —

    A flaw use-after-free in function sco_sock_sendmsg() of the Linux kernel HCI subsystem was found in the way user calls …

  • Unscored —

    .A flaw was found in the CAN BCM networking protocol in the Linux kernel, where a local attacker can abuse a flaw in th…

  • Unscored —

    AnyComment < 0.2.18 - Comment Rating Increase/Decrease via Race Condition

    The AnyComment WordPress plugin before 0.2.18 is affected by a race condition when liking/disliking a comment/reply, which could allow any authenticated user to quickly raise their rating or lower the rating of other users

  • Unscored —

    A race condition accessing file object in the Linux kernel OverlayFS subsystem was found in the way users do rename in …

  • High 7.8
    CVE-2021-44731 Public exploit

    snapd could be made to escalate privileges and run programs as administrator

    A race condition existed in the snapd 2.54.2 snap-confine binary when preparing a private mount namespace for a snap. This could allow a local attacker to gain root privileges by bind-mounting their own contents inside the snap's private mount namespace and c…

  • High 8.1

    Improper Restriction of Operations within the Bounds of a Memory Buffer and Race Condition in crossbeam-utils

    crossbeam-utils provides atomics, synchronization primitives, scoped threads, and other utilities for concurrent programming in Rust. crossbeam-utils prior to version 0.8.7 incorrectly assumed that the alignment of `{i,u}64` was always the same as `Atomic{I,U…

  • Medium 5.9

    HashiCorp Nomad Artifact Download Race Condition

    HashiCorp Nomad and Nomad Enterprise 0.3.0 through 1.0.17, 1.1.11, and 1.2.5 artifact download functionality has a race condition such that the Nomad client agent could download the wrong artifact into the wrong destination. Fixed in 1.0.18, 1.1.12, and 1.2.6

  • Unscored —

    Local privilege escalation due to race condition on application startup

    Local privilege escalation due to race condition on application startup. The following products are affected: Acronis Cyber Protect Home Office (macOS) before build 39605, Acronis True Image 2021 (macOS) before build 39287

  • 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.

  • High 8.1

    AtomicBucket<T> unconditionally implements Send/Sync

    An issue was discovered in the metrics-util crate before 0.7.0 for Rust. There is a data race and memory corruption because AtomicBucket<T> unconditionally implements the Send and Sync traits.

  • High 8.1

    Race Condition in tokio

    An issue was discovered in the tokio crate before 1.8.4, and 1.9.x through 1.13.x before 1.13.1, for Rust. In certain circumstances involving a closed oneshot channel, there is a data race and memory corruption.

  • Medium 5.9

    An issue in Atomix v3.1.5 allows attackers to cause a denial of service (DoS) via false member down event messages.

    An issue in Atomix v3.1.5 allows attackers to cause a denial of service (DoS) via false member down event messages.

  • Medium 6.5

    Junos OS: PTX1000 System, PTX10002-60C System: After upgrading, configured firewall filters may be applied on incorrect interfaces

    On PTX1000 System, PTX10002-60C System, after upgrading to an affected release, a Race Condition vulnerability between the chassis daemon (chassisd) and firewall process (dfwd) of Juniper Networks Junos OS, may update the device's interfaces with incorrect fi…

  • Medium 5.9

    Junos OS: SRX Series: The flowd process will crash if log session-close is configured and specific traffic is received

    An Improper Check for Unusual or Exceptional Conditions vulnerability combined with a Race Condition in the flow daemon (flowd) of Juniper Networks Junos OS on SRX300 Series, SRX500 Series, SRX1500, and SRX5000 Series with SPC2 allows an unauthenticated netwo…

  • Medium 4.7

    Junos OS Evolved: PTX10003, PTX10008: picd core while executing the "show chassis pic" command under certain conditions

    A Race Condition in the 'show chassis pic' command in Juniper Networks Junos OS Evolved may allow an attacker to crash the port interface concentrator daemon (picd) process on the FPC, if the command is executed coincident with other system events outside the…

  • Unscored —

    FreeBSD's crontab calculates the MD5 sum of the previous and new cronjob to determine if any changes have been made bef…

  • Unscored —

    A use-after-free in function hci_sock_bound_ioctl() of the Linux kernel HCI subsystem was found in the way user calls i…

  • High 8.1

    Data race in ruspiro-singleton

    An issue was discovered in the ruspiro-singleton crate before 0.4.1 for Rust. In Singleton, Send and Sync do not have bounds checks.

  • High 8.1

    Data races in unicycle

    An issue was discovered in the unicycle crate before 0.7.1 for Rust. PinSlab<T> and Unordered<T, S> do not have bounds on their Send and Sync traits.

  • High 8.1

    Data race in conqueue

    An issue was discovered in the conqueue crate before 0.4.0 for Rust. There are unconditional implementations of Send and Sync for QueueSender<T>.

  • High 8.1

    Data race in tiny_future

    An issue was discovered in the tiny_future crate before 0.4.0 for Rust. Future<T> does not have bounds on its Send and Sync traits.

  • High 8.1

    Data races in ticketed_lock

    An issue was discovered in the ticketed_lock crate before 0.3.0 for Rust. There are unconditional implementations of Send for ReadTicket<T> and WriteTicket<T>.

  • High 8.1

    Data races in libsbc

    An issue was discovered in the libsbc crate before 0.1.5 for Rust. For Decoder<R>, it implements Send for any R: Read.

  • High 8.1

    Data race in abox

    An issue was discovered in the abox crate before 0.4.1 for Rust. It implements Send and Sync for AtomicBox<T> with no requirement for T: Send and T: Sync.

  • High 8.1

    Data races in beef

    An issue was discovered in the beef crate before 0.5.0 for Rust. beef::Cow has no Sync bound on its Send trait.

  • High 8.1

    Data races in async-coap

    An issue was discovered in the async-coap crate through 2020-12-08 for Rust. Send and Sync are implemented for ArcGuard<RC, T> without trait bounds on RC.

  • High 8.1

    Data races in convec

    An issue was discovered in the convec crate through 2020-11-24 for Rust. There are unconditional implementations of Send and Sync for ConVec<T>.

  • High 8.1

    Data races in signal-simple

    An issue was discovered in the signal-simple crate through 2020-11-15 for Rust. There are unconditional implementations of Send and Sync for SyncChannel<T>.

  • High 8.1

    Data race in v9

    An issue was discovered in the v9 crate through 2020-12-18 for Rust. There is an unconditional implementation of Sync for SyncRef<T>.

  • High 8.1

    Data races in cache

    An issue was discovered in the cache crate through 2020-11-24 for Rust. There are unconditional implementations of Send and Sync for Cache<K>.

  • High 8.1

    Data races in bunch

    An issue was discovered in the bunch crate through 2020-11-12 for Rust. There are unconditional implementations of Send and Sync for Bunch<T>.

  • High 8.1

    Data races in rcu_cell

    An issue was discovered in the rcu_cell crate through 2020-11-14 for Rust. There are unconditional implementations of Send and Sync for RcuCell<T>.

  • High 8.1

    Data races in scottqueue

    An issue was discovered in the scottqueue crate through 2020-11-15 for Rust. There are unconditional implementations of Send and Sync for Queue<T>.

  • High 8.1

    Data races in parc

    An issue was discovered in the parc crate through 2020-11-14 for Rust. LockWeak<T> has an unconditional implementation of Send without trait bounds on T.

  • High 8.1

    Slock<T> allows sending non-Send types across thread boundaries

    An issue was discovered in the slock crate through 2020-11-17 for Rust. Slock<T> unconditionally implements Send and Sync.

  • High 8.1

    Data races in toolshed

    An issue was discovered in the toolshed crate through 2020-11-15 for Rust. In CopyCell<T>, the Send trait lacks bounds on the contained type.

  • High 8.1

    Data races in lever

    An issue was discovered in the lever crate before 0.1.1 for Rust. AtomicBox<T> implements the Send and Sync traits for all types T.

  • High 8.1

    Data races in lexer

    An issue was discovered in the lexer crate through 2020-11-10 for Rust. For ReaderResult<T, E>, there is an implementation of Sync with a trait bound of T: Send, E: Send.

  • High 8.1

    Data races in dces

    An issue was discovered in the dces crate through 2020-12-09 for Rust. The World type is marked as Send but lacks bounds on its EntityStore and ComponentStore.