Skip to content
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

Restrict MaybeUninit trait impls to fix soundness #309

Merged
merged 1 commit into from Sep 2, 2023

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Sep 2, 2023

Previously, we implemented FromZeroes and FromBytes for MaybeUninit<T> with no bound on T. This resulted in a soundness hole in which T - and thus MaybeUninit<T> - could contain an UnsafeCell, which is a violation of the contracts of FromZeroes and FromBytes.

This is a breaking change, but it's very unlikely to be one that code is currently relying on. In this commit, we publish 0.6.4, and we will yank all preceding 0.6.x versions as soon as 0.6.4 is published.

This is a backport of #308

Previously, we implemented `FromZeroes` and `FromBytes` for
`MaybeUninit<T>` with no bound on `T`. This resulted in a soundness hole
in which `T` - and thus `MaybeUninit<T>` - could contain an
`UnsafeCell`, which is a violation of the contracts of `FromZeroes` and
`FromBytes`.

This is a breaking change, but it's very unlikely to be one that code is
currently relying on. In this commit, we publish 0.6.4, and we will yank
all preceding 0.6.x versions as soon as 0.6.4 is published.

This is a backport of #308
@joshlf joshlf merged commit c33bc31 into v0.6.x Sep 2, 2023
97 checks passed
@joshlf joshlf deleted the maybe-uninit-soundness-v0.6.x branch September 2, 2023 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant