From a4abf5bb3f2f10cd1d63f1ded379163b79843857 Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Sun, 24 Jan 2021 20:19:27 -0500 Subject: [PATCH] Report 0048-ticketed_lock to RustSec --- crates/ticketed_lock/RUSTSEC-0000-0000.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/ticketed_lock/RUSTSEC-0000-0000.md diff --git a/crates/ticketed_lock/RUSTSEC-0000-0000.md b/crates/ticketed_lock/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..f08c183 --- /dev/null +++ b/crates/ticketed_lock/RUSTSEC-0000-0000.md @@ -0,0 +1,20 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "ticketed_lock" +date = "2020-11-17" +url = "https://github.com/kvark/ticketed_lock/issues/7" +categories = ["memory-corruption"] + +[versions] +patched = [">= 0.3.0"] +``` + +# ReadTicket and WriteTicket should only be sendable when T is Send + +Affected versions of this crate unconditionally implemented `Send` for `ReadTicket` & `WriteTicket`. +This allows to send non-Send `T` to other threads. + +This can allows creating data races by cloning types with internal mutability and sending them to other threads (as `T` of `ReadTicket`/`WriteTicket`). Such data races can cause memory corruption or other undefined behavior. + +The flaw was corrected in commit a986a93 by adding `T: Send` bounds to `Send` impls of `ReadTicket`/`WriteTicket`. \ No newline at end of file