logo

CVE-2020-36435 ruspiro-singleton

Package

Manager: cargo
Name: ruspiro-singleton
Vulnerable Version: >=0 <0.4.1

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v4.0: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

EPSS: 0.00336 pctl0.55788

Details

Data race in ruspiro-singleton `Singleton<T>` is meant to be a static object that can be initialized lazily. In order to satisfy the requirement that `static` items must implement `Sync`, `Singleton` implemented both `Sync` and `Send` unconditionally. This allows for a bug where non-`Sync` types such as `Cell` can be used in singletons and cause data races in concurrent programs. The flaw was corrected in commit `b0d2bd20e` by adding trait bounds, requiring the contaiend type to implement `Sync`.

Metadata

Created: 2021-08-25T20:58:19Z
Modified: 2021-08-24T17:45:32Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-fqq2-xp7m-xvm8/GHSA-fqq2-xp7m-xvm8.json
CWE IDs: ["CWE-119", "CWE-362"]
Alternative ID: GHSA-fqq2-xp7m-xvm8
Finding: F124
Auto approve: 1