{"id":"GHSA-mgg8-9pvp-6qcw","summary":"MvccRwLock allows data races & aliasing violations","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 `&T` 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","modified":"2021-08-24T18:01:27Z","published":"2021-08-25T20:59:59Z","withdrawn":"2021-08-24T18:01:27Z","database_specific":{"cwe_ids":["CWE-362"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2021-08-09T17:16:18Z","nvd_published_at":null},"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"}],"affected":[{"package":{"name":"noise_search","ecosystem":"crates.io","purl":"pkg:cargo/noise_search"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"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"}}],"schema_version":"1.9.0"}