PT-2020-17649 · Rust · Cgc Crate

Published

2020-12-10

·

Updated

2021-08-25

·

CVE-2020-36468

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 cgc crate through 2020-12-10 for Rust
Description The issue concerns the cgc crate for Rust, where Ptr implements Send and Sync for all types, potentially leading to data races by sending non-thread safe types across threads. Additionally, Ptr::get violates mutable alias rules by returning multiple mutable references to the same object. Ptr::write uses non-atomic writes to the underlying pointer, which can lead to data races when used across threads.
Recommendations As a temporary workaround, consider disabling the Ptr::write function until a patch is available. Restrict access to the Ptr module to minimize the risk of exploitation. Avoid using Ptr across threads until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Race Condition

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

Weakness Enumeration

Related Identifiers

CVE-2020-36468
GHSA-F3MQ-99JR-WW4R
GHSA-F9XR-3M55-5Q2V
GHSA-PWHF-7427-9VV2
RUSTSEC-2020-0148

Affected Products

Cgc Crate