Miggo Logo

CVE-2020-36215: Data races in hashconsing

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.59217%
Published
8/25/2021
Updated
6/22/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
hashconsingrust< 1.1.01.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unconditional unsafe implementations of Send/Sync traits for HConsed<T> as shown in the GitHub issue code snippet. These implementations lacked bounds requiring T: Send/Sync, violating Rust's safety guarantees. The explicit unsafe impl blocks in lib.rs (lines 354-355 in historical version) allowed sharing of interior-mutable types like Cell across threads, enabling data races. The high confidence comes from direct evidence in the provided issue description showing the problematic trait implementations and their consequences.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*****t** v*rsions o* **s**onsin* impl*m*nts S*n*/Syn* *or its **ons** typ* wit*out r*stri*tin* it to S*n***l* typ*s *n* Syn***l* typ*s. T*is *llows non-Syn* typ*s su** *s **ll to ** s**r** **ross t*r***s l***in* to un***in** ****vior *n* m*mory *orru

Reasoning

T** vuln*r**ility st*ms *rom un*on*ition*l uns*** impl*m*nt*tions o* S*n*/Syn* tr*its *or **ons**<T> *s s*own in t** *it*u* issu* *o** snipp*t. T**s* impl*m*nt*tions l**k** *oun*s r*quirin* T: S*n*/Syn*, viol*tin* Rust's s***ty *u*r*nt**s. T** *xpli*