1162 Commits

Author SHA1 Message Date
Romain Malmain
8d0ad23856
Check markdown links validity in CI (#2495)
* add markdown link check in ci

* fix broken links when possible.
configuration file for md checker.

* accept code 200...

* more fixes

* more fixes

* more fixes
2024-08-22 18:15:15 -05:00
Romain Malmain
4b87d7f4eb
Custom QEMU emulator typed builder + ExitHandler / Commands refactoring (#2486)
* Add a custom typed builder for Emulator

* Unify qemu_init for usermode and systemmode

* Remove env from qemu init args (it is unused in QEMU in practice)

* expose thread hooks to systemmode

* rename qemu_config to config

* Replace ExitHandler by EmulatorDriver

* Reorder generics alphabetically for Qemu{,Fork}Executor

* Moved snapshot manager to Emulator to continue centralizing mains objects in the same structure

* Reimplementation of CommandManager working with enums instead of tables

* Macro has been adapted to do this work automatically

* Moved snapshot stuff to dedicated module

* Removed many Rc<RefCell<...>>, now useless with the removal of vtables

* Builder given by Emulator via `Emulator::builder`. Reduced trait bound overhead
2024-08-21 16:36:45 +02:00
bd7ddaffbd fix releases 2024-08-20 12:20:55 +02:00
6995cd053b fix snakefile 2024-08-19 16:28:11 +02:00
e9fb73e65b WIP: per-task response times 2024-08-19 16:08:45 +02:00
Dongjia "toka" Zhang
eb3dff07b6
Add more missing ngram8 cfgs (#2490)
* fix dump cfg

* add missing cfg

* more

* taplo fmt
2024-08-19 14:39:21 +02:00
bf7ad374a0 stupid bug fix
stupid bug fix
2024-08-19 10:22:31 +02:00
de9c0a6d1e WIP: input snippet mutation 2024-08-16 09:58:21 +02:00
Marco C.
21051dc26f
qemu: Add QemuConfig to set qemu args via a struct (#2339)
* Add QemuConfig to set qemu args via a struct

* Add derive macro to automate the qemu string args generation

* fix tests
2024-08-14 15:30:14 +02:00
72f9de45d0 fix cargo.toml 2024-08-14 09:41:02 +02:00
46aa6cec0f reads behind config flag 2024-08-14 09:10:30 +02:00
b9f0151e87 repeat interrupt mutations 2024-08-14 08:55:23 +02:00
712ac137d7 logging and reporting 2024-08-14 08:50:34 +02:00
920a996d95 multipart seed reading 2024-08-14 08:42:33 +02:00
Romain Malmain
13ba32ed2a
Unify qemu executor (#2483)
* Remove stateless qemu executor

* All harnesses take a reference to an emulator as parameter now

* harness takes an emulator as first parameter, and input as second parameter (opposite of previous definition)

* bump libafl qemu dependencies to the latest version
2024-08-13 19:44:10 +02:00
Aarnav
2287afc59b
libafl-fuzz: Introduce Support for QEMU mode (#2481)
* libafl-fuzz: simplify Makefile.toml

* Re-introduce support for old AFL++ forkserver

* clippy

* libafl-fuzz: add support for QEMU mode

* libafl-fuzz: simplify Makefile
2024-08-13 07:13:59 -05:00
3db17ceb98 WIP: store memory reads 2024-08-12 15:31:56 +02:00
05c17d3159 report state space exporation 2024-08-12 12:07:31 +02:00
Romain Malmain
723f4a1cb0
Fix various QEMU bugs (#2475)
* Update LibAFL QEMU to the latest version (V9.0.2 update, important bug fixes, ... - check the dedicated repo for more info)
* fix bug in hook execution, causing first execution hooks to be run multiple times.
2024-08-05 23:48:35 +02:00
Aarnav
949a25a29a
It's frida time for libafl-fuzz (#2469)
* libafl-fuzz: misc nit in check_autoresume

* libafl-fuzz: add FRIDA mode

* libafl-fuzz: improve Makefile

* libafl-fuzz: fix Ci

* libafl-fuzz: clang-format test-cmpcov.c

* libafl-fuzz: no cmplog for persistent frida

* libafl-fuzz: minor CI fix

* libafl-fuzz: fix frida persistent mode

* libafl-fuzz: add frida seeds

* misc: typo
2024-08-05 18:10:45 +02:00
f8d9363e7e update snakefile 2024-08-04 09:46:39 +02:00
ade004cffb update targets 2024-08-04 09:40:53 +02:00
Aarnav
6d4f071eaa
Misc libafl-fuzz improvements (#2463)
* libafl-fuzz: ignore seeds that are not regular files

* libafl-fuzz: remove 4 dict files limit

* libafl-fuzz: clippy

* libafl-fuzz: add -t option

* libafl-fuzz: fix typo in seed feedback
2024-07-31 14:54:11 +02:00
Dominik Maier
8fb80c3f3a
libafl_qemu: Continue build with outdated LLVM, ignore TUI race conditions (#2461)
* libafl_qemu: Continue build with outdated LLVM

* Ignore race condition

* ignore more race conditions, remove useless clones

* fix fixes
2024-07-30 14:48:17 +02:00
Aarnav
a863720320
libafl-fuzz: Increase cmplog CI timeout (#2458)
* libafl-fuzz: increase cmplog CI test timeout

* libafl-fuzz: fix cmplog CI
2024-07-29 17:39:34 +02:00
Aarnav
e55cbee107
libafl-fuzz: Fix invalid short param for input_ext (#2456) 2024-07-29 16:33:46 +02:00
Dominik Maier
75af67f1e0
Fix CI after Rust 1.80, update to Ubuntu 24.04 (#2449)
* 0.13.2 (for real this time)

* More 0.13.2

* Make sure this never bites us

* Update ahash

* Fix CI after rust 1.80

* Does 18 work?

* Trying to fix this?

* lol regex

* noble

* works?

* fix llvm-config

* fmt

* Windows?

* more fix?

* more fix

* remove pip

* Add find_python3_version support to libafl_cc

* llvm-config

* more curl

* windows has no apt lol

* more
2024-07-29 15:31:41 +02:00
Dominik Maier
6df1b34375
Add Taplo check to CI (#2451)
* Add Taplo check to CI

* more taplo

* Try to make this easier
2024-07-26 18:38:50 +02:00
Dominik Maier
e83dc792da
0.13.2 (for real this time) (#2448)
* 0.13.2 (for real this time)

* More 0.13.2

* Make sure this never bites us

* Update ahash
2024-07-26 13:41:05 +02:00
Mrmaxmeier
afbdc02c54
Format all tomls with taplo fmt (#2436)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-07-26 10:03:10 +02:00
Aarnav
76e1b4cb1e
Fix cmplog implementation (#2439)
* fix cmplog implementation
only set testcase filepath if filepath is none

* libafl-fuzz: fix minor CI

* add missing fields to AFLppCmpLogOperands

* libafl-fuzz: pin CI AFL version to a commit
fix extended_cmplog_instrumentation

* libafl-fuzz: fix CI

* this should not panic

* aaa

* libafl-fuzz: fix cmplog CI

---------

Co-authored-by: Toka <tokazerkje@outlook.com>
2024-07-25 18:10:21 +02:00
Saketh Reddy
c857b8dd77
Fix markdown issue in fuzzers/libpng/libfuzzer_libpng_cmin/README.md (#2437)
Adds a single `
2024-07-23 16:45:58 +02:00
Aarnav
e6b94f3715
Feature/libafl fuzz misc (#2430)
* libafl-fuzz: add cmplog to CI
libafl-fuzz: add option to specify custom rng sed
libafl-fuzz: add help messages to CLI, add file extension support
libafl-fuzz: adhere to AFL++ cmplog bin path format
libafl-fuzz: avoid races when writing to fuzzer_stats
libafl-fuzz: add time tracking for CalibrationStage, MutationalStage and SyncFromDiskStage

* libafl-fuzz: fix libafl paths

* libafl-fuzz: remove redundant cmplog check

* libafl-fuzz: ingore UnstableMapEntries when using queue scheduler in afl_stats.rs
libafl-fuzz: track max_depth for QueueScheduler
libafl-fuzz: fix custom input file

* libafl-fuzz: fix Makefile

* clippy
2024-07-22 15:43:47 +02:00
Romain Malmain
82f11c22ad
Various CI improvements + fix wrong format check in CI (#2417)
use of LLVM 19 by default
    LLVM version should be much easier to switch from now on
    a lot of code repetition has been deleted
    removed llvm-related github action
    fix format check
    other small things

---------

Co-authored-by: Toka <tokazerkje@outlook.com>
2024-07-19 22:32:50 +02:00
Romain Malmain
1205c2144c
Restructure the fuzzers folder (#2409)
* move fuzzers in subfolders

* add readme

* remove redundent fuzzers
2024-07-19 18:24:24 +02:00
Aarnav
c22a62c32a
libafl-fuzz: add IndexesLenMinTimeScheduler back (#2426) 2024-07-18 16:47:00 +02:00
Dongjia "toka" Zhang
78a30c4403
Fix baby fuzzer tui (#2425) 2024-07-18 14:56:21 +02:00
Romain Malmain
c96ea616fe
Qemu helpers & hooks refactoring (#2267)
* Helper is now called Module.

* Emulator now contains hooks state.

* Emulator is managed by QemuExecutor.

* QEMU hooks have been completely refactored on the rust side.

* Generics cleanup.
2024-07-17 11:46:42 +02:00
Aarnav
b9da7dd87f
Introduce Persistent Record for libafl-fuzz (#2411)
* libafl-fuzz: fix PERSISTENT_SIG and DEFERRED_SIG

* libafl-fuzz: add AFL_PERSISTENT_RECORD

* libafl-fuzz: update README
2024-07-17 00:35:06 +02:00
Aarnav
aa21815a97
Introduce libafl-fuzz (#2362)
* Introduce libafl-fuzz

* fix corpus file path

* simplify SeedFeedback

* fix incorrect comment

* add clap::ValueEnum to PowerSchedule as an optional derive if clap is enabled

* UnixShMemProvider replaced with StdShMemProvider for libafl-fuzz

* remove io_error_more feature constraint

* libafl-fuzz: make Ok(()) unreachable in CentralizedLauncher

* libafl-fuzz: make harness_input_stdin to harness_input_type with &'static

* libafl-fuzz: move each feedback to it's own file

* make run_fuzzer_with_stage into a function.
use CachedOnDiskCorpus instead of OnDiskCorpus for Corpora
remove utils file

* remove unecessary clone

* libafl-fuzz: cleanup AFLStatsStage

* move peak_rss_mb to libafl_bolts

* parse envs by hand

* add sensible defaults for map size and broker port

* fix test.sh and corpus_id padding

* add Makefile.toml

* libafl-fuzz update test suite

* libafl-fuzz: clippy

* rename peak_rss_mb to peak_rss_mb_children

* remove minor version constraint for clap

* libafl-fuzz: fix ELF check and instrumentation check in check_binary

* libafl-fuzz: improve Makefile.toml

* simplify fuzzer and cleanup typos

* libafl-fuzz: load corpus entries in a multicore fashion

* libafl-fuzz: create output dir if not exists (non-racey)

* libafl-fuzz: add sequential scheduling support
libafl-fuzz: add cmplog options
libafl-fuzz: add test-cmplog.c to CI

* rename peak_rss_mb_children to peak_rss_mb_child_processes

* fix race condition in SyncFromDiskStage, add interval based checking and support for multiple directories.
libafl-fuzz: add support for syncing with foreign fuzzers

* update README

* implement AflScheduler for QueueScheduler.
Add queue_cycles field to
AflScheduler

* libafl-fuzz: remove dependecy on SchedulerMetadata for AflStatsStage

* clippy

* remove queue_cycles from AflScheduler into int's own trait.
libafl-fuzz: simplify map observer tracking

* clippy

* libafl-fuzz: disable cmplog check in CI for now

* add missing constraints for libafl_qemu executor

* clippy

* libafl-fuzz: improve Makefile
libafl-fuzz: clippy

* libafl-fuzz: misc

* misc typos, beautify

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-07-16 02:10:20 +02:00
Romain Malmain
e8de3591bf
Fix cfg clippy for libafl_qemu (#2397)
* optional final comma

* fix systemmode
2024-07-16 00:37:54 +02:00
Dominik Maier
7feeb00546
Fix docs (follow-up to #2385) (#2388)
* Fix docs (follow-up to #2385)

* More fix

* fix fuzzer

* More docs
2024-07-12 16:13:43 +02:00
Dominik Maier
3c93b96b70
Introduce TuiMonitor builder, clean up monitor docs and names (#2385)
* Introduce TuiMonitor builder

* Some random docs

* More documentation for monitors

* fixed critical whitespace

* Rename all-caps TOML and JSON to Toml and Json in monitors

* actually rename

* more
2024-07-12 15:27:45 +02:00
Dominik Maier
fa4241f4f8
Make atheris load multiple tokens files (#2382) 2024-07-12 12:46:42 +02:00
Dongjia "toka" Zhang
2565fa8bf5
Delete Makefile.toml from Multi machine exmaple (#2379)
* delete

* aa
2024-07-11 14:51:18 +02:00
Dominik Maier
264c2f021e
Update all which dependencies (#2375) 2024-07-10 15:38:56 +02:00
Dominik Maier
2b43d86296
Update clap across the repo (#2374) 2024-07-10 15:35:25 +02:00
Dominik Maier
721fd3b14e
Make tokens more token-y (less dictionary-y) (#2371) 2024-07-09 17:37:37 +02:00
0e5bf879e4 fix try_force_new_branches 2024-07-04 12:49:09 +02:00
Nereuxofficial
ed3bd003a4
fix: Added corpus for dynamic_analysis fuzzer (#2360)
* doc: fixed instruction in CONTRIBUTING.md

* Added note for windows users

* fix: Added corpus for dynamic_analysis fuzzer

* fix for calling the clippy script on windows

* Fixed path oversight in previous commit
2024-07-03 11:51:52 +02:00