From 639d1b1be1d89b098d8dade09feb6e07dea9508e Mon Sep 17 00:00:00 2001 From: Yechan Bae Date: Mon, 7 Dec 2020 12:27:27 -0500 Subject: [PATCH] Report 0047-try-mutex to RustSec (#517) --- crates/try-mutex/RUSTSEC-0000-0000.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 crates/try-mutex/RUSTSEC-0000-0000.md diff --git a/crates/try-mutex/RUSTSEC-0000-0000.md b/crates/try-mutex/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..95bf251 --- /dev/null +++ b/crates/try-mutex/RUSTSEC-0000-0000.md @@ -0,0 +1,18 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "try-mutex" +date = "2020-11-17" +url = "https://github.com/mpdn/try-mutex/issues/2" + +[versions] +patched = [">= 0.3.0"] +``` + +# TryMutex allows sending non-Send type across threads + +Affected versions of this crate unconditionally implemented Sync trait for `TryMutex` type. + +This allows users to put non-Send `T` type in `TryMutex` and send it to another thread, which can cause a data race. + +The flaw was corrected in the 0.3.0 release by adding `T: Send` bound for the Sync trait implementation.