GHSA-mgg8-9pvp-6qcw

Suggest an improvement
Source
https://github.com/advisories/GHSA-mgg8-9pvp-6qcw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-mgg8-9pvp-6qcw/GHSA-mgg8-9pvp-6qcw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-mgg8-9pvp-6qcw
Withdrawn
2021-08-24T18:01:27Z
Published
2021-08-25T20:59:59Z
Modified
2021-08-24T18:01:27Z
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).

Database specific
{
    "cwe_ids":  [
        "CWE-362"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2021-08-09T17:16:18Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

crates.io / noise_search

Package

Name
noise_search
View open source insights on deps.dev
Purl
pkg:cargo/noise_search

Affected ranges

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

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-mgg8-9pvp-6qcw/GHSA-mgg8-9pvp-6qcw.json"