GHSA-wxjf-9f4g-3v44

Suggest an improvement
Source
https://github.com/advisories/GHSA-wxjf-9f4g-3v44
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-wxjf-9f4g-3v44/GHSA-wxjf-9f4g-3v44.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-wxjf-9f4g-3v44
Aliases
Published
2021-08-25T20:56:05Z
Modified
2023-11-08T04:03:46.256345Z
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 races in noise_search
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&lt;MutexGuard&lt;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).

Database specific
{
    "nvd_published_at": "2021-08-08T06:15:00Z",
    "github_reviewed_at": "2021-08-18T21:19:50Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-362",
        "CWE-77"
    ]
}
References

Affected packages

crates.io / noise_search

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
0.7.0