From d0b9cd8051a589c4c88505a253bb851a2c71cd46 Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Sun, 24 Jan 2021 07:20:09 -0500 Subject: [PATCH] Report 0041-unicycle to RustSec --- crates/unicycle/RUSTSEC-0000-0000.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 crates/unicycle/RUSTSEC-0000-0000.md diff --git a/crates/unicycle/RUSTSEC-0000-0000.md b/crates/unicycle/RUSTSEC-0000-0000.md new file mode 100644 index 0000000000..ecf1511057 --- /dev/null +++ b/crates/unicycle/RUSTSEC-0000-0000.md @@ -0,0 +1,19 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "unicycle" +date = "2020-11-15" +url = "https://github.com/udoprog/unicycle/issues/8" +categories = ["memory-corruption"] + +[versions] +patched = [">= 0.7.1"] +``` + +# PinSlab and Unordered need bounds on their Send/Sync traits + +Affected versions of this crate unconditionally implemented `Send` & `Sync` for types `PinSlab` & `Unordered`. This allows sending non-Send types to other threads and concurrently accessing non-Sync types from multiple threads. + +This can result in a data race & memory corruption when types that provide internal mutability without synchronization are contained within `PinSlab` or `Unordered` and accessed concurrently from multiple threads. + +The flaw was corrected in commits 92f40b4 & 6a6c367 by adding trait bound `T: Send` to `Send` impls for `PinSlab` & `Unordered` and adding `T: Sync` to `Sync` impls for `PinSlab` & `Unordered`.