PT-2020-17643 · Rust · Noise Search Crate

Published

2020-12-10

·

Updated

2021-08-25

·

CVE-2020-36461

CVSS v3.1

8.1

High

VectorAV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions noise search crate versions through 2020-12-10
Description The issue concerns the unconditional implementation of Send and Sync for MvccRwLock in the noise search crate. This can lead to data races when types that are either !Send or !Sync (e.g., Rc<T>, Arc<Cell< >>) are contained inside MvccRwLock and sent across thread boundaries, potentially resulting in memory corruption. Additionally, the safe APIs of MvccRwLock allow aliasing violations by permitting &T and LockResult<MutexGuard<Box<T>>> to co-exist in conflicting lifetime regions.
Recommendations As a temporary workaround, consider restricting the use of MvccRwLock to prevent sending types that are either !Send or !Sync across thread boundaries until a patch is available. Avoid using the MvccRwLock APIs that allow aliasing violations, such as co-existing &T and LockResult<MutexGuard<Box<T>>> in conflicting lifetime regions, until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Command Injection

Race Condition

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

Weakness Enumeration

Related Identifiers

CVE-2020-36461
GHSA-WXJF-9F4G-3V44
RUSTSEC-2020-0141

Affected Products

Noise Search Crate