Rocket/core/lib/fuzz
Sergio Benitez 908a918e8b Fuzz to validate routing collision safety.
The fuzzing target introduced in this commit attemps to assert
"collision safety". Formally, this is the property that:

  matches(request, route) := request is matched to route
  collides(route1, route2) := there is a a collision between routes

  forall requests req. !exist routes r1, r2 s.t.
    matches(req, r1) AND matches(req, r2) AND not collides(r1, r2)

Alternatively:

  forall requests req, routes r1, r2.
    matches(req, r1) AND matches(req, r2) => collides(r1, r2)

The target was run for 20 CPU hours without failure.
2023-04-07 20:27:56 -07:00
..
corpus Fuzz to validate routing collision safety. 2023-04-07 20:27:56 -07:00
targets Fuzz to validate routing collision safety. 2023-04-07 20:27:56 -07:00
.gitignore Fuzz URI parsing and display. 2021-06-06 21:52:44 -07:00
Cargo.toml Fuzz to validate routing collision safety. 2023-04-07 20:27:56 -07:00
README.md Fuzz URI parsing and display. 2021-06-06 21:52:44 -07:00

README.md

Fuzzing

Install cargo-fuzz:

cargo install -f cargo-fuzz

Run any available target where $target is the name of the target and $n is the number of CPUs to use for fuzzing:

cargo fuzz list # get list of targets
cargo fuzz run $target -j $n