Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. noise_search
  4. ›
  5. GHSA-mgg8-9pvp-6qcw

GHSA-mgg8-9pvp-6qcw: MvccRwLock allows data races & aliasing violations

August 25, 2021

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).

References

  • github.com/advisories/GHSA-mgg8-9pvp-6qcw
  • github.com/pipedown/noise
  • github.com/pipedown/noise/issues/72
  • rustsec.org/advisories/RUSTSEC-2020-0141.html

Code Behaviors & Features

Detect and mitigate GHSA-mgg8-9pvp-6qcw with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 0.7.0

Solution

Unfortunately, there is no solution available yet.

Weakness

  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Source file

cargo/noise_search/GHSA-mgg8-9pvp-6qcw.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:43 +0000.