PT-2020-17591 · Rust · Atomic-Option Crate

Published

2020-10-31

·

Updated

2021-08-25

·

CVE-2020-36219

CVSS v3.1

5.9

Medium

VectorAV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions atomic-option crate through 2020-10-31
Description The issue concerns the atomic-option crate, where AtomicOption<T> unconditionally implements Sync. This allows moving non-Sync types, such as Rc<T> or Arc<Cell<T>>, across thread boundaries, potentially leading to data races and undefined behavior. Additionally, it is possible to send non-Send types, like std::sync::MutexGuard, to other threads, resulting in undefined behavior.
Recommendations For the atomic-option crate through 2020-10-31, consider avoiding the use of AtomicOption<T> with non-Sync types to prevent data races and undefined behavior. As a temporary workaround, restrict the movement of non-Sync types across thread boundaries until a patch is available.

Exploit

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2020-36219
GHSA-8GF5-Q9P9-WVMC
RUSTSEC-2020-0113

Affected Products

Atomic-Option Crate