From 1dfb30f0d3df4ce48a384ea6ba1540c88d997794 Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Wed, 27 Jan 2021 12:26:52 -0500 Subject: [PATCH] Report 0065-v9 to RustSec --- crates/v9/RUSTSEC-0000-0000.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 crates/v9/RUSTSEC-0000-0000.md diff --git a/crates/v9/RUSTSEC-0000-0000.md b/crates/v9/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..1e93729 --- /dev/null +++ b/crates/v9/RUSTSEC-0000-0000.md @@ -0,0 +1,18 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "v9" +date = "2020-12-18" +url = "https://github.com/purpleposeidon/v9/issues/1" +categories = ["memory-corruption", "thread-safety"] + +[versions] +patched = [] +``` + +# SyncRef's clone() and debug() allow data races + +Affected versions of this crate unconditionally implement `Sync` for `SyncRef`. +This definition allows data races if `&T` is accessible through `&SyncRef`. + +`SyncRef` derives `Clone` and `Debug`, and the default implementations of those traits access `&T` by invoking `T::clone()` & `T::fmt()`. It is possible to create data races & undefined behavior by concurrently invoking `SyncRef::clone()` or `SyncRef::fmt()` from multiple threads with `T: !Sync`.