You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that MvccRwLock implements Send and Sync for all types:
However, this should probably have tighter bounds on its Send and Sync traits, otherwise its possible to create data-races from safe rust code by using non-Sync types like Cell across threads or sending non-Send types across like Rc. Here's a little proof-of-concept using Rc.
Main: 0x561539bdcd40
Thread: 0x561539bdcd40
Terminated with signal 4 (SIGILL)
It seems like this class also potentially allows for aliasing violations, in this case maybe it would be better to mark the methods as unsafe and maybe not expose the class outside the crate?
The text was updated successfully, but these errors were encountered:
Once a fix is released to crates.io, please open a pull request to update the advisory with the patched version, or file an issue on the advisory database repository.
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that
MvccRwLock
implements Send and Sync for all types:noise/src/index.rs
Lines 418 to 419 in 5a582a7
However, this should probably have tighter bounds on its
Send
andSync
traits, otherwise its possible to create data-races from safe rust code by using non-Sync types likeCell
across threads or sending non-Send types across likeRc
. Here's a little proof-of-concept usingRc
.This outputs:
It seems like this class also potentially allows for aliasing violations, in this case maybe it would be better to mark the methods as unsafe and maybe not expose the class outside the crate?
The text was updated successfully, but these errors were encountered: