Miggo Logo

CVE-2020-35871: Data races in rusqlite

8.1

CVSS Score
3.1

Basic Information

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

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper synchronization in the Auxdata API implementation. The commit diff shows critical changes to these functions:

  1. set_aux was modified to use Arc<dyn Any + Send + Sync> instead of raw pointers
  2. get_aux was changed to handle thread-safe Arc downcasting
  3. Added Send/Sync bounds to enforce thread safety
  4. The CWE-362 classification confirms this is a concurrency issue
  5. The patch introduces atomic reference counting and proper trait bounds, indicating the previous implementation lacked these safeguards
  6. The vulnerability description specifically mentions 'Auxdata API data race' as the attack vector

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** rusqlit* *r*t* ***or* *.**.* *or Rust. M*mory s***ty **n ** viol*t** vi* *n *ux**t* *PI **t* r***.

Reasoning

T** vuln*r**ility st*ms *rom improp*r syn**roniz*tion in t** *ux**t* *PI impl*m*nt*tion. T** *ommit *i** s*ows *riti**l ***n**s to t**s* *un*tions: *. s*t_*ux w*s mo*i*i** to us* *r*<*yn *ny + S*n* + Syn*> inst*** o* r*w point*rs *. **t_*ux w*s ***n*