Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try-mutex: TryMutex<T> allows sending non-Send type across threads #517

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions crates/try-mutex/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -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<T> allows sending non-Send type across threads

Affected versions of this crate unconditionally implemented Sync trait for `TryMutex<T>` 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.