Files
advisory-db/crates/beef/RUSTSEC-2020-0122.md
Alexander Kjäll f494f83f8e add missing cve info to advisories (#1077)
looks like RUSTSEC-2020-0036 might be a special case, someone got a cve for that the crate is unmaintained
2021-10-14 21:53:11 +02:00

743 B

[advisory]
id = "RUSTSEC-2020-0122"
package = "beef"
date = "2020-10-28"
url = "https://github.com/maciejhirsz/beef/issues/37"
categories = ["memory-corruption", "thread-safety"]
aliases = ["CVE-2020-36442"]

[versions]
patched = [">= 0.5.0"]

beef::Cow lacks a Sync bound on its Send trait allowing for data races

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