GHSA-vj88-5667-w56p

Suggest an improvement
Source
https://github.com/advisories/GHSA-vj88-5667-w56p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-vj88-5667-w56p/GHSA-vj88-5667-w56p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vj88-5667-w56p
Withdrawn
2021-08-24T17:44:58Z
Published
2021-08-25T21:00:11Z
Modified
2021-08-24T17:44:58Z
Summary
Singleton lacks bounds on Send and Sync.
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
{
    "cwe_ids":  [
        "CWE-362"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2021-08-06T19:10:18Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
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
0 Unknown introduced version / All previous versions are affected
Fixed
0.4.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-vj88-5667-w56p/GHSA-vj88-5667-w56p.json"