- Reported
-
- Issued
-
- Package
-
lock_api
(crates.io)
- Type
-
INFO
Unsound
- Categories
-
- Keywords
-
#concurrency
- Aliases
-
- References
-
- Patched
-
- Affected Functions
- Version
lock_api::MappedMutexGuard
-
lock_api::MappedRwLockReadGuard
-
lock_api::MappedRwLockWriteGuard
-
lock_api::RwLockReadGuard
-
lock_api::RwLockWriteGuard
-
Description
Affected versions of lock_api had unsound implementations of the Send
or
Sync
traits for some guard objects, namely:
- MappedMutexGuard
- MappedRwLockReadGuard
- MappedRwLockWriteGuard
- RwLockReadGuard
- RwLockWriteGuard
These guards could allow data races through types that are not safe to Send
across thread boundaries in safe Rust code.
This issue was fixed by changing the trait bounds on the Mapped
guard types
and removing the Sync
trait for the RwLock
guards.
Advisory available under CC0-1.0
license.