3576 Commits

Author SHA1 Message Date
Dominik Maier
ce5fd435ea
Move all unnecessary std uses to core,alloc (#3027)
* Move all unnecessary std uses to core,alloc

* More

* more fix

* more

* more

* Remove libafl-fuzz grimoire

* more

* more

* more cleanup

* remove bins

* fix

* more fix
2025-02-27 14:32:37 +01:00
Dominik Maier
c7207dceb0
Rust 2024 edition (#3022)
* Rust 2024 edition

* gen = generalized

* Fixes

* more fix

* More fix

* even more fix

* fix libfuzzer

* ignore clippy lint

* even more

* fix docs?

* more?

* More pub more better

* win

* docs

* more

* More

* doc stuff?

* counter_maps->counters_maps

* libafl qemu fixes for rust 2024

* fix?

* fmt

* unsafe lint

* final fixes

* fmt

* working?

* not working

* unused import

* win?

* update libafl qemu hash

* fmt

* fix

* unused imports

* fix

* fix

* more foix

* less edition

* fix

---------

Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2025-02-27 00:12:29 +01:00
dependabot[bot]
3d31adcca1
Update ctor requirement to 0.4.0 (#3005)
* Update ctor requirement from 0.2.9 to 0.3.6

---
updated-dependencies:
- dependency-name: ctor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* ctor 0.4.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Dominik Maier <dmnk@google.com>
2025-02-26 22:28:00 +01:00
Dongjia "toka" Zhang
a0d8f7e255
Disable windows-libfuzzer-asan (#3025) 2025-02-26 16:37:21 +01:00
6a4d1af606 swap set48, 64 2025-02-26 14:27:54 +01:00
d2aaf0bf6e config++ 2025-02-26 12:22:52 +01:00
98ed400e1a config updates 2025-02-26 12:17:59 +01:00
fd336e8ab0 fix wrong minia 2025-02-26 10:52:59 +01:00
ColinSeibel
9182fd93e6
scripts/test_fuzzer.sh: correct working directory (#3024) 2025-02-26 09:51:09 +01:00
dependabot[bot]
a917cc046f
Update fastbloom requirement from 0.8.0 to 0.9.0 (#3021)
---
updated-dependencies:
- dependency-name: fastbloom
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-25 16:32:06 +01:00
56c046ecf6 better handling for indices 2025-02-25 13:53:53 +01:00
cb20424cec keep worst observed case, precise isns -> time calculation 2025-02-24 18:35:53 +01:00
WorksButNotTested
7121defff9
Update dockerfile (#3020)
* Fix just

* Update dockerfile

* Changes to test all architectures for qemu-user fuzzers

* Update version of QEMU

* Fix qemu on aarch64

* Fix qemu on i386

---------

Co-authored-by: Your Name <you@example.com>
2025-02-24 16:13:34 +01:00
Dominik Maier
e5ba51aae4
More LibAFL_QEMU Launcher things (#3000)
* More LibAFL_QEMU Launcher things

* Fix CI

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-24 16:12:37 +01:00
63f6f02ba9 snakefile clean 2025-02-21 19:30:18 +01:00
1df4bba604 config updates 2025-02-21 18:36:32 +01:00
800f2c8788 feedback for job woet 2025-02-21 18:29:44 +01:00
Celian G.
40c0a8c57c
Improved calling convention support for x86, x86_64, arm and aarch64 for libafl-qemu (#3013)
* Improved calling convention support for x86, x86_64, arm and aarch64

* fix

* fix write_function_arguments

* fix argument_error

* follow clippy advice

* last change?

* fix guestaddr issue

* add code block for cargo-fmt

* default to default convention

* fix mistake

* add pub

* fix

* changes after review

* last change?

---------

Co-authored-by: celian <cglenaz>
2025-02-21 18:04:45 +01:00
ca8d9fdf0a abb woet increases are interesting 2025-02-21 14:24:34 +01:00
Dominik Maier
7c83be2408
Add auto format to settings.json.default, format documentation and macros (#3019)
* Add auto format to settings.json.default

* Add more nightly rustfmt features
2025-02-21 13:31:31 +01:00
Dominik Maier
14eee111c2
Fix Clippy for Rust 1.85 (#3017)
* Fix latest Clippy

* fixed template

* How did I not see this
2025-02-21 13:15:12 +01:00
Dominik Maier
5746df835e
Add precommit script (#3018)
* Add precommit script

* Merge stuff
2025-02-21 12:57:44 +01:00
Dominik Maier
df7e51ed42
Add PR description section to PR template (#3016)
* Add PR description place

* remove PR
2025-02-21 12:24:12 +01:00
Dongjia "toka" Zhang
d40f18f377
Fix finish_stage call (#3014)
* fixer

* clp

---------

Co-authored-by: toka <toka@tokas-MacBook-Air.local>
2025-02-21 12:23:00 +01:00
66e299cfce intermediat snapshots _at_xh 2025-02-21 10:13:47 +01:00
6d1d7482ee ensure fuzz-length u32 2025-02-21 10:13:07 +01:00
EvianZhang
1debeb74a7
Add statsd monitor documentation (#2996)
* Initial commits

* Complete statsd docs

* Add docs about optionally enabled StatsD monitor
2025-02-21 09:24:49 +01:00
Dongjia "toka" Zhang
d3bae6a503
Add try_insert for SerdeAnyMap (#3012)
* add

* use hashbrown method

---------

Co-authored-by: toka <toka@tokas-MacBook-Air.local>
2025-02-20 19:27:35 +01:00
EvianZhang
7bf7e4c2dc
Add logics monitors (#3011)
* Add logics monitors

* Re-export logics monitors
2025-02-20 13:43:16 +01:00
Valentin Huber
1eef4ffb58
Introduce ListInput (#2972)
* Introduce ListInput

* Add remove mutators for ListInput

* Merge ListInput and MultipartInput

* Reimplement MultipartInput as a special case of ListInput

* Revert changes to Cargo.toml

* Add collection of generic listinput mutators

* Fix example

* Add note to MIGRATION

* Split list and multi into separate modules

* Fix docs

* Using string names again in the multi example fuzzer

* Remove unnecessary code

* Fix fuzzer

* Use key instead of name for MultipartInput key

* Prettier code in example fuzzer

* Do not convert slice to vec manually
2025-02-20 13:41:53 +01:00
Dongjia "toka" Zhang
98ef505a0e
Add add_metadata_checked method (#3008)
* new api

* found a bug :>
2025-02-19 20:24:15 +01:00
Dongjia "toka" Zhang
9f28672ea1
Fix ReplayStage (#3007) 2025-02-19 18:06:49 +01:00
Dongjia "toka" Zhang
61568a9be1
Restartable trait (#3004)
* separate into Restartable

* typo

* fixes, blanket impl

* aa

* lol

* aa

* fixer

* lol
2025-02-19 15:06:31 +01:00
dae46ea26b enable fallback interrupt randomization 2025-02-19 12:32:01 +01:00
Dongjia "toka" Zhang
0e4c6722f0
Replay stage (#3003)
* replay stage

* seems to be working

* a

* rever

* rev

* rdy for merge

* fmt

* lol
2025-02-18 19:55:02 +01:00
bbf99eca8b profile woets 2025-02-18 16:27:53 +01:00
64d1151e96 dump intermediate cases 2025-02-18 16:25:57 +01:00
Dongjia "toka" Zhang
70eb8158e5
Refactor stages (#3002)
* refactor

* miss

* lol

* revivet tests

* aa

* ?

* a

* fuck

* fuck

* a

* m

* fuck
2025-02-18 14:25:21 +01:00
Romain Malmain
a682c36c84
Fix build for libfuzzer_libpng in ubuntu 24 (#2987)
* fix justfile for ubuntu libpng
2025-02-18 11:58:31 +01:00
Dominik Maier
641db5f19b
Change type generic of ValueInput from I to T (#3001) 2025-02-18 03:07:00 +01:00
107ccf03a8 config updates 2025-02-17 18:35:02 +01:00
WorksButNotTested
f5a01ee20d
Asan guest fix (#2986)
* Check for initialization of libgasan.so on first_exec

---------

Co-authored-by: Your Name <you@example.com>
2025-02-17 17:06:42 +01:00
Dongjia "toka" Zhang
91c46d1a33
Update CONTRIBUTING.md to forbid cyclic dependency (#2999) 2025-02-17 17:00:23 +01:00
Dongjia "toka" Zhang
ae3ea23607
PR Template (#2997) 2025-02-17 16:05:33 +01:00
forky2
a30cce1d88
Fixes #2966 and #2967: Ensure DRCOV unique IDs and max 4GiB ranges. (#2968)
* Fixes #2966 and #2967: Ensure DRCOV unique IDs and max 4GiB ranges.

* Formatter.
2025-02-17 14:51:15 +01:00
Marco C.
47f7978b91
Bump Libipt 0.3, add HW breakpoint support (#2984)
* Decode with callback

* WIP restore intelpt module

* Fix build_target if target_dir doesn't exist

* WIP itelpt qemu/kvm example: bootloader

* qemu config refactoring

* Fix intel_pt_command_executor target dir

* * QEMU error refactoring*
* back to one QEMU init function
* other small things

* update test

* Bump libipt

* waitpid_filtered to ignore SIGWINCH

* Fix warnings unused manifest key: *.version

* Add export_raw feature to libafl_intelpt

* derive Debug for IntelPTHook

* Clippy

* Light refactor of EmulatorModules

* qemu is now a parameter to EmulatorModule callbacks and most function hooks.
* EmulatorModules is initialized before QEMU is initialized.

* Update target program ELF offsets

* fmt

* * asan fixed size accesses working with generics
* continue to propagate qemu argument as hook first parameter
* use pre_syscall* and post_syscall* everywhere
* fix some clippy stuff

* fmt

* Add comment to KVM pt_mode check

* refactor

* Add intel_pt_export_raw feature in libafl

* fix fuzzers

* * refactor asan and asanguest modules to avoid custom init of QEMU and use the module interface instead.
* adapt qemu_launcher example to fully work with emulator, since qemu must now be initialized by emulator.

* fmt

* clippy

* fix qemu_coverage

* fmt

* forgot qemu args in launcher

* map_error instead of unwrap

* use correct args

* Update to new libafl_qemu

* adapt api

* borrow checker friendly join_split_trace

and copy trace before deocde to prevent decoding failures

* testing stuff

* Set ip_filters (also) with builder

* Move trace to file

* Store a pt_builder in module

enable the setting of filters and other pt settings

* baby_bootloader target

* Best bootloader ever

* new builder?

* use closure for qemu config from emulator builder.

* better format

* clippy + fmt

* Fix build target

Create target directory if doesn't exist

* Remove filter on speculatively exec blocks

since also committed blocks can have this flag

* Add current ip_filters getter

* Fix possibile infinite loop in trace decode

* HW breakpoint + snapshot

* add snapshot and exit at first objective

* prefer raw pointers to slice_from_raw_parts_mut

since the latter is highly unsafe and allows more potentially dangerous reordering

* Add cpu option to QEMU config

* Add cpu option and minor improvements

* fix cargo run causing recompile

* no default devices

* windows clippy fix

* Exclude intel_pt feature from CI as all systemmode feats

* Add qemu_intel_pt_bootloader to CI

* Fix NopPageFilter

* Fix qemu_config

* Restore HW breakpoints

* Lints

* return Result for hw bp set/remove

* mark join_split_trace as unsafe

* Put the qcow2 in a tmpfs ramdisk

10x exec/sec

* Post merge fixes

* Try out libipt 0.3 alpha

* Try out libipt 0.3 alpha also in hook

* Clippy

* New libipt

* Post merge fixes

* Bump libipt

* Drive cache None

* Post merge fixes

* Use SectionInfo from libipt

* No slice::from_raw_parts_mut, just use raw pointer

* Cache the decoder builder

* Update qemu-bridge

* Add qemu -append param

* Move linux specific code to a mod, less #[cfg]s

* Add qemu initrd config

* Add qemu monitor tcp

* Add not enough ip filters message

* Fix wrong must_use

* Prevent possible infinite loop in block decoding in debug mode

* Clippy

* fix CI?

* Revert, keep libipt 0.3 and hw bp

---------

Co-authored-by: Romain Malmain <romain.malmain@pm.me>
Co-authored-by: Marco Cavenati <marco@lenovo300e>
2025-02-17 14:50:07 +01:00
Romain Malmain
530a3cc6aa
Better error for libafl_cc when binaries are not found (#2988)
* better error when libafl_cc does not work as expected

* better msg, clippy
2025-02-17 14:47:38 +01:00
dependabot[bot]
d382b8381e
Update errno requirement from 0.2 to 0.3 (#2994)
Updates the requirements on [errno](https://github.com/lambda-fairy/rust-errno) to permit the latest version.
- [Release notes](https://github.com/lambda-fairy/rust-errno/releases)
- [Changelog](https://github.com/lambda-fairy/rust-errno/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lambda-fairy/rust-errno/compare/v0.2.0...v0.3.10)

---
updated-dependencies:
- dependency-name: errno
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 13:42:41 +01:00
dimeko
94d6c51363
chore: adds check for riscv64 and riscv32 archs (#2993) 2025-02-17 13:03:09 +01:00
henri2h
9a2a42ccca
Fix libafl_unicorn CI (#2991)
* fix: clippy

* fix: allow specifying thumb mode or not

* fix: timeout for testcase
2025-02-17 10:45:07 +01:00