Miggo Logo

CVE-2021-28037: Data race in internment

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.61007%
Published
8/25/2021
Updated
1/9/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the unsafe Sync trait implementation for Intern<T> that lacks a T: Sync bound. This allows Intern<T> to be considered thread-safe even when containing non-Sync types, violating Rust's thread safety guarantees. The GitHub issue reproduction demonstrates this by creating a data race with Cell<T> (which is !Sync) stored in Intern<T>. The fix in 0.4.2 added the T: Sync bound to this implementation, confirming this was the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*n issu* w*s *is*ov*r** in t** int*rnm*nt *r*t* ***or* *.*.* *or Rust. T**r* is * **t* r*** t**t **n **us* m*mory *orruption ****us* o* t** un*on*ition*l impl*m*nt*tion o* Syn* *or Int*rn<T>.

Reasoning

T** vuln*r**ility st*ms *rom t** uns*** `Syn*` tr*it impl*m*nt*tion *or `Int*rn<T>` t**t l**ks * `T: Syn*` *oun*. T*is *llows `Int*rn<T>` to ** *onsi**r** t*r***-s*** *v*n w**n *ont*inin* non-`Syn*` typ*s, viol*tin* Rust's t*r*** s***ty *u*r*nt**s. T