3576 Commits

Author SHA1 Message Date
Dominik Maier
53004f93d6
Improvements for QEMU_Launcher (#2983)
* Improvements for QEMU_Launcher

* fix
2025-02-17 02:45:02 +01:00
Dongjia "toka" Zhang
8b49d81406
Better addr2line (#2989)
* better addr2line

* delete unused

* more

* fixer?

* lol

* class

* mm

* take care of non pie binary or pie binary

* user mode only
2025-02-16 19:18:09 +01:00
henri2h
0aba2c4520
Add support for Unicorn engine (#1054)
* feat: unicorn support

* feat: update

* fix: remove unused files

* fix: clean

* fix: remove undeeded parameters

* fix: typo

* moved to justfile

* use log::debug!

* fix cargo and created justfile

* feat: add CI

* add runs on

* fix: CI

* fix: CI

* fix: don't use fork executor

* not needed anymore

* fix: CI

* fix: CI

* remove extra space
2025-02-15 04:15:16 +01:00
mkravchik
b3fe744e57
Pr/fasan multithreading fixes upstream (#2955)
* Fixing the test_harness library name

* Fasan works, but testing of all features is pending

* Tests pass, before fixing clippy and fmt

* CLippy+fmt

* CLippy+fmt+tests running on linux

* Clippy

* Not stalkering the fuzzer. In the correct way

* Removing the instrumentation upon crash. Proper hooking of UnmapViewOfFile

* Fixes after the merge from the upstream (before 0.15.0). Still need to add the observer, clippy, fmt, and at least linux compilation

* Adding the helper observer and using it in the test

* Removing the observer from the wrong location

* Adapting to the new helper ownership model

* Adding an observer to shut down instrumentation upon crash

* Clippy + fmt

* Using mimalloc everywhere

* Deactivating before activating with the harness. Otherwise, gets stuck on Linux.

* Fixing imports for windows

* Using the new way of passing the handler

* Using frida_helper_shutdown_observer

* Clippy+fmt

* no-std, clippy

* Fmt

* Stable thread_id

* Clippy 18

* More clippy

* Formatting toml

* Fixing apples

* Fixing apples 2

* Fixing apples 3

* Upping to 0.16.7 (necessary for Windows)

* Clippy+fmt

* Enabling the allocator test after the fix and clarifying the importantce of the static runtime linking.

* Moving has_tls to bolts

* Proper handling of no-std, hopefully

* Another attempt to fix win no-std

* Not mine clippy complaint...

* Not mine clippy complaint #2...

* Dlmalloc not used, removing from dependencies

* Restoring target in config.toml (otherwise fails CI on Linux)

* lots of digging around, pray for us

* fixup?

* Revert "lots of digging around, pray for us"

This reverts commit 706c27201918e906e3401cd0d9e76546f889d1f5.

* Revert "fixup?"

This reverts commit 1d7c5d4fb5b1bd31f5e0c07492aa8ed64c6822f3.

* Revert artifact

* Revert fixups

* Removing unused

* Reverting to upstream/main

---------

Co-authored-by: Addison Crump <addison.crump@cispa.de>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-14 13:45:38 +01:00
Dominik Maier
f9715392af
Try to solve corpus issue related to #2981 (#2982)
* Try to solve corpus issue related to #2981

* clippy
2025-02-14 02:07:14 +01:00
Dongjia "toka" Zhang
c53e51584b
Separate addr2line code from asan module (#2980) 2025-02-13 17:56:17 +01:00
7d1e4fd171 plotting + minia fix 2025-02-13 16:38:29 +01:00
Dongjia "toka" Zhang
7202e2a26e
Replace "cargo make" to "just" in md files (#2979)
* justify

* justify
2025-02-13 14:35:38 +01:00
Dongjia "toka" Zhang
b067435862
Align addresses before calling qemu.unmap in Snapshot module (#2978)
* alignment

* a
2025-02-13 14:17:48 +01:00
Romain Malmain
cb471a9282
Move to just (binary_only / full_system) (#2949)
* just port for binary only / systemmode fuzzers

* introduce just libraries, with pre-initialized variables and common recipes

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-13 12:42:38 +01:00
Dongjia "toka" Zhang
99e763ff7d
Fix libafl_targets macros for windows(#2976) 2025-02-13 12:18:04 +01:00
Dongjia "toka" Zhang
33db263260
Fix brk() handling for snapshot module (#2970)
* drop grown address

* this clippy lint literally makes 0 sense!

* i hate you rust

* mm

* don't use drop! add comments for why alignment is not necessary
2025-02-13 11:33:24 +01:00
Dominik Maier
bdcc0c56e4
Remove outdated comment in QEMU_Launcher (#2975) 2025-02-13 02:23:08 +01:00
EvianZhang
f3887697ba
Use expect instead of allow for clippy cast_precision_loss (#2974) 2025-02-13 01:55:05 +01:00
EvianZhang
5281b41abb
Add StatsD monitor (#2969)
* Add StatsD monitor

* Fix

* Use f64 instead of fractal
2025-02-13 01:15:27 +01:00
Dongjia "toka" Zhang
0736c56647
Add getter method to QemuMappingsViewer (#2973) 2025-02-12 18:34:24 +01:00
4d29735354 hash notify value, config fixes 2025-02-12 17:24:16 +01:00
558b464c1a all new benchmark scripts 2025-02-12 17:03:30 +01:00
Dongjia "toka" Zhang
cb3abf27a3
Add a functionality to see the current qemu mappings. (#2971)
* add

* a

* take qemu

* fix for fuzzers
2025-02-12 16:56:36 +01:00
WorksButNotTested
739156cb23
Add SnapshotModule to qemu_launcher (#2887)
* Add SnapshotModule to qemu_launcher

---------

Co-authored-by: Your Name <you@example.com>
2025-02-11 18:42:20 +01:00
WorksButNotTested
4cb4b6df77
Change qemu_cmin to use snapshots (#2939)
* Change qemu_cmin to use snapshots

* Use features to support both fork and snapshot modes

---------

Co-authored-by: Your Name <you@example.com>
2025-02-11 18:36:17 +01:00
Dominik Maier
b7fcfdd192
Change combine_monitors macro to be tuple_list of Monitors (#2963)
* Make Monitors tuple_list

* fix

* no_std

* unused

* more
2025-02-11 02:40:53 +01:00
Dominik Maier
c62c6a7ecc
Move statistics to monitors/stats (#2962)
* Move statistics back to monitors/stats

* More fun

* more stats

* more
2025-02-11 01:07:17 +01:00
dependabot[bot]
e5ae6c361f
Update strum requirement from 0.26.3 to 0.27.0 (#2959)
Updates the requirements on [strum](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/compare/v0.26.3...v0.27.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-10 21:22:43 +01:00
dependabot[bot]
a682deb31a
Update color-backtrace requirement from 0.6.1 to 0.7.0 (#2960)
Updates the requirements on [color-backtrace](https://github.com/athre0z/color-backtrace) to permit the latest version.
- [Changelog](https://github.com/athre0z/color-backtrace/blob/master/CHANGELOG.md)
- [Commits](https://github.com/athre0z/color-backtrace/compare/v0.6.1...v0.7.0)

---
updated-dependencies:
- dependency-name: color-backtrace
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-10 18:43:42 +01:00
dependabot[bot]
5ebb3913d8
Update strum_macros requirement from 0.26.4 to 0.27.0 (#2961)
---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-10 18:24:42 +01:00
EvianZhang
800b8b417d
Add global stats cache (#2956)
* Add global stats cache

* Fix

* Make clippy happy

* Merge manager files; Implement default for GlobalStats

* fmt code

* Use &Cow to avoid unnecessary clone

* Avoid push_str without cleanup
2025-02-10 16:11:36 +01:00
Dongjia "toka" Zhang
404227d1a3
Don't panic inside sig handler (#2958)
* fix_handler

* hello

* fmt

---------

Co-authored-by: Your Name <you@example.com>
2025-02-10 10:56:07 +01:00
Dongjia "toka" Zhang
2c741c8f38
Move to Just (#2952)
* move to just

* fuzzbench

* shell check

* version

* rme

* fixer

* fixing

* libpng friends

* pwd

* ps

* ps

* no fail fast.. for now

* windows

* l

* no powershell

* a

* fk

* fixer

* a

* Revert "fixer"

This reverts commit 76ae72d68686ead01ef914b658c5d8dac5aaee32.

* plzplz

* aaaa

* aa

* aa

* use absolute path, use LIBAFL_CC and LIBAFL_CXX

* why tabs????

* this job is not fun

* aa

* tmate debug

* disable cacheing

* del

* deldelg

* rename

* aaaa

* lol

* aaa

* lol

* lol

* 2nd tmate ...

* a

* lol

* lll

* shell ck

* please i'm about to cry

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2025-02-09 18:44:50 +01:00
Dongjia "toka" Zhang
89e470250f
Properly use in_handler (#2957)
* properly use it

* a

* a

* typo
2025-02-09 15:08:09 +01:00
Addison Crump
83d88546d3
Better type_eq (#2946)
* typeid that doesn't suck

* actually, that's not const!

* format, move phantomdata to alloc feature block

* a

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-08 14:12:12 +01:00
EvianZhang
abe955137f
Remove base-pattern for Monitor (#2953)
* Remove base-pattern for Monitor

* Fix runtime parameter for log_record

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-08 14:08:00 +01:00
EvianZhang
075fb0daa2
Fix clippy (#2954) 2025-02-08 13:10:55 +01:00
EvianZhang
ce01f4a427
Move start_time to ClientStatsManager (#2948)
* Move start_time to ClientStatsManager

* Remove unnessary &self

* Make clippy happy

* Make clippy happy
2025-02-07 16:39:39 +01:00
Dongjia "toka" Zhang
c03dfd9daf
Revert "Move to just (#2924)" (#2951)
This reverts commit 00582d849478ed4c2cd5ba5c7c9f46359555bd08.
2025-02-07 15:29:02 +01:00
Celian G.
64554d68bb
Small improvements for Qemu (#2938)
* Remove uneeded Executor trait from handlers functions + set inproc_qemu_crash_handler to pub

* Add some documentation for QemuHooks

---------

Co-authored-by: celian <cglenaz>
2025-02-07 13:28:11 +01:00
809f3b0d6a config changes 2025-02-07 12:43:42 +01:00
Dongjia "toka" Zhang
00582d8494
Move to just (#2924)
* move to just

* fuzzbench

* shell check

* version

* rme

* fixer

* fixing

* libpng friends

* pwd

* ps

* ps

* no fail fast.. for now

* windows

* l

* no powershell

* a

* fk

* fixer

* a

* Revert "fixer"

This reverts commit 76ae72d68686ead01ef914b658c5d8dac5aaee32.

* plzplz

---------

Co-authored-by: Your Name <you@example.com>
2025-02-07 11:26:33 +01:00
EvianZhang
45205d4dc6
Update MIGRATION (#2947) 2025-02-07 09:40:32 +01:00
EvianZhang
ab50afe8e4
Add statistics. Move client stats from Monitor to EventManager (#2940)
* Add statistics entity. Move client stats from Monitor to EventManager

* Fix warning in no_std

* Make rustfmt happy

* Fix more

* Fix with feature tcp_manager on

* Rename more introspection monitor; Remove unnecessary client_stats

* Fix unused import for no_std

* Fix unused import for prometheus_monitor feature on

* Cleanup docs
2025-02-06 16:58:24 +01:00
dependabot[bot]
0573bbb159
Update capstone requirement from 0.12.0 to 0.13.0 (#2930)
Updates the requirements on [capstone](https://github.com/capstone-rust/capstone-rs) to permit the latest version.
- [Release notes](https://github.com/capstone-rust/capstone-rs/releases)
- [Changelog](https://github.com/capstone-rust/capstone-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/capstone-rust/capstone-rs/compare/capstone-v0.12.0...capstone-v0.13.0)

---
updated-dependencies:
- dependency-name: capstone
  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-05 15:25:57 +01:00
fourdim
7b5b7d9ae4
Fix the python binding configuration (#2937) 2025-02-05 15:18:16 +01:00
Dongjia "toka" Zhang
c09feeba4e
Don't write pointers to the crash handlers at every execution (#2935)
* make it safe

* aa

* forgot to put it back

* stateful

* comment

* lol

* aa

* aa

* aa

* win

* lol

* lol

* a

* a

* i hate rust

---------

Co-authored-by: Your Name <you@example.com>
2025-02-05 14:00:09 +01:00
Romain Malmain
8398f8f99a
Qemu signal refactoring (#2920)
* qemu signal refactoring

* udpate qemu

* clippy, moving things around

* update bindings

* nostd

* cfg

* fmt

* nostd

* clippy

* fmt

* aaa

* windowsssssss

* systemmode

* reimport fix

* remove llmp from replay mode

* lol

* fixer

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-04 14:43:26 +01:00
Dongjia "toka" Zhang
defb475d28
Fix EdgeCoverageModuleBuilder (#2931) 2025-02-04 14:34:11 +01:00
EvianZhang
a27da1b8be
Change Monitor API for more flexibility (#2927)
* Change Monitor API for more flexibility

* Make clippy happy

* Fix broken doc link
2025-02-04 13:45:28 +01:00
Dhanvith Nayak
72986fc129
Deduplicate OnDisk Corpus (#2827)
* testcase name logic

* implement locking

* implement logic for removing testcase

* minor modifications

* minor modifications to remove_testcase()

* extract generate_name() from trait Input (broken)

* Revert "extract generate_name() from trait Input (broken)"

This reverts commit 9e217be2810a8c33970846cdd380f542975cc05b.

* fix ci errors

* remove CorpusId from generate_name() calls

* toml formatting

* write from file instead of fs

* fmt and clippy

* fix windows clippy

* handle renaming of testcase

* fix failing cmplog test

* overwrite lockfile on remove testcase

* format

* bring back corpus id in generate_name

* missed windows executors hook

* fix failing tests

* some more errors

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-02-04 07:41:00 +01:00
Dominik Maier
5bd6a6f754
Revert "QASan: remove chunk_struct (#2899)" (#2928)
This reverts commit ba0da5121b54c89d5ad3c06189959afbbeb64d23.
2025-02-03 14:47:13 +01:00
Valentin Huber
500e01816d
Rename BoolMutator to BoolInvertMutator (#2929)
* Rename BoolMutator to BoolInvertMutator

* Fix name of BoolInvertMutator
2025-02-03 13:33:39 +01:00
Valentin Huber
6243b684f8
Introduce BoolMutator (#2926) 2025-02-01 21:24:24 +01:00