-
Notifications
You must be signed in to change notification settings - Fork 419
Report unsoundness in cve-rs, totally-safe-transmute and totally-safe
#2221
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ```toml | ||
| [advisory] | ||
| id = "RUSTSEC-0000-0000" | ||
| package = "cve-rs" | ||
| date = "2025-02-10" | ||
| url = "https://github.com/Speykious/cve-rs" | ||
| categories = ["memory-corruption"] | ||
| informational = "unsound" | ||
| keywords = ["soundness-hole"] | ||
|
|
||
| [versions] | ||
| patched = [] | ||
| unaffected = [] | ||
| ``` | ||
|
|
||
| # cve-rs introduces memory vulnerabilities in safe Rust | ||
|
|
||
| `cve-rs` allows you to introduce common memory vulnerabilities (such as buffer overflows and segfaults) into your Rust program in a memory safe manner. | ||
|
|
||
| Internally, this crate does not use unsafe code, it instead exploits a soundness bug in rustc: https://github.com/rust-lang/rust/issues/25860 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ```toml | ||
| [advisory] | ||
| id = "RUSTSEC-0000-0000" | ||
| package = "totally-safe-transmute" | ||
| date = "2025-02-10" | ||
| url = "https://github.com/ben0x539/totally-safe-transmute" | ||
| categories = ["memory-corruption"] | ||
| informational = "unsound" | ||
| keywords = ["soundness-hole"] | ||
|
|
||
| [versions] | ||
| patched = [] | ||
| unaffected = [] | ||
| ``` | ||
|
|
||
| # totally-safe-transmute allows transmuting any type to any other type in safe Rust | ||
|
|
||
| This crate uses a known soundness issue (https://github.com/rust-lang/rust/issues/32670) that will never get fixed. In short, Linux provides a file called `/proc/self/mem` which can be used by a program to modify its own memory. This library modifies an enum variant number by accessing its own memory as a file to effectively transmute a variable. | ||
|
|
||
| See also <https://doc.rust-lang.org/std/os/unix/io/index.html#procselfmem-and-similar-os-features> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ```toml | ||
| [advisory] | ||
| id = "RUSTSEC-0000-0000" | ||
| package = "totally-safe" | ||
| date = "2025-02-10" | ||
| url = "https://github.com/viktorlott/totally-safe" | ||
| categories = ["memory-corruption"] | ||
| informational = "unsound" | ||
| keywords = ["soundness-hole"] | ||
|
|
||
| [versions] | ||
| patched = [] | ||
| unaffected = [] | ||
| ``` | ||
|
|
||
| # totally-safe introduces memory vulnerabilities in safe Rust | ||
|
|
||
| `totally-safe` provides unsound APIs that exploit a soundness bug in rustc: https://github.com/rust-lang/rust/issues/25860 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw some discussion above about the utility of restating the project's satirical description. I don't have much of anything to suggest in regards to this PR, but if someone makes a PR in the future and wants to change the descriptions, I propose:
I'm fine either way. That being said, I don't have much experience using Rustsec (I probably should).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For you too: a PR making this change would be great!