GHSA-MGG8-9PVP-6QCW
Vulnerability from github – Published: 2021-08-25 20:59 – Updated: 2021-08-24 18:01
VLAI?
Summary
MvccRwLock allows data races & aliasing violations
Details
Affected versions of the noise_search crate unconditionally implement Send/Sync for MvccRwLock.
This can lead to data races when types that are either !Send or !Sync (e.g. Rc<T>, Arc<Cell<_>>) are contained inside MvccRwLock and sent across thread boundaries. The data races can potentially lead to memory corruption (as demonstrated in the PoC from the original report issue).
Also, safe APIs of MvccRwLock allow aliasing violations by allowing &T and LockResult<MutexGuard<Box<T>>> to co-exist in conflicting lifetime regions. The APIs of MvccRwLock should either be marked as unsafe or MbccRwLock should be changed to private or pub(crate).
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "noise_search"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.7.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-09T17:16:18Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "Affected versions of the `noise_search` crate unconditionally implement Send/Sync for `MvccRwLock`.\nThis can lead to data races when types that are either `!Send` or `!Sync` (e.g. `Rc\u003cT\u003e`, `Arc\u003cCell\u003c_\u003e\u003e`) are contained inside `MvccRwLock` and sent across thread boundaries. The data races can potentially lead to memory corruption (as demonstrated in the PoC from the original report issue).\n\nAlso, safe APIs of `MvccRwLock` allow aliasing violations by allowing `\u0026T` and `LockResult\u003cMutexGuard\u003cBox\u003cT\u003e\u003e\u003e` to co-exist in conflicting lifetime regions. The APIs of `MvccRwLock` should either be marked as `unsafe` or `MbccRwLock` should be changed to private or pub(crate).\n",
"id": "GHSA-mgg8-9pvp-6qcw",
"modified": "2021-08-24T18:01:27Z",
"published": "2021-08-25T20:59:59Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/pipedown/noise/issues/72"
},
{
"type": "PACKAGE",
"url": "https://github.com/pipedown/noise"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2020-0141.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "MvccRwLock allows data races \u0026 aliasing violations",
"withdrawn": "2021-08-24T18:01:27Z"
}
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…