CVE-2020-35913: Data races in lock_api
4.7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.11943%
CWE
Published
8/25/2021
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
lock_api | rust | < 0.4.2 | 0.4.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper trait bounds on Send/Sync implementations for various guard types. Specifically:
- RwLockReadGuard was marked as Sync without requiring T: Sync, allowing concurrent access to non-thread-safe data
- RwLockWriteGuard's Send implementation didn't require T: Send, enabling cross-thread transfer of mutable references to non-Send types
- Mapped guards inherited these flawed trait implementations These issues are confirmed by the advisory's list of affected types and the PR#262 fixes that added proper trait bounds (T: Sync for read guards, T: Send for write guards). The deref/deref_mut methods are vulnerable entry points as they provide access to the underlying data.