* fix new exciting clippy errors
* fix CASR build errors
* bump casr version
* more clippy whack-a-mole
* allow needless pass by ref mut as it is improperly marked unnecessary
* Add more features to libafl_qemu to remove some of the heavy lifting from the fuzzers
* Refactor qemu_coverage
* Minor tweaks to fix other fuzzers
* Autofix
* Add CallingConvention to write_function_argument
* Replay reverted clippy fixes
---------
Co-authored-by: Your Name <you@example.com>
* Change executor trait to allow \&mut Input
* Add mut inprocess executor
* Add mut inprocess executor
* Format and fix clippy errors
* Fix more clippy errors
* Revert accidental refactoring of InMemoryCorpus
* Add mut versions of all executors that can support it
* Do not persist possible testcase mutation in stages, shadow/differential executors, or corpus minimization
* Fix missing imports
* Fix executor type for missed qemu items
* Add re-exports for mut executors
* Use InProcessForkExecutorMut in QemuForkExecutorMut
* Update BytesInput harnesses to take mutable references
* Update other-input-type-taking harnesses to take mut references
* Clippy fixes
* Feature gate TryFromIntError import
* Fix missed harness input type in baby_fuzzer
* Fix additional clippy issues
* Fix unnecessary hashes on string literal
* Even MORE clippy fixes
* Fix one more clippy issue
---------
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
* Insert into corpus if feedback is_interesting on crash/timeout
* Use correct import for HasExecutions
* Windows add missing import
* QemuExecutor add HasFeedback
* Windows asan fix
* Add missing call to scheduler.on_add
* Add missing HasExecutions for windows frida
* QemuExecutor missing HasScheduler
* QemuExecutor missing HasCorput
* Add sample fuzzer which collects DrCov coverage for various architectures using QEMU instrumentation
* Fix clippy
* Rename NullCorpus to NopCorpus
* Added support for verbose output
* Attempt to fix clippy again
* Fix remaining defaults to use x86_64 when no arch specified and be more robust handling partial builds
* Make build even more robust against partial re-builds
* Added missing dependencies to workflow, updated README
* Add missing dependencies for i386
* Another dependency
* More dependencies
* Disable tests on OSX
* Add tmate
* Add missing dependencies and symlink header directory
* Tidy up after test so we don't hog all the disk space
---------
Co-authored-by: Your Name <you@example.com>
* ci
* fi
* Revert "fi"
This reverts commit ed298d71057607f019e64d58687273a01d30e260.
* Revert "ci"
This reverts commit 6b65936990143a6069abd56dcbe633ac37be2ede.
* fi
* qemu: Return errors from Emulator::new instead of asserting
Libraries should not `assert!` except in cases of unrecoverable (library)
programmer error. These errors are all potentially recoverable, and aren't
internal errors in `libafl_qemu` itself.
* Respond to review comments
* Created macro to get the metadata form State and Testcase
* Expanded the macros for mutable, or not, State and Testcase metadata
* Created functions on traits HasMetadata and HasNamedMetadatato get, mutable or not, metadata
* Created the functions to get metadata
* Added #[inline] attribute and renamed the functions
* Renamed the functions and added #[inline] attribute
* Temporarily added testcase() function
* Added testcase() function
* Changed Ref import to core::cell:Ref
* Added testcase_mut() and renamed occurences of metadata() and metadata_mut()
* Renamed more occurences
* Renamed the metadata() on impl HasMetadata for NopState
---------
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
Reduces total number of packages from 577 to 571 on building with:
`cargo +nightly build --workspace --all-features`
* ahash 0.7 -> 0.8
* Move `AHasher::new_with_keys` to `RandomState::with_seeds` given the
recommendation from: aHash maintainer:
https://github.com/tkaitchuck/aHash/issues/132#issuecomment-1288207069
* bindgen: 0.61 -> 0.63
* c2rust-bitfields: 0.3 -> 0.17
* criterion: 0.3 -> 0.4
* crossterm: 0.25 -> 0.26
* dynasmrt: 1.2 -> 2
* goblin: 0.5.3 -> 0.6
* hashbrown: 0.12 -> 0.13
* nix: 0.25 -> 0.26
* The `addr` arg of `mmap` is now of type `Option<NonZeroUsize>`
* The `length` arg of `mmap` is now of type `NonZeroUsize`
* Requires updating implementers to update `nix` as well
* prometheus-client: 0.18.0 -> 0.19
* Do not box metrics
* Gauges (a majority of the LibAFL metrics) are now i64 types so there
is a small chance of overflow, with the u64 values that LibAFL
tracks, but unlikely to be problematic.
* Keep `exec_rate` as a floating point value
* serial_test: 0.8 -> 1
* typed-builder: 0.10.0 -> 0.12
* windows: 0.42.0 -> 0.44
Co-authored-by: Dominik Maier <domenukk@gmail.com>
* fixing linking issue
* insteading of linking lib we dont use. just disable them
* fixing the keyutils problem
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
* emu::current_cpu() is now kept after vm stop and it is the CPU that hitted the breakpoint
* clippy
* uninit
* clippy
* clippy
* clippy
* clippy
* nightly override in CI
* nightly override in CI
* components
* components
* targets
* targets
* clippy
* clippy
* clippy
* clippy
* clippy (again)
* MaybeUninit
Co-authored-by: Dominik Maier <dmnk@google.com>
* libafl_qemu: fix systemmode with slirp dependency
libslirp will be dropped from future QEMU releases (see https://wiki.qemu.org/ChangeLog/7.0).
This change adds the "slirp" feature,
which links with the host-systems libslirp.
* libafl_qemu: enable systemmode snapshots, vm_start
Re-enable snapshot functions.
Start the VM before qemu_main_loop.
* libafl_qemu: allow synchronous snapshotting
Add a flag to take snapshots synchronosly.
This should be used to take or load snapshots while the emulator is not
running.
* libafl_qemu: fallback cpu for read-/write_mem
In systemmode, current_cpu may not be set.
In such cases use the first cpus memory access methods.
* fuzzers: add example for libafl_qemu in systemmode
* libafl_qemu: update libafl-qemu-bridge revision
* libafl_qemu: add memory access by physcial address
* fix liabfl_qemu example
Use GuestAddr and physical memory access
* ci: install libslirp-dev for libafl_qemu
* fuzzers/qemu_systemmode: clean up example
* libafl_qemu: remove obsolete functions
emu::libafl_cpu_thread_fn
emu::libafl_start_vcpu
emu::start
* fuzzers/qemu_systemmode: simplify example
* improve build_linux.rs
* Update qemu_systemmode fuzzer
* upd
* clippy
* Save and restore CPU state in libafl_qemu
* clippy
* Clone
* upd
* upd
Co-authored-by: Alwin Berger <alwin.berger@tu-dortmund.de>