Another attempt to add interesting crashing input on crash (#2391)
* aa * why?????????????? * ppp * aa * aa * abcde * fixer * ppp * aa * fix from windows * sugar * ff * ?? * a * to log::error * exclude * exclude libafl_qemu clippy on windows * pp * aa --------- Co-authored-by: Your Name <you@example.com>
This commit is contained in:
parent
539ac91ce0
commit
7969e7ae51
24
Cargo.toml
24
Cargo.toml
@ -4,18 +4,11 @@ members = [
|
|||||||
"libafl",
|
"libafl",
|
||||||
"libafl_bolts",
|
"libafl_bolts",
|
||||||
"libafl_cc",
|
"libafl_cc",
|
||||||
"libafl_concolic/symcc_runtime",
|
"libafl_derive",
|
||||||
"libafl_concolic/symcc_libafl",
|
"libafl_targets",
|
||||||
|
"libafl_sugar",
|
||||||
"libafl_concolic/test/dump_constraints",
|
"libafl_concolic/test/dump_constraints",
|
||||||
"libafl_concolic/test/runtime_test",
|
"libafl_concolic/test/runtime_test",
|
||||||
"libafl_derive",
|
|
||||||
"libafl_frida",
|
|
||||||
"libafl_libfuzzer",
|
|
||||||
"libafl_nyx",
|
|
||||||
"libafl_qemu",
|
|
||||||
"libafl_sugar",
|
|
||||||
"libafl_targets",
|
|
||||||
"libafl_tinyinst",
|
|
||||||
"utils/build_and_test_fuzzers",
|
"utils/build_and_test_fuzzers",
|
||||||
"utils/deexit",
|
"utils/deexit",
|
||||||
"utils/libafl_benches",
|
"utils/libafl_benches",
|
||||||
@ -33,14 +26,21 @@ default-members = [
|
|||||||
exclude = [
|
exclude = [
|
||||||
"bindings",
|
"bindings",
|
||||||
"fuzzers",
|
"fuzzers",
|
||||||
"libafl_qemu/libafl_qemu_build",
|
|
||||||
"libafl_qemu/libafl_qemu_sys",
|
|
||||||
"utils/noaslr",
|
"utils/noaslr",
|
||||||
"utils/gdb_qemu",
|
"utils/gdb_qemu",
|
||||||
"utils/libafl_fmt",
|
"utils/libafl_fmt",
|
||||||
"utils/desyscall",
|
"utils/desyscall",
|
||||||
"utils/multi_machine_generator",
|
"utils/multi_machine_generator",
|
||||||
"scripts",
|
"scripts",
|
||||||
|
"libafl_concolic/symcc_runtime",
|
||||||
|
"libafl_concolic/symcc_libafl",
|
||||||
|
"libafl_frida",
|
||||||
|
"libafl_libfuzzer",
|
||||||
|
"libafl_nyx",
|
||||||
|
"libafl_qemu",
|
||||||
|
"libafl_tinyinst",
|
||||||
|
"libafl_qemu/libafl_qemu_build",
|
||||||
|
"libafl_qemu/libafl_qemu_sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl"
|
name = "libafl"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||||
description = "Slot your own fuzzers together and extend their features using Rust"
|
description = "Slot your own fuzzers together and extend their features using Rust"
|
||||||
documentation = "https://docs.rs/libafl"
|
documentation = "https://docs.rs/libafl"
|
||||||
|
@ -38,7 +38,7 @@ use crate::{
|
|||||||
executors::{Executor, HasObservers},
|
executors::{Executor, HasObservers},
|
||||||
fuzzer::{EvaluatorObservers, ExecutionProcessor},
|
fuzzer::{EvaluatorObservers, ExecutionProcessor},
|
||||||
inputs::{Input, NopInput, UsesInput},
|
inputs::{Input, NopInput, UsesInput},
|
||||||
observers::{ObserversTuple, TimeObserver},
|
observers::{ObserversTuple, TimeObserver, UsesObservers},
|
||||||
state::{HasExecutions, HasLastReportTime, NopState, State, Stoppable, UsesState},
|
state::{HasExecutions, HasLastReportTime, NopState, State, Stoppable, UsesState},
|
||||||
Error, HasMetadata,
|
Error, HasMetadata,
|
||||||
};
|
};
|
||||||
@ -371,12 +371,13 @@ where
|
|||||||
EM: AdaptiveSerializer + EventProcessor<E, Z> + EventFirer + HasEventManagerId,
|
EM: AdaptiveSerializer + EventProcessor<E, Z> + EventFirer + HasEventManagerId,
|
||||||
EMH: EventManagerHooksTuple<EM::State>,
|
EMH: EventManagerHooksTuple<EM::State>,
|
||||||
E: HasObservers<State = Self::State> + Executor<Self, Z>,
|
E: HasObservers<State = Self::State> + Executor<Self, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
S: State,
|
S: State,
|
||||||
Self::State: HasExecutions + HasMetadata,
|
Self::State: HasExecutions + HasMetadata,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
||||||
+ ExecutionProcessor<E::Observers, State = Self::State>,
|
+ ExecutionProcessor<State = Self::State>,
|
||||||
{
|
{
|
||||||
fn process(
|
fn process(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -403,6 +404,7 @@ where
|
|||||||
impl<E, EM, EMH, S, SP, Z> EventManager<E, Z> for CentralizedEventManager<EM, EMH, S, SP>
|
impl<E, EM, EMH, S, SP, Z> EventManager<E, Z> for CentralizedEventManager<EM, EMH, S, SP>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = Self::State> + Executor<Self, Z>,
|
E: HasObservers<State = Self::State> + Executor<Self, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EM: AdaptiveSerializer + EventManager<E, Z>,
|
EM: AdaptiveSerializer + EventManager<E, Z>,
|
||||||
EM::State: HasExecutions + HasMetadata + HasLastReportTime,
|
EM::State: HasExecutions + HasMetadata + HasLastReportTime,
|
||||||
@ -410,7 +412,7 @@ where
|
|||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
||||||
+ ExecutionProcessor<E::Observers, State = Self::State>,
|
+ ExecutionProcessor<State = Self::State>,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -527,9 +529,10 @@ where
|
|||||||
) -> Result<usize, Error>
|
) -> Result<usize, Error>
|
||||||
where
|
where
|
||||||
E: Executor<Self, Z> + HasObservers<State = <Self as UsesState>::State>,
|
E: Executor<Self, Z> + HasObservers<State = <Self as UsesState>::State>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
<Self as UsesState>::State: UsesInput + HasExecutions + HasMetadata,
|
<Self as UsesState>::State: UsesInput + HasExecutions + HasMetadata,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: ExecutionProcessor<E::Observers, State = <Self as UsesState>::State>
|
Z: ExecutionProcessor<State = <Self as UsesState>::State>
|
||||||
+ EvaluatorObservers<E::Observers>,
|
+ EvaluatorObservers<E::Observers>,
|
||||||
{
|
{
|
||||||
// TODO: Get around local event copy by moving handle_in_client
|
// TODO: Get around local event copy by moving handle_in_client
|
||||||
@ -576,8 +579,8 @@ where
|
|||||||
where
|
where
|
||||||
E: Executor<Self, Z> + HasObservers<State = <Self as UsesState>::State>,
|
E: Executor<Self, Z> + HasObservers<State = <Self as UsesState>::State>,
|
||||||
<Self as UsesState>::State: UsesInput + HasExecutions + HasMetadata,
|
<Self as UsesState>::State: UsesInput + HasExecutions + HasMetadata,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a> + Serialize,
|
||||||
Z: ExecutionProcessor<E::Observers, State = <Self as UsesState>::State>
|
Z: ExecutionProcessor<State = <Self as UsesState>::State>
|
||||||
+ EvaluatorObservers<E::Observers>,
|
+ EvaluatorObservers<E::Observers>,
|
||||||
{
|
{
|
||||||
log::debug!("handle_in_main!");
|
log::debug!("handle_in_main!");
|
||||||
|
@ -39,8 +39,8 @@ use crate::{
|
|||||||
executors::{Executor, HasObservers},
|
executors::{Executor, HasObservers},
|
||||||
fuzzer::{Evaluator, EvaluatorObservers, ExecutionProcessor},
|
fuzzer::{Evaluator, EvaluatorObservers, ExecutionProcessor},
|
||||||
inputs::{NopInput, UsesInput},
|
inputs::{NopInput, UsesInput},
|
||||||
observers::{ObserversTuple, TimeObserver},
|
observers::{ObserversTuple, TimeObserver, UsesObservers},
|
||||||
state::{HasExecutions, HasLastReportTime, NopState, State, UsesState},
|
state::{HasExecutions, HasImported, HasLastReportTime, NopState, State, UsesState},
|
||||||
Error, HasMetadata,
|
Error, HasMetadata,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -389,7 +389,7 @@ where
|
|||||||
impl<EMH, S, SP> LlmpEventManager<EMH, S, SP>
|
impl<EMH, S, SP> LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
// Handle arriving events in the client
|
// Handle arriving events in the client
|
||||||
@ -404,10 +404,9 @@ where
|
|||||||
) -> Result<(), Error>
|
) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
E: Executor<Self, Z> + HasObservers<State = S>,
|
E: Executor<Self, Z> + HasObservers<State = S>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<State = S> + EvaluatorObservers<E::Observers> + Evaluator<E, Self>,
|
||||||
+ EvaluatorObservers<E::Observers>
|
|
||||||
+ Evaluator<E, Self>,
|
|
||||||
{
|
{
|
||||||
if !self.hooks.pre_exec_all(state, client_id, &event)? {
|
if !self.hooks.pre_exec_all(state, client_id, &event)? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
@ -455,6 +454,7 @@ where
|
|||||||
)?
|
)?
|
||||||
};
|
};
|
||||||
if let Some(item) = res.1 {
|
if let Some(item) = res.1 {
|
||||||
|
*state.imported_mut() += 1;
|
||||||
log::debug!("Added received Testcase {evt_name} as item #{item}");
|
log::debug!("Added received Testcase {evt_name} as item #{item}");
|
||||||
} else {
|
} else {
|
||||||
log::debug!("Testcase {evt_name} was discarded");
|
log::debug!("Testcase {evt_name} was discarded");
|
||||||
@ -585,13 +585,12 @@ where
|
|||||||
impl<E, EMH, S, SP, Z> EventProcessor<E, Z> for LlmpEventManager<EMH, S, SP>
|
impl<E, EMH, S, SP, Z> EventProcessor<E, Z> for LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
E: HasObservers<State = S> + Executor<Self, Z>,
|
E: HasObservers<State = S> + Executor<Self, Z>,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<State = S> + EvaluatorObservers<E::Observers> + Evaluator<E, Self>,
|
||||||
+ EvaluatorObservers<E::Observers>
|
|
||||||
+ Evaluator<E, Self>,
|
|
||||||
{
|
{
|
||||||
fn process(
|
fn process(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -638,13 +637,12 @@ where
|
|||||||
impl<E, EMH, S, SP, Z> EventManager<E, Z> for LlmpEventManager<EMH, S, SP>
|
impl<E, EMH, S, SP, Z> EventManager<E, Z> for LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<Self, Z>,
|
E: HasObservers<State = S> + Executor<Self, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata + HasLastReportTime,
|
S: State + HasExecutions + HasMetadata + HasLastReportTime + HasImported,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<State = S> + EvaluatorObservers<E::Observers> + Evaluator<E, Self>,
|
||||||
+ EvaluatorObservers<E::Observers>
|
|
||||||
+ Evaluator<E, Self>,
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ where
|
|||||||
E: Executor<EM, Z> + HasObservers<State = S>,
|
E: Executor<EM, Z> + HasObservers<State = S>,
|
||||||
EM: UsesState<State = S> + EventFirer,
|
EM: UsesState<State = S> + EventFirer,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S> + EvaluatorObservers<E::Observers>,
|
Z: ExecutionProcessor<State = S> + EvaluatorObservers<E::Observers>,
|
||||||
{
|
{
|
||||||
match event {
|
match event {
|
||||||
Event::NewTestcase {
|
Event::NewTestcase {
|
||||||
@ -350,7 +350,7 @@ where
|
|||||||
E: Executor<EM, Z> + HasObservers<State = S>,
|
E: Executor<EM, Z> + HasObservers<State = S>,
|
||||||
EM: UsesState<State = S> + EventFirer,
|
EM: UsesState<State = S> + EventFirer,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S> + EvaluatorObservers<E::Observers>,
|
Z: ExecutionProcessor<State = S> + EvaluatorObservers<E::Observers>,
|
||||||
{
|
{
|
||||||
// TODO: Get around local event copy by moving handle_in_client
|
// TODO: Get around local event copy by moving handle_in_client
|
||||||
let self_id = self.llmp.sender().id();
|
let self_id = self.llmp.sender().id();
|
||||||
|
@ -49,8 +49,8 @@ use crate::{
|
|||||||
fuzzer::{Evaluator, EvaluatorObservers, ExecutionProcessor},
|
fuzzer::{Evaluator, EvaluatorObservers, ExecutionProcessor},
|
||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
monitors::Monitor,
|
monitors::Monitor,
|
||||||
observers::{ObserversTuple, TimeObserver},
|
observers::{ObserversTuple, TimeObserver, UsesObservers},
|
||||||
state::{HasExecutions, HasLastReportTime, State, UsesState},
|
state::{HasExecutions, HasImported, HasLastReportTime, State, UsesState},
|
||||||
Error, HasMetadata,
|
Error, HasMetadata,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -205,11 +205,12 @@ where
|
|||||||
impl<E, EMH, S, SP, Z> EventProcessor<E, Z> for LlmpRestartingEventManager<EMH, S, SP>
|
impl<E, EMH, S, SP, Z> EventProcessor<E, Z> for LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<LlmpEventManager<EMH, S, SP>, Z>,
|
E: HasObservers<State = S> + Executor<LlmpEventManager<EMH, S, SP>, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<State = S>
|
||||||
+ EvaluatorObservers<E::Observers>
|
+ EvaluatorObservers<E::Observers>
|
||||||
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
||||||
{
|
{
|
||||||
@ -228,11 +229,12 @@ where
|
|||||||
impl<E, EMH, S, SP, Z> EventManager<E, Z> for LlmpRestartingEventManager<EMH, S, SP>
|
impl<E, EMH, S, SP, Z> EventManager<E, Z> for LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<LlmpEventManager<EMH, S, SP>, Z>,
|
E: HasObservers<State = S> + Executor<LlmpEventManager<EMH, S, SP>, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata + HasLastReportTime,
|
S: State + HasExecutions + HasMetadata + HasLastReportTime + HasImported,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<State = S>
|
||||||
+ EvaluatorObservers<E::Observers>
|
+ EvaluatorObservers<E::Observers>
|
||||||
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ use libafl_bolts::os::{fork, ForkResult};
|
|||||||
use libafl_bolts::{shmem::ShMemProvider, tuples::tuple_list, ClientId};
|
use libafl_bolts::{shmem::ShMemProvider, tuples::tuple_list, ClientId};
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
use libafl_bolts::{shmem::StdShMemProvider, staterestore::StateRestorer};
|
use libafl_bolts::{shmem::StdShMemProvider, staterestore::StateRestorer};
|
||||||
use serde::{de::DeserializeOwned, Deserialize};
|
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||||
use tokio::{
|
use tokio::{
|
||||||
io::{AsyncReadExt, AsyncWriteExt},
|
io::{AsyncReadExt, AsyncWriteExt},
|
||||||
sync::{broadcast, broadcast::error::RecvError, mpsc},
|
sync::{broadcast, broadcast::error::RecvError, mpsc},
|
||||||
@ -53,7 +53,8 @@ use crate::{
|
|||||||
fuzzer::{EvaluatorObservers, ExecutionProcessor},
|
fuzzer::{EvaluatorObservers, ExecutionProcessor},
|
||||||
inputs::{Input, UsesInput},
|
inputs::{Input, UsesInput},
|
||||||
monitors::Monitor,
|
monitors::Monitor,
|
||||||
state::{HasExecutions, HasLastReportTime, State, UsesState},
|
observers::UsesObservers,
|
||||||
|
state::{HasExecutions, HasImported, HasLastReportTime, State, UsesState},
|
||||||
Error, HasMetadata,
|
Error, HasMetadata,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -591,7 +592,7 @@ where
|
|||||||
impl<EMH, S> TcpEventManager<EMH, S>
|
impl<EMH, S> TcpEventManager<EMH, S>
|
||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
{
|
{
|
||||||
/// Write the client id for a client [`EventManager`] to env vars
|
/// Write the client id for a client [`EventManager`] to env vars
|
||||||
pub fn to_env(&self, env_name: &str) {
|
pub fn to_env(&self, env_name: &str) {
|
||||||
@ -610,8 +611,9 @@ where
|
|||||||
) -> Result<(), Error>
|
) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
E: Executor<Self, Z> + HasObservers<State = S>,
|
E: Executor<Self, Z> + HasObservers<State = S>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S> + EvaluatorObservers<E::Observers>,
|
Z: ExecutionProcessor<State = S> + EvaluatorObservers<E::Observers>,
|
||||||
{
|
{
|
||||||
if !self.hooks.pre_exec_all(state, client_id, &event)? {
|
if !self.hooks.pre_exec_all(state, client_id, &event)? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
@ -647,6 +649,7 @@ where
|
|||||||
)?
|
)?
|
||||||
};
|
};
|
||||||
if let Some(item) = _res.1 {
|
if let Some(item) = _res.1 {
|
||||||
|
*state.imported_mut() += 1;
|
||||||
log::info!("Added received Testcase as item #{item}");
|
log::info!("Added received Testcase as item #{item}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -748,10 +751,11 @@ where
|
|||||||
impl<E, EMH, S, Z> EventProcessor<E, Z> for TcpEventManager<EMH, S>
|
impl<E, EMH, S, Z> EventProcessor<E, Z> for TcpEventManager<EMH, S>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<Self, Z>,
|
E: HasObservers<State = S> + Executor<Self, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<E::Observers, State = S>,
|
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<State = S>,
|
||||||
{
|
{
|
||||||
fn process(
|
fn process(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -821,10 +825,11 @@ where
|
|||||||
impl<E, EMH, S, Z> EventManager<E, Z> for TcpEventManager<EMH, S>
|
impl<E, EMH, S, Z> EventManager<E, Z> for TcpEventManager<EMH, S>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<Self, Z>,
|
E: HasObservers<State = S> + Executor<Self, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata + HasLastReportTime,
|
S: State + HasExecutions + HasMetadata + HasLastReportTime + HasImported,
|
||||||
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<E::Observers, State = S>,
|
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<State = S>,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -966,10 +971,11 @@ impl<E, EMH, S, SP, Z> EventProcessor<E, Z> for TcpRestartingEventManager<EMH, S
|
|||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<TcpEventManager<EMH, S>, Z>,
|
E: HasObservers<State = S> + Executor<TcpEventManager<EMH, S>, Z>,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider + 'static,
|
||||||
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<E::Observers>, //CE: CustomEvent<I>,
|
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor, //CE: CustomEvent<I>,
|
||||||
{
|
{
|
||||||
fn process(&mut self, fuzzer: &mut Z, state: &mut S, executor: &mut E) -> Result<usize, Error> {
|
fn process(&mut self, fuzzer: &mut Z, state: &mut S, executor: &mut E) -> Result<usize, Error> {
|
||||||
self.tcp_mgr.process(fuzzer, state, executor)
|
self.tcp_mgr.process(fuzzer, state, executor)
|
||||||
@ -984,11 +990,12 @@ where
|
|||||||
impl<E, EMH, S, SP, Z> EventManager<E, Z> for TcpRestartingEventManager<EMH, S, SP>
|
impl<E, EMH, S, SP, Z> EventManager<E, Z> for TcpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
E: HasObservers<State = S> + Executor<TcpEventManager<EMH, S>, Z>,
|
E: HasObservers<State = S> + Executor<TcpEventManager<EMH, S>, Z>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata + HasLastReportTime,
|
S: State + HasExecutions + HasMetadata + HasLastReportTime + HasImported,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider + 'static,
|
||||||
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<E::Observers>, //CE: CustomEvent<I>,
|
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor, //CE: CustomEvent<I>,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1084,7 +1091,7 @@ pub fn setup_restarting_mgr_tcp<MT, S>(
|
|||||||
>
|
>
|
||||||
where
|
where
|
||||||
MT: Monitor + Clone,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
{
|
{
|
||||||
TcpRestartingMgr::builder()
|
TcpRestartingMgr::builder()
|
||||||
.shmem_provider(StdShMemProvider::new()?)
|
.shmem_provider(StdShMemProvider::new()?)
|
||||||
@ -1149,7 +1156,7 @@ impl<EMH, MT, S, SP> TcpRestartingMgr<EMH, MT, S, SP>
|
|||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S> + Copy + Clone,
|
EMH: EventManagerHooksTuple<S> + Copy + Clone,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata + HasImported,
|
||||||
MT: Monitor + Clone,
|
MT: Monitor + Clone,
|
||||||
{
|
{
|
||||||
/// Launch the restarting manager
|
/// Launch the restarting manager
|
||||||
|
@ -31,6 +31,7 @@ use crate::{
|
|||||||
events::{EventFirer, EventRestarter},
|
events::{EventFirer, EventRestarter},
|
||||||
executors::{hooks::ExecutorHook, inprocess::HasInProcessHooks, Executor, HasObservers},
|
executors::{hooks::ExecutorHook, inprocess::HasInProcessHooks, Executor, HasObservers},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
|
fuzzer::{ExecutionProcessor, HasScheduler},
|
||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions},
|
state::{HasCorpus, HasExecutions, HasSolutions},
|
||||||
Error, HasObjective,
|
Error, HasObjective,
|
||||||
@ -235,7 +236,7 @@ where
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
#[cfg_attr(miri, allow(unused_variables))]
|
#[cfg_attr(miri, allow(unused_variables))]
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -268,7 +269,7 @@ where
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: State + HasExecutions + HasSolutions + HasCorpus,
|
E::State: State + HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let ret;
|
let ret;
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
|
@ -17,9 +17,10 @@ pub mod unix_signal_handler {
|
|||||||
Executor, ExitKind, HasObservers,
|
Executor, ExitKind, HasObservers,
|
||||||
},
|
},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
fuzzer::HasObjective,
|
fuzzer::{ExecutionProcessor, HasObjective},
|
||||||
inputs::{Input, UsesInput},
|
inputs::{Input, UsesInput},
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions},
|
state::{HasCorpus, HasExecutions, HasSolutions},
|
||||||
|
HasScheduler,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(crate) type HandlerFuncPtr = unsafe fn(
|
pub(crate) type HandlerFuncPtr = unsafe fn(
|
||||||
@ -79,7 +80,7 @@ pub mod unix_signal_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + ExecutionProcessor + HasScheduler,
|
||||||
{
|
{
|
||||||
let old_hook = panic::take_hook();
|
let old_hook = panic::take_hook();
|
||||||
panic::set_hook(Box::new(move |panic_info| unsafe {
|
panic::set_hook(Box::new(move |panic_info| unsafe {
|
||||||
@ -126,7 +127,7 @@ pub mod unix_signal_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + ExecutionProcessor + HasScheduler,
|
||||||
{
|
{
|
||||||
// this stuff is for batch timeout
|
// this stuff is for batch timeout
|
||||||
if !data.executor_ptr.is_null()
|
if !data.executor_ptr.is_null()
|
||||||
@ -181,7 +182,7 @@ pub mod unix_signal_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + ExecutionProcessor + HasScheduler,
|
||||||
{
|
{
|
||||||
#[cfg(all(target_os = "android", target_arch = "aarch64"))]
|
#[cfg(all(target_os = "android", target_arch = "aarch64"))]
|
||||||
let _context = _context.map(|p| {
|
let _context = _context.map(|p| {
|
||||||
|
@ -18,7 +18,7 @@ pub mod windows_asan_handler {
|
|||||||
ExitKind, HasObservers,
|
ExitKind, HasObservers,
|
||||||
},
|
},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
fuzzer::HasObjective,
|
fuzzer::{ExecutionProcessor, HasObjective, HasScheduler},
|
||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions},
|
state::{HasCorpus, HasExecutions, HasSolutions},
|
||||||
};
|
};
|
||||||
@ -31,7 +31,7 @@ pub mod windows_asan_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let data = addr_of_mut!(GLOBAL_STATE);
|
let data = addr_of_mut!(GLOBAL_STATE);
|
||||||
(*data).set_in_handler(true);
|
(*data).set_in_handler(true);
|
||||||
@ -132,7 +132,7 @@ pub mod windows_exception_handler {
|
|||||||
Executor, ExitKind, HasObservers,
|
Executor, ExitKind, HasObservers,
|
||||||
},
|
},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
fuzzer::HasObjective,
|
fuzzer::{ExecutionProcessor, HasObjective, HasScheduler},
|
||||||
inputs::{Input, UsesInput},
|
inputs::{Input, UsesInput},
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions, State},
|
state::{HasCorpus, HasExecutions, HasSolutions, State},
|
||||||
};
|
};
|
||||||
@ -179,7 +179,7 @@ pub mod windows_exception_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let old_hook = panic::take_hook();
|
let old_hook = panic::take_hook();
|
||||||
panic::set_hook(Box::new(move |panic_info| unsafe {
|
panic::set_hook(Box::new(move |panic_info| unsafe {
|
||||||
@ -239,7 +239,7 @@ pub mod windows_exception_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: State + HasExecutions + HasSolutions + HasCorpus,
|
E::State: State + HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let data: &mut InProcessExecutorHandlerData =
|
let data: &mut InProcessExecutorHandlerData =
|
||||||
&mut *(global_state as *mut InProcessExecutorHandlerData);
|
&mut *(global_state as *mut InProcessExecutorHandlerData);
|
||||||
@ -309,7 +309,7 @@ pub mod windows_exception_handler {
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
// Have we set a timer_before?
|
// Have we set a timer_before?
|
||||||
if data.ptp_timer.is_some() {
|
if data.ptp_timer.is_some() {
|
||||||
|
@ -26,11 +26,11 @@ use crate::{
|
|||||||
Executor, HasObservers,
|
Executor, HasObservers,
|
||||||
},
|
},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
fuzzer::HasObjective,
|
fuzzer::{HasObjective, HasScheduler},
|
||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
observers::{ObserversTuple, UsesObservers},
|
observers::{ObserversTuple, UsesObservers},
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
||||||
Error,
|
Error, ExecutionProcessor,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The internal state of `GenericInProcessExecutor`.
|
/// The internal state of `GenericInProcessExecutor`.
|
||||||
@ -177,7 +177,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
Self::with_timeout_generic::<E, EM, OF, Z>(
|
Self::with_timeout_generic::<E, EM, OF, Z>(
|
||||||
user_hooks,
|
user_hooks,
|
||||||
@ -204,7 +204,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let mut me = Self::with_timeout_generic::<E, EM, OF, Z>(
|
let mut me = Self::with_timeout_generic::<E, EM, OF, Z>(
|
||||||
user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
|
user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
|
||||||
@ -234,7 +234,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let default = InProcessHooks::new::<E, EM, OF, Z>(timeout)?;
|
let default = InProcessHooks::new::<E, EM, OF, Z>(timeout)?;
|
||||||
let mut hooks = tuple_list!(default).merge(user_hooks);
|
let mut hooks = tuple_list!(default).merge(user_hooks);
|
||||||
|
@ -21,8 +21,7 @@ use libafl_bolts::tuples::{tuple_list, RefIndexable};
|
|||||||
#[cfg(any(unix, feature = "std"))]
|
#[cfg(any(unix, feature = "std"))]
|
||||||
use crate::executors::hooks::inprocess::GLOBAL_STATE;
|
use crate::executors::hooks::inprocess::GLOBAL_STATE;
|
||||||
use crate::{
|
use crate::{
|
||||||
corpus::{Corpus, Testcase},
|
events::{EventFirer, EventRestarter},
|
||||||
events::{Event, EventFirer, EventRestarter},
|
|
||||||
executors::{
|
executors::{
|
||||||
hooks::{inprocess::InProcessHooks, ExecutorHooksTuple},
|
hooks::{inprocess::InProcessHooks, ExecutorHooksTuple},
|
||||||
inprocess::inner::GenericInProcessExecutorInner,
|
inprocess::inner::GenericInProcessExecutorInner,
|
||||||
@ -32,8 +31,9 @@ use crate::{
|
|||||||
fuzzer::HasObjective,
|
fuzzer::HasObjective,
|
||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
observers::{ObserversTuple, UsesObservers},
|
observers::{ObserversTuple, UsesObservers},
|
||||||
state::{HasCorpus, HasCurrentTestcase, HasExecutions, HasSolutions, State, UsesState},
|
schedulers::Scheduler,
|
||||||
Error, HasMetadata,
|
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
||||||
|
Error, ExecutionProcessor, HasScheduler,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The inner structure of `InProcessExecutor`.
|
/// The inner structure of `InProcessExecutor`.
|
||||||
@ -180,7 +180,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
Self::with_timeout_generic(
|
Self::with_timeout_generic(
|
||||||
tuple_list!(),
|
tuple_list!(),
|
||||||
@ -208,7 +208,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
||||||
tuple_list!(),
|
tuple_list!(),
|
||||||
@ -243,11 +243,11 @@ where
|
|||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
) -> Result<Self, Error>
|
) -> Result<Self, Error>
|
||||||
where
|
where
|
||||||
Self: Executor<EM, Z, State = S> + HasObservers,
|
Self: Executor<EM, Z, State = S>,
|
||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
||||||
tuple_list!(),
|
tuple_list!(),
|
||||||
@ -284,11 +284,11 @@ where
|
|||||||
event_mgr: &mut EM,
|
event_mgr: &mut EM,
|
||||||
) -> Result<Self, Error>
|
) -> Result<Self, Error>
|
||||||
where
|
where
|
||||||
Self: Executor<EM, Z, State = S> + HasObservers,
|
Self: Executor<EM, Z, State = S>,
|
||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
Self::with_timeout_generic(
|
Self::with_timeout_generic(
|
||||||
user_hooks,
|
user_hooks,
|
||||||
@ -313,11 +313,11 @@ where
|
|||||||
exec_tmout: Duration,
|
exec_tmout: Duration,
|
||||||
) -> Result<Self, Error>
|
) -> Result<Self, Error>
|
||||||
where
|
where
|
||||||
Self: Executor<EM, Z, State = S> + HasObservers,
|
Self: Executor<EM, Z, State = S>,
|
||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
||||||
user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
|
user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
|
||||||
@ -348,11 +348,11 @@ where
|
|||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
) -> Result<Self, Error>
|
) -> Result<Self, Error>
|
||||||
where
|
where
|
||||||
Self: Executor<EM, Z, State = S> + HasObservers,
|
Self: Executor<EM, Z, State = S>,
|
||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
||||||
user_hooks, observers, fuzzer, state, event_mgr, timeout,
|
user_hooks, observers, fuzzer, state, event_mgr, timeout,
|
||||||
@ -431,58 +431,47 @@ pub fn run_observers_and_save_state<E, EM, OF, Z>(
|
|||||||
state: &mut E::State,
|
state: &mut E::State,
|
||||||
input: &<E::State as UsesInput>::Input,
|
input: &<E::State as UsesInput>::Input,
|
||||||
fuzzer: &mut Z,
|
fuzzer: &mut Z,
|
||||||
event_mgr: &mut EM,
|
manager: &mut EM,
|
||||||
exitkind: ExitKind,
|
exit_kind: ExitKind,
|
||||||
) where
|
) where
|
||||||
E: HasObservers,
|
E: HasObservers,
|
||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State>
|
||||||
|
+ HasScheduler<State = E::State>
|
||||||
|
+ ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let mut observers = executor.observers_mut();
|
let observers = executor.observers_mut();
|
||||||
|
let scheduler = fuzzer.scheduler_mut();
|
||||||
|
|
||||||
observers
|
if scheduler.on_evaluation(state, input, &*observers).is_err() {
|
||||||
.post_exec_all(state, input, &exitkind)
|
log::error!("Failed to call on_evaluation");
|
||||||
.expect("Observers post_exec_all failed");
|
return;
|
||||||
|
|
||||||
let interesting = fuzzer
|
|
||||||
.objective_mut()
|
|
||||||
.is_interesting(state, event_mgr, input, &*observers, &exitkind)
|
|
||||||
.expect("In run_observers_and_save_state objective failure.");
|
|
||||||
|
|
||||||
if interesting {
|
|
||||||
let executions = *state.executions();
|
|
||||||
let mut new_testcase = Testcase::with_executions(input.clone(), executions);
|
|
||||||
new_testcase.add_metadata(exitkind);
|
|
||||||
new_testcase.set_parent_id_optional(*state.corpus().current());
|
|
||||||
|
|
||||||
if let Ok(mut tc) = state.current_testcase_mut() {
|
|
||||||
tc.found_objective();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fuzzer
|
let res = fuzzer.check_results(state, manager, input, &*observers, &exit_kind);
|
||||||
.objective_mut()
|
if let Ok(exec_res) = res {
|
||||||
.append_metadata(state, event_mgr, &*observers, &mut new_testcase)
|
if fuzzer
|
||||||
.expect("Failed adding metadata");
|
.process_execution(state, manager, input, &exec_res, &*observers)
|
||||||
state
|
.is_err()
|
||||||
.solutions_mut()
|
{
|
||||||
.add(new_testcase)
|
log::error!("Failed to call process_execution");
|
||||||
.expect("In run_observers_and_save_state solutions failure.");
|
return;
|
||||||
event_mgr
|
|
||||||
.fire(
|
|
||||||
state,
|
|
||||||
Event::Objective {
|
|
||||||
objective_size: state.solutions().count(),
|
|
||||||
executions,
|
|
||||||
time: libafl_bolts::current_time(),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.expect("Could not save state in run_observers_and_save_state");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if fuzzer
|
||||||
|
.dispatch_event(state, manager, input.clone(), &exec_res, None, &exit_kind)
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
|
log::error!("Failed to dispatch_event");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log::error!("Faild to check execution result");
|
||||||
|
}
|
||||||
// Serialize the state and wait safely for the broker to read pending messages
|
// Serialize the state and wait safely for the broker to read pending messages
|
||||||
event_mgr.on_restart(state).unwrap();
|
manager.on_restart(state).unwrap();
|
||||||
|
|
||||||
log::info!("Bye!");
|
log::info!("Bye!");
|
||||||
}
|
}
|
||||||
@ -499,7 +488,9 @@ where
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasExecutions + HasSolutions + HasCorpus,
|
E::State: HasExecutions + HasSolutions + HasCorpus,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State>
|
||||||
|
+ HasScheduler<State = E::State>
|
||||||
|
+ ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let data = addr_of_mut!(GLOBAL_STATE);
|
let data = addr_of_mut!(GLOBAL_STATE);
|
||||||
let in_handler = (*data).set_in_handler(true);
|
let in_handler = (*data).set_in_handler(true);
|
||||||
@ -556,7 +547,7 @@ mod tests {
|
|||||||
let mut mgr = NopEventManager::new();
|
let mut mgr = NopEventManager::new();
|
||||||
let mut state =
|
let mut state =
|
||||||
StdState::new(rand, corpus, solutions, &mut feedback, &mut objective).unwrap();
|
StdState::new(rand, corpus, solutions, &mut feedback, &mut objective).unwrap();
|
||||||
let mut fuzzer = StdFuzzer::<_, _, _, ()>::new(sche, feedback, objective);
|
let mut fuzzer = StdFuzzer::<_, _, _>::new(sche, feedback, objective);
|
||||||
|
|
||||||
let mut in_process_executor = InProcessExecutor::new(
|
let mut in_process_executor = InProcessExecutor::new(
|
||||||
&mut harness,
|
&mut harness,
|
||||||
|
@ -18,7 +18,7 @@ use crate::{
|
|||||||
Executor, ExitKind, HasObservers,
|
Executor, ExitKind, HasObservers,
|
||||||
},
|
},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
fuzzer::HasObjective,
|
fuzzer::{ExecutionProcessor, HasObjective, HasScheduler},
|
||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
observers::{ObserversTuple, UsesObservers},
|
observers::{ObserversTuple, UsesObservers},
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
||||||
@ -172,7 +172,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
Self::with_timeout_generic(
|
Self::with_timeout_generic(
|
||||||
tuple_list!(),
|
tuple_list!(),
|
||||||
@ -202,7 +202,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
||||||
tuple_list!(),
|
tuple_list!(),
|
||||||
@ -243,7 +243,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
||||||
tuple_list!(),
|
tuple_list!(),
|
||||||
@ -304,7 +304,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
Self::with_timeout_generic(
|
Self::with_timeout_generic(
|
||||||
user_hooks,
|
user_hooks,
|
||||||
@ -335,7 +335,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::batched_timeout_generic::<Self, EM, OF, Z>(
|
||||||
user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
|
user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
|
||||||
@ -372,7 +372,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter,
|
EM: EventFirer<State = S> + EventRestarter,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State,
|
S: State,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
let inner = GenericInProcessExecutorInner::with_timeout_generic::<Self, EM, OF, Z>(
|
||||||
user_hooks, observers, fuzzer, state, event_mgr, timeout,
|
user_hooks, observers, fuzzer, state, event_mgr, timeout,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! The `Fuzzer` is the main struct for a fuzz campaign.
|
//! The `Fuzzer` is the main struct for a fuzz campaign.
|
||||||
|
|
||||||
use alloc::string::ToString;
|
use alloc::{string::ToString, vec::Vec};
|
||||||
use core::{fmt::Debug, marker::PhantomData, time::Duration};
|
use core::{fmt::Debug, time::Duration};
|
||||||
|
|
||||||
use libafl_bolts::current_time;
|
use libafl_bolts::current_time;
|
||||||
use serde::{de::DeserializeOwned, Serialize};
|
use serde::{de::DeserializeOwned, Serialize};
|
||||||
@ -69,9 +69,9 @@ pub trait HasObjective: UsesState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Evaluates if an input is interesting using the feedback
|
/// Evaluates if an input is interesting using the feedback
|
||||||
pub trait ExecutionProcessor<OT>: UsesState {
|
pub trait ExecutionProcessor: UsesState {
|
||||||
/// Check the outcome of the execution, find if it is worth for corpus or objectives
|
/// Check the outcome of the execution, find if it is worth for corpus or objectives
|
||||||
fn check_results<EM>(
|
fn check_results<EM, OT>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state: &mut Self::State,
|
state: &mut Self::State,
|
||||||
manager: &mut EM,
|
manager: &mut EM,
|
||||||
@ -80,11 +80,25 @@ pub trait ExecutionProcessor<OT>: UsesState {
|
|||||||
exit_kind: &ExitKind,
|
exit_kind: &ExitKind,
|
||||||
) -> Result<ExecuteInputResult, Error>
|
) -> Result<ExecuteInputResult, Error>
|
||||||
where
|
where
|
||||||
EM: EventFirer<State = Self::State>;
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State>;
|
||||||
|
|
||||||
/// Process `ExecuteInputResult`. Add to corpus, solution or ignore
|
/// Process `ExecuteInputResult`. Add to corpus, solution or ignore
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn process_execution<EM>(
|
fn process_execution<EM, OT>(
|
||||||
|
&mut self,
|
||||||
|
state: &mut Self::State,
|
||||||
|
manager: &mut EM,
|
||||||
|
input: &<Self::State as UsesInput>::Input,
|
||||||
|
exec_res: &ExecuteInputResult,
|
||||||
|
observers: &OT,
|
||||||
|
) -> Result<Option<CorpusId>, Error>
|
||||||
|
where
|
||||||
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State>;
|
||||||
|
|
||||||
|
/// serialize and send event via manager
|
||||||
|
fn serialize_and_dispatch<EM, OT>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state: &mut Self::State,
|
state: &mut Self::State,
|
||||||
manager: &mut EM,
|
manager: &mut EM,
|
||||||
@ -92,13 +106,26 @@ pub trait ExecutionProcessor<OT>: UsesState {
|
|||||||
exec_res: &ExecuteInputResult,
|
exec_res: &ExecuteInputResult,
|
||||||
observers: &OT,
|
observers: &OT,
|
||||||
exit_kind: &ExitKind,
|
exit_kind: &ExitKind,
|
||||||
send_events: bool,
|
) -> Result<(), Error>
|
||||||
) -> Result<Option<CorpusId>, Error>
|
where
|
||||||
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State> + Serialize;
|
||||||
|
|
||||||
|
/// send event via manager
|
||||||
|
fn dispatch_event<EM>(
|
||||||
|
&mut self,
|
||||||
|
state: &mut Self::State,
|
||||||
|
manager: &mut EM,
|
||||||
|
input: <Self::State as UsesInput>::Input,
|
||||||
|
exec_res: &ExecuteInputResult,
|
||||||
|
obs_buf: Option<Vec<u8>>,
|
||||||
|
exit_kind: &ExitKind,
|
||||||
|
) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
EM: EventFirer<State = Self::State>;
|
EM: EventFirer<State = Self::State>;
|
||||||
|
|
||||||
/// Evaluate if a set of observation channels has an interesting state
|
/// Evaluate if a set of observation channels has an interesting state
|
||||||
fn evaluate_execution<EM>(
|
fn evaluate_execution<EM, OT>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state: &mut Self::State,
|
state: &mut Self::State,
|
||||||
manager: &mut EM,
|
manager: &mut EM,
|
||||||
@ -108,7 +135,8 @@ pub trait ExecutionProcessor<OT>: UsesState {
|
|||||||
send_events: bool,
|
send_events: bool,
|
||||||
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
|
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
|
||||||
where
|
where
|
||||||
EM: EventFirer<State = Self::State>;
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State> + Serialize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Evaluates an input modifying the state of the fuzzer
|
/// Evaluates an input modifying the state of the fuzzer
|
||||||
@ -285,14 +313,13 @@ pub enum ExecuteInputResult {
|
|||||||
|
|
||||||
/// Your default fuzzer instance, for everyday use.
|
/// Your default fuzzer instance, for everyday use.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StdFuzzer<CS, F, OF, OT> {
|
pub struct StdFuzzer<CS, F, OF> {
|
||||||
scheduler: CS,
|
scheduler: CS,
|
||||||
feedback: F,
|
feedback: F,
|
||||||
objective: OF,
|
objective: OF,
|
||||||
phantom: PhantomData<OT>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> UsesState for StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF> UsesState for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
CS::State: HasCorpus,
|
CS::State: HasCorpus,
|
||||||
@ -300,7 +327,7 @@ where
|
|||||||
type State = CS::State;
|
type State = CS::State;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> HasScheduler for StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF> HasScheduler for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
CS::State: HasCorpus,
|
CS::State: HasCorpus,
|
||||||
@ -316,7 +343,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> HasFeedback for StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF> HasFeedback for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
F: Feedback<Self::State>,
|
F: Feedback<Self::State>,
|
||||||
@ -334,7 +361,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> HasObjective for StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF> HasObjective for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
F: Feedback<Self::State>,
|
F: Feedback<Self::State>,
|
||||||
@ -352,12 +379,11 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> ExecutionProcessor<OT> for StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF> ExecutionProcessor for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
F: Feedback<Self::State>,
|
F: Feedback<Self::State>,
|
||||||
OF: Feedback<Self::State>,
|
OF: Feedback<Self::State>,
|
||||||
OT: ObserversTuple<Self::State> + Serialize + DeserializeOwned,
|
|
||||||
CS::State: HasCorpus
|
CS::State: HasCorpus
|
||||||
+ HasSolutions
|
+ HasSolutions
|
||||||
+ HasExecutions
|
+ HasExecutions
|
||||||
@ -366,7 +392,7 @@ where
|
|||||||
+ HasCurrentTestcase<<Self::State as UsesInput>::Input>
|
+ HasCurrentTestcase<<Self::State as UsesInput>::Input>
|
||||||
+ HasCurrentCorpusId,
|
+ HasCurrentCorpusId,
|
||||||
{
|
{
|
||||||
fn check_results<EM>(
|
fn check_results<EM, OT>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state: &mut Self::State,
|
state: &mut Self::State,
|
||||||
manager: &mut EM,
|
manager: &mut EM,
|
||||||
@ -376,6 +402,7 @@ where
|
|||||||
) -> Result<ExecuteInputResult, Error>
|
) -> Result<ExecuteInputResult, Error>
|
||||||
where
|
where
|
||||||
EM: EventFirer<State = Self::State>,
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State>,
|
||||||
{
|
{
|
||||||
let mut res = ExecuteInputResult::None;
|
let mut res = ExecuteInputResult::None;
|
||||||
|
|
||||||
@ -409,7 +436,7 @@ where
|
|||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn evaluate_execution<EM>(
|
fn evaluate_execution<EM, OT>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state: &mut Self::State,
|
state: &mut Self::State,
|
||||||
manager: &mut EM,
|
manager: &mut EM,
|
||||||
@ -420,22 +447,17 @@ where
|
|||||||
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
|
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
|
||||||
where
|
where
|
||||||
EM: EventFirer<State = Self::State>,
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State> + Serialize,
|
||||||
{
|
{
|
||||||
let exec_res = self.check_results(state, manager, &input, observers, exit_kind)?;
|
let exec_res = self.check_results(state, manager, &input, observers, exit_kind)?;
|
||||||
let corpus_id = self.process_execution(
|
let corpus_id = self.process_execution(state, manager, &input, &exec_res, observers)?;
|
||||||
state,
|
if send_events {
|
||||||
manager,
|
self.serialize_and_dispatch(state, manager, input, &exec_res, observers, exit_kind)?;
|
||||||
input,
|
}
|
||||||
&exec_res,
|
|
||||||
observers,
|
|
||||||
exit_kind,
|
|
||||||
send_events,
|
|
||||||
)?;
|
|
||||||
Ok((exec_res, corpus_id))
|
Ok((exec_res, corpus_id))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Evaluate if a set of observation channels has an interesting state
|
fn serialize_and_dispatch<EM, OT>(
|
||||||
fn process_execution<EM>(
|
|
||||||
&mut self,
|
&mut self,
|
||||||
state: &mut Self::State,
|
state: &mut Self::State,
|
||||||
manager: &mut EM,
|
manager: &mut EM,
|
||||||
@ -443,38 +465,48 @@ where
|
|||||||
exec_res: &ExecuteInputResult,
|
exec_res: &ExecuteInputResult,
|
||||||
observers: &OT,
|
observers: &OT,
|
||||||
exit_kind: &ExitKind,
|
exit_kind: &ExitKind,
|
||||||
send_events: bool,
|
) -> Result<(), Error>
|
||||||
) -> Result<Option<CorpusId>, Error>
|
|
||||||
where
|
where
|
||||||
EM: EventFirer<State = Self::State>,
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State> + Serialize,
|
||||||
{
|
{
|
||||||
match exec_res {
|
// Now send off the event
|
||||||
ExecuteInputResult::None => {
|
let observers_buf = match exec_res {
|
||||||
self.feedback_mut().discard_metadata(state, &input)?;
|
|
||||||
self.objective_mut().discard_metadata(state, &input)?;
|
|
||||||
Ok(None)
|
|
||||||
}
|
|
||||||
ExecuteInputResult::Corpus => {
|
ExecuteInputResult::Corpus => {
|
||||||
// Not a solution
|
if manager.should_send() {
|
||||||
self.objective_mut().discard_metadata(state, &input)?;
|
|
||||||
|
|
||||||
// Add the input to the main corpus
|
|
||||||
let mut testcase = Testcase::with_executions(input.clone(), *state.executions());
|
|
||||||
#[cfg(feature = "track_hit_feedbacks")]
|
|
||||||
self.feedback_mut()
|
|
||||||
.append_hit_feedbacks(testcase.hit_feedbacks_mut())?;
|
|
||||||
self.feedback_mut()
|
|
||||||
.append_metadata(state, manager, observers, &mut testcase)?;
|
|
||||||
let id = state.corpus_mut().add(testcase)?;
|
|
||||||
self.scheduler_mut().on_add(state, id)?;
|
|
||||||
|
|
||||||
if send_events && manager.should_send() {
|
|
||||||
// TODO set None for fast targets
|
// TODO set None for fast targets
|
||||||
let observers_buf = if manager.configuration() == EventConfig::AlwaysUnique {
|
if manager.configuration() == EventConfig::AlwaysUnique {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
manager.serialize_observers::<OT>(observers)?
|
manager.serialize_observers::<OT>(observers)?
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.dispatch_event(state, manager, input, exec_res, observers_buf, exit_kind)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn dispatch_event<EM>(
|
||||||
|
&mut self,
|
||||||
|
state: &mut Self::State,
|
||||||
|
manager: &mut EM,
|
||||||
|
input: <Self::State as UsesInput>::Input,
|
||||||
|
exec_res: &ExecuteInputResult,
|
||||||
|
observers_buf: Option<Vec<u8>>,
|
||||||
|
exit_kind: &ExitKind,
|
||||||
|
) -> Result<(), Error>
|
||||||
|
where
|
||||||
|
EM: EventFirer<State = Self::State>,
|
||||||
|
{
|
||||||
|
// Now send off the event
|
||||||
|
match exec_res {
|
||||||
|
ExecuteInputResult::Corpus => {
|
||||||
|
if manager.should_send() {
|
||||||
manager.fire(
|
manager.fire(
|
||||||
state,
|
state,
|
||||||
Event::NewTestcase {
|
Event::NewTestcase {
|
||||||
@ -490,19 +522,68 @@ where
|
|||||||
node_id: None,
|
node_id: None,
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
} else {
|
|
||||||
// This testcase is from the other fuzzers.
|
|
||||||
*state.imported_mut() += 1;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
ExecuteInputResult::Solution => {
|
||||||
|
if manager.should_send() {
|
||||||
|
let executions = *state.executions();
|
||||||
|
manager.fire(
|
||||||
|
state,
|
||||||
|
Event::Objective {
|
||||||
|
objective_size: state.solutions().count(),
|
||||||
|
executions,
|
||||||
|
time: current_time(),
|
||||||
|
},
|
||||||
|
)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ExecuteInputResult::None => (),
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Evaluate if a set of observation channels has an interesting state
|
||||||
|
fn process_execution<EM, OT>(
|
||||||
|
&mut self,
|
||||||
|
state: &mut Self::State,
|
||||||
|
manager: &mut EM,
|
||||||
|
input: &<Self::State as UsesInput>::Input,
|
||||||
|
exec_res: &ExecuteInputResult,
|
||||||
|
observers: &OT,
|
||||||
|
) -> Result<Option<CorpusId>, Error>
|
||||||
|
where
|
||||||
|
EM: EventFirer<State = Self::State>,
|
||||||
|
OT: ObserversTuple<Self::State>,
|
||||||
|
{
|
||||||
|
match exec_res {
|
||||||
|
ExecuteInputResult::None => {
|
||||||
|
self.feedback_mut().discard_metadata(state, input)?;
|
||||||
|
self.objective_mut().discard_metadata(state, input)?;
|
||||||
|
Ok(None)
|
||||||
|
}
|
||||||
|
ExecuteInputResult::Corpus => {
|
||||||
|
// Not a solution
|
||||||
|
self.objective_mut().discard_metadata(state, input)?;
|
||||||
|
|
||||||
|
// Add the input to the main corpus
|
||||||
|
let mut testcase = Testcase::with_executions(input.clone(), *state.executions());
|
||||||
|
#[cfg(feature = "track_hit_feedbacks")]
|
||||||
|
self.feedback_mut()
|
||||||
|
.append_hit_feedbacks(testcase.hit_feedbacks_mut())?;
|
||||||
|
self.feedback_mut()
|
||||||
|
.append_metadata(state, manager, observers, &mut testcase)?;
|
||||||
|
let id = state.corpus_mut().add(testcase)?;
|
||||||
|
self.scheduler_mut().on_add(state, id)?;
|
||||||
|
|
||||||
Ok(Some(id))
|
Ok(Some(id))
|
||||||
}
|
}
|
||||||
ExecuteInputResult::Solution => {
|
ExecuteInputResult::Solution => {
|
||||||
// Not interesting
|
// Not interesting
|
||||||
self.feedback_mut().discard_metadata(state, &input)?;
|
self.feedback_mut().discard_metadata(state, input)?;
|
||||||
|
|
||||||
let executions = *state.executions();
|
let executions = *state.executions();
|
||||||
// The input is a solution, add it to the respective corpus
|
// The input is a solution, add it to the respective corpus
|
||||||
let mut testcase = Testcase::with_executions(input, executions);
|
let mut testcase = Testcase::with_executions(input.clone(), executions);
|
||||||
testcase.set_parent_id_optional(*state.corpus().current());
|
testcase.set_parent_id_optional(*state.corpus().current());
|
||||||
if let Ok(mut tc) = state.current_testcase_mut() {
|
if let Ok(mut tc) = state.current_testcase_mut() {
|
||||||
tc.found_objective();
|
tc.found_objective();
|
||||||
@ -514,24 +595,13 @@ where
|
|||||||
.append_metadata(state, manager, observers, &mut testcase)?;
|
.append_metadata(state, manager, observers, &mut testcase)?;
|
||||||
state.solutions_mut().add(testcase)?;
|
state.solutions_mut().add(testcase)?;
|
||||||
|
|
||||||
if send_events {
|
|
||||||
manager.fire(
|
|
||||||
state,
|
|
||||||
Event::Objective {
|
|
||||||
objective_size: state.solutions().count(),
|
|
||||||
executions,
|
|
||||||
time: current_time(),
|
|
||||||
},
|
|
||||||
)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> EvaluatorObservers<OT> for StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF, OT> EvaluatorObservers<OT> for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
OT: ObserversTuple<Self::State> + Serialize + DeserializeOwned,
|
OT: ObserversTuple<Self::State> + Serialize + DeserializeOwned,
|
||||||
@ -562,7 +632,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, E, EM, F, OF, OT> Evaluator<E, EM> for StdFuzzer<CS, F, OF, OT>
|
impl<CS, E, EM, F, OF, OT> Evaluator<E, EM> for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
E: HasObservers<State = Self::State, Observers = OT> + Executor<EM, Self>,
|
E: HasObservers<State = Self::State, Observers = OT> + Executor<EM, Self>,
|
||||||
@ -695,7 +765,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, E, EM, F, OF, OT, ST> Fuzzer<E, EM, ST> for StdFuzzer<CS, F, OF, OT>
|
impl<CS, E, EM, F, OF, ST> Fuzzer<E, EM, ST> for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
E: UsesState<State = Self::State>,
|
E: UsesState<State = Self::State>,
|
||||||
@ -768,7 +838,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, F, OF, OT> StdFuzzer<CS, F, OF, OT>
|
impl<CS, F, OF> StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
F: Feedback<<Self as UsesState>::State>,
|
F: Feedback<<Self as UsesState>::State>,
|
||||||
@ -781,7 +851,6 @@ where
|
|||||||
scheduler,
|
scheduler,
|
||||||
feedback,
|
feedback,
|
||||||
objective,
|
objective,
|
||||||
phantom: PhantomData,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -794,9 +863,8 @@ where
|
|||||||
input: &<<Self as UsesState>::State as UsesInput>::Input,
|
input: &<<Self as UsesState>::State as UsesInput>::Input,
|
||||||
) -> Result<ExitKind, Error>
|
) -> Result<ExitKind, Error>
|
||||||
where
|
where
|
||||||
E: Executor<EM, Self> + HasObservers<Observers = OT, State = <Self as UsesState>::State>,
|
E: Executor<EM, Self> + HasObservers<State = <Self as UsesState>::State>,
|
||||||
EM: UsesState<State = <Self as UsesState>::State>,
|
EM: UsesState<State = <Self as UsesState>::State>,
|
||||||
OT: ObserversTuple<<Self as UsesState>::State>,
|
|
||||||
{
|
{
|
||||||
start_timer!(state);
|
start_timer!(state);
|
||||||
executor.observers_mut().pre_exec_all(state, input)?;
|
executor.observers_mut().pre_exec_all(state, input)?;
|
||||||
@ -832,7 +900,7 @@ where
|
|||||||
) -> Result<ExitKind, Error>;
|
) -> Result<ExitKind, Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<CS, E, EM, F, OF, OT> ExecutesInput<E, EM> for StdFuzzer<CS, F, OF, OT>
|
impl<CS, E, EM, F, OF> ExecutesInput<E, EM> for StdFuzzer<CS, F, OF>
|
||||||
where
|
where
|
||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
F: Feedback<<Self as UsesState>::State>,
|
F: Feedback<<Self as UsesState>::State>,
|
||||||
|
@ -448,7 +448,7 @@ where
|
|||||||
OT: ObserversTuple<Self::State>,
|
OT: ObserversTuple<Self::State>,
|
||||||
PS: PushStage<CS, EM, OT, Z>,
|
PS: PushStage<CS, EM, OT, Z>,
|
||||||
Z: ExecutesInput<E, EM, State = Self::State>
|
Z: ExecutesInput<E, EM, State = Self::State>
|
||||||
+ ExecutionProcessor<OT, State = Self::State>
|
+ ExecutionProcessor
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ where
|
|||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State>,
|
||||||
CS::State: HasRand + HasCorpus,
|
CS::State: HasRand + HasCorpus,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ where
|
|||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State>,
|
||||||
CS::State: HasRand + HasCorpus,
|
CS::State: HasRand + HasCorpus,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -84,7 +84,7 @@ where
|
|||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State>,
|
||||||
CS::State: HasRand + HasCorpus,
|
CS::State: HasRand + HasCorpus,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -114,7 +114,7 @@ where
|
|||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State>,
|
||||||
CS::State: HasRand + HasCorpus,
|
CS::State: HasRand + HasCorpus,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -183,7 +183,7 @@ where
|
|||||||
CS::State: HasRand + HasExecutions + HasMetadata + HasCorpus + HasLastReportTime,
|
CS::State: HasRand + HasExecutions + HasMetadata + HasCorpus + HasLastReportTime,
|
||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId + ProgressReporter,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId + ProgressReporter,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State>,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@ use core::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use libafl_bolts::rands::Rand;
|
use libafl_bolts::rands::Rand;
|
||||||
|
use serde::Serialize;
|
||||||
|
|
||||||
use super::{PushStage, PushStageHelper, PushStageSharedState};
|
use super::{PushStage, PushStageHelper, PushStageSharedState};
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -43,9 +44,9 @@ where
|
|||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
M: Mutator<CS::Input, CS::State>,
|
M: Mutator<CS::Input, CS::State>,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State> + Serialize,
|
||||||
CS::State: HasRand + HasCorpus + Clone + Debug,
|
CS::State: HasRand + HasCorpus + Clone + Debug,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -63,9 +64,9 @@ where
|
|||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
M: Mutator<CS::Input, CS::State>,
|
M: Mutator<CS::Input, CS::State>,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State> + Serialize,
|
||||||
CS::State: HasCorpus + HasRand + Clone + Debug,
|
CS::State: HasCorpus + HasRand + Clone + Debug,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -86,10 +87,10 @@ where
|
|||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId + ProgressReporter,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId + ProgressReporter,
|
||||||
M: Mutator<CS::Input, CS::State>,
|
M: Mutator<CS::Input, CS::State>,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State> + Serialize,
|
||||||
CS::State:
|
CS::State:
|
||||||
HasCorpus + HasRand + HasExecutions + HasLastReportTime + HasMetadata + Clone + Debug,
|
HasCorpus + HasRand + HasExecutions + HasLastReportTime + HasMetadata + Clone + Debug,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -197,10 +198,10 @@ where
|
|||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
EM: EventFirer + EventRestarter + HasEventManagerId + ProgressReporter<State = CS::State>,
|
EM: EventFirer + EventRestarter + HasEventManagerId + ProgressReporter<State = CS::State>,
|
||||||
M: Mutator<CS::Input, CS::State>,
|
M: Mutator<CS::Input, CS::State>,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State> + Serialize,
|
||||||
CS::State:
|
CS::State:
|
||||||
HasCorpus + HasRand + HasExecutions + HasMetadata + HasLastReportTime + Clone + Debug,
|
HasCorpus + HasRand + HasExecutions + HasMetadata + HasLastReportTime + Clone + Debug,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
@ -216,9 +217,9 @@ where
|
|||||||
CS: Scheduler,
|
CS: Scheduler,
|
||||||
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
EM: EventFirer<State = CS::State> + EventRestarter + HasEventManagerId,
|
||||||
M: Mutator<CS::Input, CS::State>,
|
M: Mutator<CS::Input, CS::State>,
|
||||||
OT: ObserversTuple<CS::State>,
|
OT: ObserversTuple<CS::State> + Serialize,
|
||||||
CS::State: HasCorpus + HasRand + Clone + Debug,
|
CS::State: HasCorpus + HasRand + Clone + Debug,
|
||||||
Z: ExecutionProcessor<OT, State = CS::State>
|
Z: ExecutionProcessor<State = CS::State>
|
||||||
+ EvaluatorObservers<OT>
|
+ EvaluatorObservers<OT>
|
||||||
+ HasScheduler<Scheduler = CS>,
|
+ HasScheduler<Scheduler = CS>,
|
||||||
{
|
{
|
||||||
|
@ -302,7 +302,7 @@ where
|
|||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
E: HasObservers<State = S> + Executor<EM, Z>,
|
E: HasObservers<State = S> + Executor<EM, Z>,
|
||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<E::Observers, State = S>,
|
Z: EvaluatorObservers<E::Observers, State = S> + ExecutionProcessor<State = S>,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
DI: Input,
|
DI: Input,
|
||||||
|
@ -11,6 +11,7 @@ use libafl_bolts::{
|
|||||||
tuples::{Handle, Handled, MatchNameRef},
|
tuples::{Handle, Handled, MatchNameRef},
|
||||||
HasLen, Named,
|
HasLen, Named,
|
||||||
};
|
};
|
||||||
|
use serde::Serialize;
|
||||||
|
|
||||||
#[cfg(feature = "track_hit_feedbacks")]
|
#[cfg(feature = "track_hit_feedbacks")]
|
||||||
use crate::feedbacks::premature_last_result_err;
|
use crate::feedbacks::premature_last_result_err;
|
||||||
@ -22,7 +23,7 @@ use crate::{
|
|||||||
inputs::UsesInput,
|
inputs::UsesInput,
|
||||||
mark_feature_time,
|
mark_feature_time,
|
||||||
mutators::{MutationResult, Mutator},
|
mutators::{MutationResult, Mutator},
|
||||||
observers::{MapObserver, ObserversTuple},
|
observers::{MapObserver, ObserversTuple, UsesObservers},
|
||||||
schedulers::RemovableScheduler,
|
schedulers::RemovableScheduler,
|
||||||
stages::{
|
stages::{
|
||||||
mutational::{MutatedTransform, MutatedTransformPost},
|
mutational::{MutatedTransform, MutatedTransformPost},
|
||||||
@ -44,6 +45,7 @@ pub trait TMinMutationalStage<E, EM, F, IP, M, Z>:
|
|||||||
Stage<E, EM, Z> + FeedbackFactory<F, E::Observers>
|
Stage<E, EM, Z> + FeedbackFactory<F, E::Observers>
|
||||||
where
|
where
|
||||||
E: UsesState<State = Self::State> + HasObservers,
|
E: UsesState<State = Self::State> + HasObservers,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
EM: UsesState<State = Self::State> + EventFirer,
|
EM: UsesState<State = Self::State> + EventFirer,
|
||||||
F: Feedback<Self::State>,
|
F: Feedback<Self::State>,
|
||||||
Self::State: HasMaxSize + HasCorpus + HasSolutions + HasExecutions,
|
Self::State: HasMaxSize + HasCorpus + HasSolutions + HasExecutions,
|
||||||
@ -54,7 +56,7 @@ where
|
|||||||
+ HasScheduler
|
+ HasScheduler
|
||||||
+ HasFeedback
|
+ HasFeedback
|
||||||
+ ExecutesInput<E, EM>
|
+ ExecutesInput<E, EM>
|
||||||
+ ExecutionProcessor<E::Observers>,
|
+ ExecutionProcessor,
|
||||||
Z::Scheduler: RemovableScheduler<State = Self::State>,
|
Z::Scheduler: RemovableScheduler<State = Self::State>,
|
||||||
{
|
{
|
||||||
/// The mutator registered for this stage
|
/// The mutator registered for this stage
|
||||||
@ -236,9 +238,10 @@ where
|
|||||||
|
|
||||||
impl<E, EM, F, FF, IP, M, Z> Stage<E, EM, Z> for StdTMinMutationalStage<E, EM, F, FF, IP, M, Z>
|
impl<E, EM, F, FF, IP, M, Z> Stage<E, EM, Z> for StdTMinMutationalStage<E, EM, F, FF, IP, M, Z>
|
||||||
where
|
where
|
||||||
Z: HasScheduler + ExecutionProcessor<E::Observers> + ExecutesInput<E, EM> + HasFeedback,
|
Z: HasScheduler + ExecutionProcessor + ExecutesInput<E, EM> + HasFeedback,
|
||||||
Z::Scheduler: RemovableScheduler,
|
Z::Scheduler: RemovableScheduler,
|
||||||
E: HasObservers<State = Self::State>,
|
E: HasObservers<State = Self::State>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
EM: EventFirer<State = Self::State>,
|
EM: EventFirer<State = Self::State>,
|
||||||
FF: FeedbackFactory<F, E::Observers>,
|
FF: FeedbackFactory<F, E::Observers>,
|
||||||
F: Feedback<Self::State>,
|
F: Feedback<Self::State>,
|
||||||
@ -297,9 +300,10 @@ pub static TMIN_STAGE_NAME: &str = "tmin";
|
|||||||
impl<E, EM, F, FF, IP, M, Z> TMinMutationalStage<E, EM, F, IP, M, Z>
|
impl<E, EM, F, FF, IP, M, Z> TMinMutationalStage<E, EM, F, IP, M, Z>
|
||||||
for StdTMinMutationalStage<E, EM, F, FF, IP, M, Z>
|
for StdTMinMutationalStage<E, EM, F, FF, IP, M, Z>
|
||||||
where
|
where
|
||||||
Z: HasScheduler + ExecutionProcessor<E::Observers> + ExecutesInput<E, EM> + HasFeedback,
|
Z: HasScheduler + ExecutionProcessor + ExecutesInput<E, EM> + HasFeedback,
|
||||||
Z::Scheduler: RemovableScheduler,
|
Z::Scheduler: RemovableScheduler,
|
||||||
E: HasObservers<State = Self::State>,
|
E: HasObservers<State = Self::State>,
|
||||||
|
<E as UsesObservers>::Observers: Serialize,
|
||||||
EM: EventFirer<State = Self::State>,
|
EM: EventFirer<State = Self::State>,
|
||||||
FF: FeedbackFactory<F, E::Observers>,
|
FF: FeedbackFactory<F, E::Observers>,
|
||||||
F: Feedback<Self::State>,
|
F: Feedback<Self::State>,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_bolts"
|
name = "libafl_bolts"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||||
description = "Low-level bolts to create fuzzers and so much more"
|
description = "Low-level bolts to create fuzzers and so much more"
|
||||||
documentation = "https://docs.rs/libafl"
|
documentation = "https://docs.rs/libafl"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_cc"
|
name = "libafl_cc"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
||||||
description = "Commodity library to wrap compilers and link LibAFL"
|
description = "Commodity library to wrap compilers and link LibAFL"
|
||||||
documentation = "https://docs.rs/libafl_cc"
|
documentation = "https://docs.rs/libafl_cc"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "symcc_libafl"
|
name = "symcc_libafl"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||||
description = "Meta package for symcc_runtime"
|
description = "Meta package for symcc_runtime"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "symcc_runtime"
|
name = "symcc_runtime"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
authors = ["Julius Hohnerlein <julihoh@users.noreply.github.com>", "Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||||
description = "Build Concolic Tracing tools based on SymCC in Rust"
|
description = "Build Concolic Tracing tools based on SymCC in Rust"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_derive"
|
name = "libafl_derive"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
||||||
description = "Derive proc-macro crate for LibAFL"
|
description = "Derive proc-macro crate for LibAFL"
|
||||||
documentation = "https://docs.rs/libafl_derive"
|
documentation = "https://docs.rs/libafl_derive"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_frida"
|
name = "libafl_frida"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["s1341 <github@shmarya.net>"]
|
authors = ["s1341 <github@shmarya.net>"]
|
||||||
description = "Frida backend library for LibAFL"
|
description = "Frida backend library for LibAFL"
|
||||||
documentation = "https://docs.rs/libafl_frida"
|
documentation = "https://docs.rs/libafl_frida"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_libfuzzer"
|
name = "libafl_libfuzzer"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
description = "libFuzzer shim which uses LibAFL with common defaults"
|
description = "libFuzzer shim which uses LibAFL with common defaults"
|
||||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||||
readme = "../README.md"
|
readme = "../README.md"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_nyx"
|
name = "libafl_nyx"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["syheliel <syheliel@gmail.com>"]
|
authors = ["syheliel <syheliel@gmail.com>"]
|
||||||
description = "libafl using nyx, only avaliable on linux"
|
description = "libafl using nyx, only avaliable on linux"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_qemu"
|
name = "libafl_qemu"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
||||||
description = "QEMU user backend library for LibAFL"
|
description = "QEMU user backend library for LibAFL"
|
||||||
documentation = "https://docs.rs/libafl_qemu"
|
documentation = "https://docs.rs/libafl_qemu"
|
||||||
|
@ -22,7 +22,7 @@ use libafl::{
|
|||||||
fuzzer::HasObjective,
|
fuzzer::HasObjective,
|
||||||
observers::{ObserversTuple, UsesObservers},
|
observers::{ObserversTuple, UsesObservers},
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
||||||
Error,
|
Error, ExecutionProcessor, HasScheduler,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "fork")]
|
#[cfg(feature = "fork")]
|
||||||
use libafl_bolts::shmem::ShMemProvider;
|
use libafl_bolts::shmem::ShMemProvider;
|
||||||
@ -141,7 +141,7 @@ where
|
|||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
OT: ObserversTuple<S>,
|
OT: ObserversTuple<S>,
|
||||||
S: State + HasExecutions + HasCorpus + HasSolutions,
|
S: State + HasExecutions + HasCorpus + HasSolutions,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + ExecutionProcessor + HasScheduler,
|
||||||
{
|
{
|
||||||
#[cfg(emulation_mode = "usermode")]
|
#[cfg(emulation_mode = "usermode")]
|
||||||
{
|
{
|
||||||
@ -198,7 +198,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter<State = S>,
|
EM: EventFirer<State = S> + EventRestarter<State = S>,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State + HasExecutions + HasCorpus + HasSolutions,
|
S: State + HasExecutions + HasCorpus + HasSolutions,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let mut inner = InProcessExecutor::with_timeout(
|
let mut inner = InProcessExecutor::with_timeout(
|
||||||
harness_fn, observers, fuzzer, state, event_mgr, timeout,
|
harness_fn, observers, fuzzer, state, event_mgr, timeout,
|
||||||
|
@ -15,7 +15,7 @@ use libafl::{
|
|||||||
fuzzer::HasObjective,
|
fuzzer::HasObjective,
|
||||||
observers::{ObserversTuple, UsesObservers},
|
observers::{ObserversTuple, UsesObservers},
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
state::{HasCorpus, HasExecutions, HasSolutions, State, UsesState},
|
||||||
Error,
|
Error, ExecutionProcessor, HasScheduler,
|
||||||
};
|
};
|
||||||
use libafl_bolts::tuples::RefIndexable;
|
use libafl_bolts::tuples::RefIndexable;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ where
|
|||||||
EM: EventFirer<State = S> + EventRestarter<State = S>,
|
EM: EventFirer<State = S> + EventRestarter<State = S>,
|
||||||
OF: Feedback<S>,
|
OF: Feedback<S>,
|
||||||
S: State + HasExecutions + HasCorpus + HasSolutions,
|
S: State + HasExecutions + HasCorpus + HasSolutions,
|
||||||
Z: HasObjective<Objective = OF, State = S>,
|
Z: HasObjective<Objective = OF, State = S> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
let qemu_state = QemuExecutorState::new::<
|
let qemu_state = QemuExecutorState::new::<
|
||||||
StatefulInProcessExecutor<'a, H, OT, S, QemuExecutorState<'a, QT, S>>,
|
StatefulInProcessExecutor<'a, H, OT, S, QemuExecutorState<'a, QT, S>>,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_sugar"
|
name = "libafl_sugar"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
||||||
description = "Sugar builders to create common fuzzers with LibAFL"
|
description = "Sugar builders to create common fuzzers with LibAFL"
|
||||||
documentation = "https://docs.rs/libafl_sugar"
|
documentation = "https://docs.rs/libafl_sugar"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_targets"
|
name = "libafl_targets"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>"]
|
||||||
description = "Common code for target instrumentation that can be used combined with LibAFL"
|
description = "Common code for target instrumentation that can be used combined with LibAFL"
|
||||||
documentation = "https://docs.rs/libafl_targets"
|
documentation = "https://docs.rs/libafl_targets"
|
||||||
|
@ -5,7 +5,7 @@ use libafl::{
|
|||||||
executors::{hooks::windows::windows_asan_handler::asan_death_handler, Executor, HasObservers},
|
executors::{hooks::windows::windows_asan_handler::asan_death_handler, Executor, HasObservers},
|
||||||
feedbacks::Feedback,
|
feedbacks::Feedback,
|
||||||
state::{HasCorpus, HasExecutions, HasSolutions},
|
state::{HasCorpus, HasExecutions, HasSolutions},
|
||||||
HasObjective,
|
ExecutionProcessor, HasObjective, HasScheduler,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Asan death callback type
|
/// Asan death callback type
|
||||||
@ -33,7 +33,7 @@ where
|
|||||||
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
EM: EventFirer<State = E::State> + EventRestarter<State = E::State>,
|
||||||
OF: Feedback<E::State>,
|
OF: Feedback<E::State>,
|
||||||
E::State: HasSolutions + HasCorpus + HasExecutions,
|
E::State: HasSolutions + HasCorpus + HasExecutions,
|
||||||
Z: HasObjective<Objective = OF, State = E::State>,
|
Z: HasObjective<Objective = OF, State = E::State> + HasScheduler + ExecutionProcessor,
|
||||||
{
|
{
|
||||||
__sanitizer_set_death_callback(Some(asan_death_handler::<E, EM, OF, Z>));
|
__sanitizer_set_death_callback(Some(asan_death_handler::<E, EM, OF, Z>));
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libafl_tinyinst"
|
name = "libafl_tinyinst"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["elbiazo <eric.l.biazo@gmail.com>", "Dongjia Zhang <tokazerkje@outlook.com>"]
|
authors = ["elbiazo <eric.l.biazo@gmail.com>", "Dongjia Zhang <tokazerkje@outlook.com>"]
|
||||||
repository = "https://github.com/AFLplusplus/LibAFL/"
|
repository = "https://github.com/AFLplusplus/LibAFL/"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cargo clippy --all --all-features --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test --exclude libafl_qemu --exclude libafl_libfuzzer --exclude libafl_qemu_sys --no-deps --tests --benches --examples -- `
|
cargo clippy --all --all-features --exclude libafl_qemu --no-deps --tests --benches --examples -- `
|
||||||
-D clippy::all `
|
-D clippy::all `
|
||||||
-D clippy::pedantic `
|
-D clippy::pedantic `
|
||||||
-W clippy::similar_names `
|
-W clippy::similar_names `
|
||||||
|
@ -4,7 +4,7 @@ cd "$SCRIPT_DIR/.." || exit 1
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
RUST_BACKTRACE=full cargo +nightly clippy --all --all-features --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test --no-deps --tests --examples --benches -- -Z macro-backtrace \
|
RUST_BACKTRACE=full cargo +nightly clippy --all --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace \
|
||||||
-D clippy::all \
|
-D clippy::all \
|
||||||
-D clippy::pedantic \
|
-D clippy::pedantic \
|
||||||
-W clippy::similar_names \
|
-W clippy::similar_names \
|
||||||
@ -21,7 +21,7 @@ RUST_BACKTRACE=full cargo +nightly clippy --all --all-features --exclude libafl_
|
|||||||
|
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
cd libafl_libfuzzer/libafl_libfuzzer_runtime
|
cd libafl_libfuzzer/libafl_libfuzzer_runtime
|
||||||
RUST_BACKTRACE=full cargo +nightly clippy --all --all-features --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test --no-deps --tests --examples --benches -- -Z macro-backtrace \
|
RUST_BACKTRACE=full cargo +nightly clippy --all --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace \
|
||||||
-D clippy::all \
|
-D clippy::all \
|
||||||
-D clippy::pedantic \
|
-D clippy::pedantic \
|
||||||
-W clippy::similar_names \
|
-W clippy::similar_names \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
||||||
name = "libafl_benches"
|
name = "libafl_benches"
|
||||||
version.workspace = true
|
version = "0.13.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "LibAFL Benchmarks"
|
description = "LibAFL Benchmarks"
|
||||||
documentation = "https://docs.rs/libafl"
|
documentation = "https://docs.rs/libafl"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user