-
Notifications
You must be signed in to change notification settings - Fork 1
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
double free of T
upon panic in two functions
#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. |
Thank you for bringing this to my attention, even though I didn't see this until recently. I am simply yanking this crate as I don't see a way to fix it without defeating the point of it (the point being that it's convenient). Rejected conceivable fixes:
Recommended alternatives:
|
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
Public functions
through::through()
andthrough::through_and()
are not panic-safe.Both take a user-provided closure as a parameter, and a double free of
T
will happenif the user-provided closure panics.
Reproduction
Below is an example program that exhibits undefined behavior using safe APIs of
through
.Show Detail
Output:
Tested Environment
The text was updated successfully, but these errors were encountered: