HistoryEdit

RUSTSEC-2020-0087

TryMutex allows sending non-Send type across threads

Issued
Package
try-mutex (crates.io)
Type
Vulnerability
Categories
Aliases
Details
https://github.com/mpdn/try-mutex/issues/2
CVSS Score
5.5 MEDIUM
CVSS Details
Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Patched
  • >=0.3.0

Description

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.