GHSA-fqq2-xp7m-xvm8

Suggest an improvement
Source
https://github.com/advisories/GHSA-fqq2-xp7m-xvm8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-fqq2-xp7m-xvm8/GHSA-fqq2-xp7m-xvm8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-fqq2-xp7m-xvm8
Aliases
Published
2021-08-25T20:58:19Z
Modified
2023-11-08T04:03:44.661151Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Data race in ruspiro-singleton
Details

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.

Database specific
{
    "nvd_published_at": "2021-08-08T06:15:00Z",
    "github_reviewed_at": "2021-08-18T20:14:26Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-119",
        "CWE-362"
    ]
}
References

Affected packages

crates.io / ruspiro-singleton

Package

Name
ruspiro-singleton
View open source insights on deps.dev
Purl
pkg:cargo/ruspiro-singleton

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.4.1