Files
advisory-db/crates/reffers/RUSTSEC-2020-0094.md
diwic f20b53ca89 Patched release of reffers (#984)
I'm not sure anyone uses this old crate but if they do, at least now they have a fixed version.
2021-08-21 12:38:49 +03:00

1.0 KiB

[advisory]
id = "RUSTSEC-2020-0094"
package = "reffers"
aliases = ["CVE-2020-36203"]
date = "2020-12-01"
url = "https://github.com/diwic/reffers-rs/issues/7"
informational = "unsound"
categories = ["memory-corruption", "thread-safety"]
keywords = ["concurrency"]

[versions]
# Versions which include fixes for this vulnerability
patched = [">= 0.6.1"]

Unsound: can make ARefss contain a !Send, !Sync object.

ARefss<'a, V> is a type that is assumed to contain objects that are Send + Sync.

In the affected versions of this crate, Send/Sync traits are unconditionally implemented for ARefss<'a, V>.

By using the ARefss::map() API, we can insert a !Send or !Sync object into ARefss<'a, V>. After that, it is possible to create a data race to the inner object of ARefss<'a, V>, which can lead to undefined behavior & memory corruption.

The flaw was corrected in commit 6dd7ca0 (6dd7ca0d50) by adding trait bound V: Send + Sync to ARefss::map() API.