This repository has been archived by the owner on Aug 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
Memory safe violation by abusing __private_get_type_id__
#336
Comments
Actually, the bug here looks very similar to what happened to the standard library: |
Qwaz
added a commit
to Qwaz/advisory-db
that referenced
this issue
Jun 28, 2020
Qwaz
added a commit
to Qwaz/advisory-db
that referenced
this issue
Jun 28, 2020
Shnatsel
added a commit
to rustsec/advisory-db
that referenced
this issue
Aug 14, 2020
Informational advisory for rust-lang-deprecated/failure#336
This was referenced Mar 10, 2021
This was referenced Jun 10, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I noticed that it is possible to cause type confusion in downcast by manually implementing
__private_get_type_id__
.https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ad66fe439660eb8373996bfd6bd7a835
Although the name of the function clearly shows that it is a private API, I believe a safe Rust program should not violate the memory safety guaranteed by Rust type system.
The text was updated successfully, but these errors were encountered: