-
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
impl Random
on arrays can lead to dropping uninitialized memory
#5
Comments
Thank you for pointing that out, I'll release a fixed version right away. Great work, thanks for making Rust open-source safer |
mersinvald
added a commit
that referenced
this issue
Jan 18, 2021
mersinvald
added a commit
that referenced
this issue
Jan 18, 2021
Thank you for your feedback! Would you also mind publishing a new release containing the fix to crates.io? |
Yeah, doing just that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello 🦀 ,
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
autorand-rs/src/lib.rs
Lines 160 to 170 in c838309
T::random()
can potentially panic (sinceRandom
is a public trait and users can implement it on custom types) and if it does,the partially initialized
array
is dropped. ThusT::drop()
can be invoked on uninitialized memory, leading to undefined behavior.Thank you for reviewing this issue 👍
The text was updated successfully, but these errors were encountered: