Skip to content

feat: Add skribe-fuzz binary for LibAFL fuzzer to the nix derivation#80

Draft
gtrepta wants to merge 6 commits into
masterfrom
skribe-fuzz-package
Draft

feat: Add skribe-fuzz binary for LibAFL fuzzer to the nix derivation#80
gtrepta wants to merge 6 commits into
masterfrom
skribe-fuzz-package

Conversation

@gtrepta
Copy link
Copy Markdown
Contributor

@gtrepta gtrepta commented May 14, 2026

  • Uses commits from feat: Start LibAFL fuzz loop implementation #77 to add the skribe-fuzz binary to the fuzzing crate
  • Splits off a skribe-kdist derivation that both skribe-fuzz and skribe depend on
  • Adds a skribe-fuzz derivation for the fuzzer binary

Comment on lines +38 to +63
pub struct FuzzConfig {
pub template: kore::Pattern,
pub abi: SignatureAbi,
}

pub struct SignatureFuzzer(pub Vec<u8>);

impl VarHandler for SignatureFuzzer {
fn substitute(
&mut self,
name: &str,
_sort: &kore::Sort,
) -> Result<kore::Pattern, MarshalError> {
let sort = kore::Sort::App {
id: kore::Id::new("SortBytes".to_string()).unwrap(),
args: vec![],
};
let value = kore::Str(self.0.iter().map(|&b| b as char).collect());
match name {
"VarCALLDATA" => Ok(kore::Pattern::Dv { sort, value }),
_ => Err(MarshalError::Unsupported(
"Encountered a variable that isn't CALLDATA",
)),
}
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving these into their own module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants