GHSA-m7w4-8wp8-m2xq

Suggest an improvement
Source
https://github.com/advisories/GHSA-m7w4-8wp8-m2xq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-m7w4-8wp8-m2xq/GHSA-m7w4-8wp8-m2xq.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m7w4-8wp8-m2xq
Aliases
Published
2021-08-25T20:59:08Z
Modified
2023-11-08T04:03:45.086282Z
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 beef
Details

An issue was discovered in the beef crate before 0.5.0 for Rust. Affected versions of this crate did not have a T: Sync bound in the Send impl for Cow<'_, T, U>. This allows users to create data races by making Cow contain types that are (Send && !Sync) like Cell<_> or RefCell<_>.

Such data races can lead to memory corruption.

The flaw was corrected in commit d1c7658 by adding trait bounds T: Sync and T::Owned: Send to the Send impl for Cow<'_, T, U>.

Database specific
{
    "nvd_published_at": "2021-08-08T06:15:00Z",
    "github_reviewed_at": "2021-08-09T21:50:28Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-119",
        "CWE-362"
    ]
}
References

Affected packages

crates.io / beef

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.5.0