CVE-2020-36466:
Data races in cgc
5.9
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
8/25/2021
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
cgc | rust | <= 0.4.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from three core issues: 1) Improper Send/Sync implementations for Ptr<T> without type constraints, enabling cross-thread sharing of non-thread-safe types. 2) Ptr::get() creating multiple mutable references through raw pointer dereference, violating Rust's aliasing rules. 3) Ptr::set() using non-atomic writes, creating data race conditions. These are clearly demonstrated in the provided POC code showing Rc cloning across threads and mutable reference aliasing leading to segfaults. The GitHub issue explicitly identifies these unsafe implementations and methods as problematic.