From bebdf453eecad986d34c45105863832c81a50b28 Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Tue, 26 Jan 2021 11:51:37 -0500 Subject: [PATCH] Report 0044-signal-simple to RustSec --- crates/signal-simple/RUSTSEC-0000-0000.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 crates/signal-simple/RUSTSEC-0000-0000.md diff --git a/crates/signal-simple/RUSTSEC-0000-0000.md b/crates/signal-simple/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..55cc785 --- /dev/null +++ b/crates/signal-simple/RUSTSEC-0000-0000.md @@ -0,0 +1,18 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "signal-simple" +date = "2020-11-15" +url = "https://github.com/kitsuneninetails/signal-rust/issues/2" +categories = ["memory-corruption"] + +[versions] +patched = [] +``` + +# SyncChannel can move 'T: !Send' to other threads + +Affected versions of this crate unconditionally implement Send/Sync for `SyncChannel`. +`SyncChannel` doesn't provide access to `&T` but merely serves as a channel that consumes and returns owned `T`. + +Users can create UB in safe Rust by sending `T: !Send` to other threads with `SyncChannel::send/recv` APIs. Using `T = Arc` allows to create data races (which can lead to memory corruption), and using `T = MutexGuard` allows to unlock a mutex from a thread that didn't lock the mutex.