* updated ref * update symcc * updated symcc * CI for symcc * updated symcc * enabling git * add runtime deps to makefile * only linux Co-authored-by: tokatoka <tokazerkje@outlook.com>
This commit is contained in:
parent
88a14cbbd2
commit
5df130188a
52
fuzzers/libfuzzer_stb_image_concolic/Makefile.toml
Normal file
52
fuzzers/libfuzzer_stb_image_concolic/Makefile.toml
Normal file
@ -0,0 +1,52 @@
|
||||
# Variables
|
||||
[env]
|
||||
FUZZER_NAME='libfuzzer_stb_image_concolic'
|
||||
|
||||
# Compilers
|
||||
[tasks.runtime]
|
||||
linux_alias = "runtime_unix"
|
||||
mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.runtime_unix]
|
||||
condition = { files_not_exist = ["runtime/target/libSymRuntime.so"] }
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd runtime
|
||||
cargo build --release
|
||||
'''
|
||||
|
||||
# Build the fuzzer
|
||||
[tasks.fuzzer]
|
||||
linux_alias = "fuzzer_unix"
|
||||
mac_alias = "unsupported"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
dependencies = ["runtime"]
|
||||
script_runner = "@shell"
|
||||
script = '''
|
||||
cd fuzzer
|
||||
cargo build --release
|
||||
'''
|
||||
|
||||
[tasks.test]
|
||||
alias = "fuzzer"
|
||||
|
||||
[tasks.unsupported]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
echo "Not supported on this platform."
|
||||
'''
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
# Disable default `clean` definition
|
||||
clear = true
|
||||
script='''
|
||||
cd fuzzer
|
||||
cargo clean
|
||||
cd ../runtime
|
||||
cargo clean
|
||||
'''
|
@ -5,7 +5,11 @@ use mimalloc::MiMalloc;
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
use clap::{self, StructOpt};
|
||||
use std::{env, path::PathBuf};
|
||||
use std::{
|
||||
env,
|
||||
path::PathBuf,
|
||||
process::{Child, Command, Stdio},
|
||||
};
|
||||
|
||||
use libafl::{
|
||||
bolts::{
|
||||
@ -146,7 +150,7 @@ fn fuzz(
|
||||
println!("We're a client, let's fuzz :)");
|
||||
|
||||
// A minimization+queue policy to get testcasess from the corpus
|
||||
let scheduler = IndexesLenTimeMinimizerScheduler::new(QueueScheduler::new());
|
||||
let scheduler = IndexesLenTimeMinimizerScheduler::new(PowerQueueScheduler::new());
|
||||
|
||||
// A fuzzer with feedbacks and a corpus scheduler
|
||||
let mut fuzzer = StdFuzzer::new(scheduler, feedback, objective);
|
||||
@ -240,12 +244,8 @@ fn fuzz(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
use std::process::{Child, Command, Stdio};
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct MyCommandConfigurator {
|
||||
command: Option<Command>,
|
||||
}
|
||||
pub struct MyCommandConfigurator;
|
||||
|
||||
impl CommandConfigurator for MyCommandConfigurator {
|
||||
fn spawn_child<I: Input + HasTargetBytes>(&mut self, input: &I) -> Result<Child, Error> {
|
||||
|
1
fuzzers/qemu_launcher/.gitignore
vendored
1
fuzzers/qemu_launcher/.gitignore
vendored
@ -1 +1,2 @@
|
||||
libpng-*
|
||||
libpng_harness
|
||||
|
@ -1,5 +1,5 @@
|
||||
This is a support crate for [symcc_runtime](https://crates.io/crates/symcc_runtime).
|
||||
It defines a stable URL and commit hash for th [LibAFL](https://github.com/AFLplusplus/LibAFL) [fork](https://github.com/AFLplusplus/symcc) of [SymCC](https://github.com/eurecom-s3/symcc).
|
||||
It also provides convenient methods to clone and build SymCC to be used in build scripts in LibAFL based fuzzers.
|
||||
It defines a stable URL and commit hash for the [LibAFL](https://github.com/AFLplusplus/LibAFL) [fork](https://github.com/AFLplusplus/symcc) of [SymCC](https://github.com/eurecom-s3/symcc).
|
||||
It also provides convenient methods to clone and build SymCC to be used in build scripts in LibAFL-based fuzzers.
|
||||
|
||||
[Documentation](https://docs.rs/symcc_libafl)
|
@ -4,7 +4,7 @@
|
||||
/// The URL of the `LibAFL` `SymCC` fork.
|
||||
pub const SYMCC_REPO_URL: &str = "https://github.com/AFLplusplus/symcc.git";
|
||||
/// The commit of the `LibAFL` `SymCC` fork.
|
||||
pub const SYMCC_REPO_COMMIT: &str = "45cde0269ae22aef4cca2e1fb98c3b24f7bb2984";
|
||||
pub const SYMCC_REPO_COMMIT: &str = "5cccc33456c48ad83008eb618e7da5d005c72d89";
|
||||
|
||||
#[cfg(feature = "clone")]
|
||||
mod clone {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 45cde0269ae22aef4cca2e1fb98c3b24f7bb2984
|
||||
Subproject commit 5cccc33456c48ad83008eb618e7da5d005c72d89
|
@ -16,7 +16,7 @@ if [ ! -d "symcc" ]; then
|
||||
echo "cloning symcc"
|
||||
git clone https://github.com/AFLplusplus/symcc.git symcc
|
||||
cd symcc
|
||||
git checkout 45cde0269ae22aef4cca2e1fb98c3b24f7bb2984
|
||||
git checkout 5cccc33456c48ad83008eb618e7da5d005c72d89
|
||||
cd ..
|
||||
fi
|
||||
|
||||
|
@ -7,14 +7,12 @@ cd "$SCRIPT_DIR/.."
|
||||
|
||||
fuzzers=$(find ./fuzzers -maxdepth 1 -type d)
|
||||
backtrace_fuzzers=$(find ./fuzzers/backtrace_baby_fuzzers -maxdepth 1 -type d)
|
||||
extra_fuzzer_and_runtime="
|
||||
./fuzzers/libfuzzer_stb_image_concolic/runtime
|
||||
./fuzzers/libfuzzer_stb_image_concolic/fuzzer
|
||||
"
|
||||
|
||||
libafl=$(pwd)
|
||||
|
||||
for fuzzer in $(echo $fuzzers $backtrace_fuzzers $extra_fuzzer_and_runtime);
|
||||
git submodule init && git submodule update
|
||||
|
||||
for fuzzer in $(echo $fuzzers $backtrace_fuzzers);
|
||||
do
|
||||
cd $fuzzer
|
||||
# Clippy checks
|
||||
|
Loading…
x
Reference in New Issue
Block a user