https://github.com/Speykious/cve-rs Skip to content Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} Speykious / cve-rs Public * Notifications * Fork 12 * Star 733 * Blazingly fast memory vulnerabilities, written in 100% safe Rust. License View license 733 stars 12 forks Branches Tags Activity Star Notifications * Code * Issues 5 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights Speykious/cve-rs This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 64 Commits .github/workflows .github/workflows .vscode .vscode benches benches src src .gitignore .gitignore Cargo.lock Cargo.lock Cargo.toml Cargo.toml LICENSE LICENSE README.md README.md rust-toolchain.toml rust-toolchain.toml rustfmt.toml rustfmt.toml segfault-demo.png segfault-demo.png View all files Repository files navigation * README * License cve-rs [6874747073] Blazingly fast memory vulnerabilities, written in 100% 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. Rust is an amazing language. You can program a lot of useful things while ensuring that your program will stay safe. Unfortunately, safe Rust is quite limiting. For example, you cannot introduce code that could corrupt the program's memory. Now, with cve-rs, you can corrupt your program's memory without corrupting your program's memory. We are very committed to making sure cve-rs is memory-safe. We know that unsafe code can have unintended consequences, such as memory unsafety that causes programs to be insecure or unstable. That is why cve-rs uses #![deny(unsafe_code)] in the entire codebase. There is not a single block of unsafe code* in this project. * There is, unfortunately, one exception: In our tests, we compare the results of our safe transmute function against the regular std::mem::transmute function. Perhaps somewhat shortsightedly, the standard library implementation is unsafe. Regardless, this is only in our tests - the core library has no unsafe code. cve-rs implements the following bugs in safe Rust: * Use after free * Buffer overflow * Segmentation fault cve-rs also contains safe reimplementations of: * std::mem::transmute * std::ptr::null()/null_mut() but for references Here is an example of usage with the segfault subcommand: segfault demo Install cve-rs can be used directly with Cargo. To use it as a library: cargo add cve-rs Or to run our example binary: cargo install cve-rs WASM support cve-rs supports WASM through the WASI API. You can compile it and run it using Wasmer with the following commands: cargo build --target wasm32-wasi wasmer run target/wasm32-wasi/debug/cve-rs.wasm Contributors Special thanks to @Bright-Shard and @Creative0708! Can I use cve-rs in production? This project is licensed under the GLWTSPL. License This project is licensed under the GLWTSPL. Good Luck About Blazingly fast memory vulnerabilities, written in 100% safe Rust. Resources Readme License View license Activity Stars 733 stars Watchers 6 watching Forks 12 forks Report repository Releases 2 tags Packages 0 No packages published Contributors 4 * * * * Languages * Rust 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.