GitHub Advisoryadvisory · crates.io

GHSA-wxjf-9f4g-3v44 Data races in noise_search

MEDIUM Published 2021-08-25 Modified 2021-08-24 Official page ↗
Aliases
CVE-2020-36461
Ecosystem
crates.io
Packages
noise_search
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-362, CWE-77
Reviewed
2021-08-18

Affected packages

• crates.io noise_search: <= 0.7.0 (no fix yet)

Description

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`, `Arc>`) 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>>` 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).

Related

Alias · CVE (1)

  • CVE-2020-36461 An issue was discovered in the noise_search crate through 2020-12-10 for Rust. vulnerability

Weakness · CWE (2)

  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization weakness
  • CWE-77 Improper Neutralization of Special Elements used in a Command weakness

References