-
Notifications
You must be signed in to change notification settings - Fork 107
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
try_transmute_mut
soundness issue
#2226
Comments
Ack; thanks for the report. It looks like we're missing a |
jswrenn
added a commit
that referenced
this issue
Jan 12, 2025
Ensures that the source reference remains valid after the transmuted (and possibly mutated) destination is dropped. Fixes #2226
jswrenn
added a commit
that referenced
this issue
Jan 12, 2025
Ensures that the source reference remains valid after the transmuted (and possibly mutated) destination is dropped. Fixes #2226
jswrenn
added a commit
that referenced
this issue
Jan 12, 2025
Ensures that the source reference remains valid after the transmuted (and possibly mutated) destination is dropped. Fixes #2226
jswrenn
added a commit
that referenced
this issue
Jan 27, 2025
Ensures that the source reference remains valid after the transmuted (and possibly mutated) destination is dropped. Makes progress on #2226
jswrenn
added a commit
that referenced
this issue
Feb 4, 2025
Ensures that the source reference remains valid after the transmuted (and possibly mutated) destination is dropped. Makes progress on #2226
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 4, 2025
Ensures that the source reference remains valid after the transmuted (and possibly mutated) destination is dropped. Makes progress on #2226
#2229, which fixes this issue at a surface level (it's sound, but doesn't fix the underlying internals that allowed this to slip through) is published in 0.8.16. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Progress
Src: FromBytes
bound totry_transmute_mut!
try_cast_or_pme
soundOriginal text
Using zerocopy 0.8.13:
cargo +nightly miri run
caught an UB:try_transmute_mut may not be a safe API that can be exposed because it only does validation when creating the reference but the user is free to write whatever bit pattern to the created reference.
The text was updated successfully, but these errors were encountered: