GHSA-VJ88-5667-W56P
Vulnerability from github – Published: 2021-08-25 21:00 – Updated: 2021-08-24 17:44
VLAI?
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.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "ruspiro-singleton"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.4.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-06T19:10:18Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "`Singleton\u003cT\u003e` is meant to be a static object that can be initialized lazily. In\norder to satisfy the requirement that `static` items must implement `Sync`,\n`Singleton` implemented both `Sync` and `Send` unconditionally.\n\nThis allows for a bug where non-`Sync` types such as `Cell` can be used in\nsingletons and cause data races in concurrent programs.\n\nThe flaw was corrected in commit `b0d2bd20e` by adding trait bounds, requiring\nthe contaiend type to implement `Sync`.\n",
"id": "GHSA-vj88-5667-w56p",
"modified": "2021-08-24T17:44:58Z",
"published": "2021-08-25T21:00:11Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/RusPiRo/ruspiro-singleton/issues/10"
},
{
"type": "PACKAGE",
"url": "https://github.com/RusPiRo/ruspiro-singleton"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2020-0115.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Singleton lacks bounds on Send and Sync.",
"withdrawn": "2021-08-24T17:44:58Z"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…