{"id":"RUSTSEC-2020-0059","summary":"MutexGuard::map can cause a data race in safe code","details":"Affected versions of the crate had a Send/Sync implementation for MappedMutexGuard that only considered variance on T, while MappedMutexGuard dereferenced to U.\n\nThis could of led to data races in safe Rust code when a closure used in MutexGuard::map() returns U that is unrelated to T.\n\nThe issue was fixed by fixing `Send` and `Sync` implementations, and by adding a `PhantomData\u003c&'a mut U\u003e` marker to the `MappedMutexGuard` type to tell the compiler that the guard is over\nU too.","aliases":["CVE-2020-35905","GHSA-rh4w-94hh-9943"],"modified":"2023-11-01T04:53:07.608463Z","published":"2020-10-22T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/futures-util"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2020-0059.html"},{"type":"REPORT","url":"https://github.com/rust-lang/futures-rs/issues/2239"}],"affected":[{"package":{"name":"futures-util","ecosystem":"crates.io","purl":"pkg:cargo/futures-util"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.2"},{"fixed":"0.3.7"}]}],"ecosystem_specific":{"affects":{"functions":["futures_util::lock::MutexGuard::map"],"arch":[],"os":[]},"affected_functions":null},"database_specific":{"cvss":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","informational":null,"categories":["thread-safety"],"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0059.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}