• Stars
    star
    3,840
  • Rank 11,446 (Top 0.3 %)
  • Language
    Rust
  • License
    Other
  • Created 9 months ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Blazingly πŸ”₯ fast πŸš€ memory vulnerabilities, written in 100% safe Rust. πŸ¦€

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.

Why choose cve-rs?

  • 🩸 Bleeding edge technology
  • πŸ•ΉοΈ Paradigm-changing (no more unsafe code!)
  • πŸ”₯ Blazingly fast
  • πŸ’‘ Easy to use
  • πŸ† Featuring way πŸ‘‹ too 2️⃣ many 🀯 emojis in the πŸ“– readme πŸ”₯ πŸ¦€ πŸ’¨
  • πŸ¦€ Built in 100% memory-safe Rust

Example

// With cve-rs, you can crash prod in a πŸ”₯ blazingly fast manner!
pub fn segfault() {
	let null: &mut u8 = cve_rs::null_mut::<u8>();
	*null = 42;
}

Segfault demo

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 bugs like segmentation faults, use-after-frees, and buffer overflows.

That is why cve-rs uses #![deny(unsafe_code)] in the entire codebase. There is not a single block of unsafe code (except for some tests) in this project.

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

Installation

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
cve-rs

WASM support

cve-rs supports WASM through the WASI API, and also to Webassembly that you can run in a browser.

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, and everyone else who contributed to cve-rs.

Can I use cve-rs in production?

This project is licensed under the GLWTSPL.

Wait, how safe is cve-rs?!?

This project is licensed under the GLWTSPL.

License

This project is licensed under the GLWTSPL.

Good Luck

...and godspeed.

More Repositories

1

SeeShark

Simple C# camera library.
C#
142
star
2

snaek

a snake game in Rust almost from scratch
Rust
17
star
3

OwOverlay

A very simple configurable key overlay written in Rust.
Rust
8
star
4

NativeFileDialogs.NET

Full .NET wrapper for NativeFileDialogs (Extended).
C#
7
star
5

clipbox

A (eventually) cross-platform clipboard library.
Rust
6
star
6

read-last-lines-ts

Efficiently reads the last lines of a file, written in TypeScript for intellisense
TypeScript
4
star
7

oSUS

Some osu! utilities written in Rust.
Rust
4
star
8

hardcore-rust

Doing some stuff in Rust from scratch (no_std)
Rust
3
star
9

zapf

ZAP file format.
Rust
3
star
10

arch-chan

An archival fork of RavioliMavioli's Arch-chan Live2D and Inochi2D models
3
star
11

loki

God of Chaotic Chat Apps.
2
star
12

sorbot

Le Bot Discord de vΓ©rification pour le serveur Sorbonne Jussieu ! (GitHub mirror from GitLab)
CoffeeScript
2
star
13

ye

yes, but faster, and written in Rust.
Rust
2
star
14

strnth

strnth^strnth^strnth
Haskell
2
star
15

TicTacToe

A TicTacToe in C# that is designed to be extensible.
C#
1
star
16

yt-music

Download songs from YouTube in mp3 format, thumbnail included
Python
1
star
17

parsers-ts

Making simple parsers in typescript.
TypeScript
1
star
18

yui

Rust GUI framework from scratch with OpenGL
Rust
1
star
19

c4

A rhythm game from absolute scratch in C (if I stop procrastinating)
C
1
star
20

mysql-leak

MySQL is eating too much RAM! D:
Java
1
star
21

arcsquared

Rewrite of Arcthird in Typescript, which is a rewrite of Arcsecond in Coffeescript.
TypeScript
1
star
22

single-rotation-gpu

Program that lets you observe the evolution of a grid state in a cellular automaton called Single Rotation.
C++
1
star
23

single-rotation-cpu

Program that lets you observe the evolution of a grid state in a cellular automaton called Single Rotation.
C++
1
star
24

arcthird

The arcsecond library from LLJS only works for strings and array types. I am trying to make it more abstract by rewriting it to work on any abstract custom stream, using Coffeescript! (GitHub mirror from GitLab)
CoffeeScript
1
star
25

simple-tga-reader

Simple TGA image reader
Rust
1
star
26

V4l2.AutoGen

Auto-generated C# bindings for V4l2 (Video4Linux2).
C#
1
star