-
Notifications
You must be signed in to change notification settings - Fork 0
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
SyncRef's clone() and debug() allow data races #1
Comments
Heads up: this issue has been included in the RustSec advisory database. It will be surfaced by tools such as cargo-audit or cargo-deny from now on. 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. |
....oh, hello. Sorry, I'm going to be quite slow on this. I should be able to fix this, but I believe there are other soundness holes in the crate. |
Crates with soundness holes are fine as long as they're explicitly labeled as such. If you put something like this in the README, it should clear up any confusion:
|
Hello fellow Rustacean,
we (Rust group @sslab-gatech) found a memory-safety/soundness issue in this crate while scanning Rust code on crates.io for potential vulnerabilities.
Issue Description
v9/src/util.rs
Line 27 in 37756c6
SyncRef
'sSync
implementation doesn't imposeSync
bound onT
. This definition allows data races if&T
is accessible through&SyncRef
.SyncRef
derivesClone
andDebug
, and the default implementations of those traits access&T
in such a way.Reproduction
Below is an example program that exhibits undefined behavior using safe APIs of
v9
.Show Detail
Output:
Tested Environment
The text was updated successfully, but these errors were encountered: