3576 Commits

Author SHA1 Message Date
bernhl
c9531aa242
Remove unecessary HasTargetBytes constraint (#2852) 2025-01-16 10:51:18 +01:00
Dongjia "toka" Zhang
cfe051e5d9
Remove UsesState from libafl-fuzz (#2849) 2025-01-15 20:18:24 +01:00
Dongjia "toka" Zhang
9fd5af76c3
Highlight contributing.md (#2850) 2025-01-15 19:08:30 +01:00
Dongjia "toka" Zhang
435ca021cc
No uses for EventManager (#2831)
* the first step of the last step

* wip

* 99% done

* 99.9% done

* 99.99

* Hello from windows

* aaa

* 99.999

* aa

* 1

* 2

* 3

* 4

* 5

* plz

* plzplzplz

---------

Co-authored-by: Your Name <you@example.com>
2025-01-15 16:56:40 +01:00
Valentin Huber
ba09cb0706
Add OnDiskJsonAggregateMonitor (#2845)
* Add OnDiskJsonAggregateMonitor

* Fix formatting

* Remove unnecessary trait bounds

* Remove unnecessary import restriction

* Remove unnecessary imports

* fix formatting
2025-01-15 13:40:26 +01:00
Dongjia "toka" Zhang
dc39aadb05
Revert "Don't fail fast for now" (#2844)
* Revert "Don't fail fast for now (#2843)"

This reverts commit 332ddf46554336eeb538a42accbc7c0a11b03f0f.

* aa
2025-01-15 11:26:41 +01:00
Dongjia "toka" Zhang
332ddf4655
Don't fail fast for now (#2843) 2025-01-15 10:40:40 +01:00
Sharad Khanna
00c6970d24
Fix libafl_targets cmplog linking (#2840) 2025-01-14 21:04:44 +01:00
Dongjia "toka" Zhang
cd19a72d03
Put debugging.md for better visibility (#2839) 2025-01-14 17:37:55 +00:00
jejuisland87654
a844e5e07d
Remove unecessary default features for sub crates using LibAFL (#2836)
* remove unecessary default features

* fix format
2025-01-14 16:11:43 +00:00
Romain Malmain
a45e44764f
Remove UsesInput from libafl qemu (#2832)
* remove UsesInput from libafl_qemu

* Insert I bound instead of ugly Corpus::Input stuff

* Uses a C generic for Commands

* adapt nyx api to new generics

* add qemu linux fuzzers to CI for building.
2025-01-14 10:24:28 +01:00
s1341
8adb2aa7b5
libafl_ar: fix error message (#2833) 2025-01-14 10:34:52 +02:00
Romain Malmain
d8460d14a2
More Nyx hypercalls supported in libafl qemu. add tests for filters. (#2825)
* more nyx hypercalls implemented, among them:
- panic hypercall
- range filtering hypercall

* fixed some nyx hypercalls behavior.

* added generic read / write to qemu memory

* port linux kernel example to also have nyx API, add better filtering as well.

* make nyx api structs volatile to avoid optimization issues

* Introduce a method create a Vec in place, using a closure.

* use new vec_init function in relevant places.

* removed unused unsafe keywork

* add more allocated memory r/w callbacks

* add more safety notes

* move emulator hooks to separate struct

* update QEMU version
2025-01-13 17:32:23 +01:00
Dominik Maier
02566b33cd
Make Stats stage send stats again (#2830)
* Make Stats stage send stats again

* re-remove stats mod

* clp, fmt

* clip
2025-01-13 15:06:26 +00:00
Dongjia "toka" Zhang
fd06e5ced0
Remove CustomBufHandlers (#2829)
* rem

* fix

* fixer
2025-01-13 16:00:41 +01:00
Dongjia "toka" Zhang
aa0391ef8d
No Uses* from executor (#2766)
* first step

* wip

* lol

* making progress, slowly

* add

* a bit more

* progress

* 80%done

* 90% done

* done from linux

* Hello from windows

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* Hello from windows

* 9

* 10

* 11

* 11

* 12

* 13

* aa

* fixer

* a

* oops

---------

Co-authored-by: Your Name <you@example.com>
2025-01-11 15:25:15 +01:00
Marco C.
ca647f0c30
CI check-md-links fix (#2824)
Use ubuntu-22.04 and restore the action instead of the script
2025-01-09 12:04:01 +01:00
cube0x8
1a9e25145d
Fix snapshot reset function when brk shrunk below the snapshotted value (#2812)
* added change_brk function for correctly handling SYS_brk

* we need to update h.brk with the new brk_val

* map back pages if brk shrunk below the snapshotted value

* fmt and clippy

* use GuestAddr instead of u64

---------

Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2025-01-09 00:30:39 +01:00
Dominik Maier
f7745155c9
Upgrade all Windows crates (#2823)
* Upgrade all win crates

* wtf

* fix
2025-01-09 00:25:33 +01:00
dependabot[bot]
fbd76721a1
Update prometheus-client requirement from 0.22.3 to 0.23.0 (#2819)
Updates the requirements on [prometheus-client](https://github.com/prometheus/client_rust) to permit the latest version.
- [Release notes](https://github.com/prometheus/client_rust/releases)
- [Changelog](https://github.com/prometheus/client_rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_rust/compare/v0.22.3...v0.23.0)

---
updated-dependencies:
- dependency-name: prometheus-client
  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-01-08 13:42:46 +01:00
dependabot[bot]
e44c23b71c
Update windows-result requirement from 0.2.0 to 0.3.0 (#2822)
---
updated-dependencies:
- dependency-name: windows-result
  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-01-08 13:42:25 +01:00
Valentin Huber
9b8b552f27
Make more int mutator types public (#2821) 2025-01-07 17:02:13 +01:00
Dominik Maier
719a3c0f07
Continue loading inputs even if some fail to deserialize (#2820)
* Continue loading inputs even if some fail to deserialize

* fmt

* fix
2025-01-07 15:07:46 +01:00
Romain Malmain
9f8f47233c
Add migration notes for libafl qemu's Emulator configuration changes (#2818)
* add migration notes for libafl qemu latest changes
2025-01-06 17:34:45 +01:00
Romain Malmain
17336dcf57
Nyx hypercall API support for LibAFL QEMU (#2801)
* Nyx hypercall API support

* fix linux kernel fuzzer

* hash_me -> hash_64_fast

* fix multiple bug in kernel harness

* do not check libmozjpeg's C files format.
2025-01-06 16:58:57 +01:00
cc2a2e6422 fix edge fuzzing 2025-01-06 15:52:48 +01:00
Romain Malmain
7c8708d4b1
Refactor of Qemu configuration (#2707)
* Qemu config refactoring.

* QEMU error refactoring.

* Single QEMU init function.

* Light refactor of EmulatorModules.

* Qemu is now a parameter to EmulatorModule callbacks and most function hooks.

* EmulatorModules is initialized before QEMU is initialized.

* refactor asan and asanguest modules to avoid custom init of QEMU and use the module interface instead.

* asan fixed size accesses working with generics.

* use pre_syscall_* and post_syscall_* everywhere for consistency.

* adapt qemu_launcher example to fully work with Emulator, since Qemu must now be initialized by Emulator.

* start writing Emulator / EmulatorBuilder / QemuConfig doc.

* fix broken intel pt doc.
2025-01-06 15:04:40 +01:00
WorksButNotTested
5a3cbc18a7
Changes to use InMemoryCorpus (#2816)
Co-authored-by: Your Name <you@example.com>
2025-01-06 11:22:08 +01:00
Dominik Maier
742773bc17
Add BoolValueFeedback (#2815)
* Add BoolValueFeedback

* No_std

* clippy

* Fix tests

* More clip

* fix no_std tests
2025-01-06 04:25:36 +01:00
Dominik Maier
4b4a22bc44
Cargo Format (#2814)
* Initial commit: ValueBloomFeedback

* Add test, fix feedback

* Remove unneeded feedback

* fix

* more commit

* Cargo fmt

* fmt
2025-01-06 02:11:47 +01:00
Dominik Maier
2a3f5a5942
Add Bloomfilter-based Feedback for Values (#2813)
* Initial commit: ValueBloomFeedback

* Add test, fix feedback

* Remove unneeded feedback

* fix

* more commit
2025-01-06 02:03:18 +01:00
Dominik Maier
6e921cf870
More clippy (#2811)
* More clippy

* clip
2025-01-05 15:56:27 +01:00
Dominik Maier
b3b216386e
Another clippy bugfix (#2806) 2025-01-03 16:05:02 +01:00
WorksButNotTested
da55e70aa3
qemu_launcher: Fix command line parsing of ranges (#2804)
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2025-01-03 16:04:41 +01:00
Dominik Maier
d39ded5b29
Fix and/or mute more clippy lints, deprecation warnings in Pyo3 (#2805) 2025-01-03 15:17:46 +01:00
jejuisland87654
7543a54d0d
Add dynamic frida runtime list called FridaRuntimeVec (#2799)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2025-01-02 16:33:47 +01:00
henri2h
187e06cb11
Specify that InProcessForkExecutor should abort on panic (#2803)
* Revert "New year new clippy (#2797)"

This reverts commit deb76555b75ca2ccac83b83a6db1a276c07080b5.

* Mention that program should panic when using InProcessForkExecutor

* Reapply "New year new clippy (#2797)"

This reverts commit 529213ef6334fc18e1898f3cfbd8bed24c312522.
2025-01-02 23:57:57 +09:00
Dominik Maier
deb76555b7
New year new clippy (#2797)
* New year new clippy

* More clipy

* fix
2025-01-01 20:57:43 +01:00
AshrafIbrahim03
92db678995
Added expect error message to TimeFeedback where there used to be an unwrap (#2777)
* Added expect error message to TimeFeedback where there used to be an unwrap

* Changed error message handling

* fixed cargo clippy

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-12-30 20:47:04 +01:00
Mehtab Zafar
8cd069cf3e
Optimize event serialization with pre-allocated buffer (#2794)
* Optimize event serialization with pre-allocated buffer

- Added event_buffer field to LlmpEventManager
- Used to_slice instead of to_allocvec
- Pre-allocated buffer size is 4KB

Fixes #1082

* Fallback to to_allocvec in case of event_buffer overflow

Also combined the shared logic between compressed & uncompressed event
firing while keeping the same behavior

* Made the initial event_buffer size to a const

Also removed the unnecessary event_buffer.clear(), since we are already
resizing it
2024-12-30 20:45:48 +01:00
David CARLIER
930951827f
bolts limit ashmem concept to Linux/Android only. (#2795) 2024-12-30 16:02:52 +01:00
Valentin Huber
d8ec991b48
Add bloom filter for duplicate execution of the same inputs (#2771)
* fixing empty multipart name

* fixing clippy

* New rules for the contributing (#2752)

* Rules

* more

* aa

* Improve Flexibility of DumpToDiskStage (#2753)

* fixing empty multipart name

* fixing clippy

* improve flexibility of DumpToDiskStage

* adding note to MIGRATION.md

* Update bindgen requirement from 0.70.1 to 0.71.1 (#2756)

Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) to permit the latest version.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases)
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.70.1...v0.71.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* No Use* from stages (#2745)

* no from stage

* fixer

* doc fix

* how was this working????

* more fixes

* delete more

* rq

* cargo-fuzz

* m

* aa

* Update CONTRIBUTING.md MIGRATION.md (#2762)

* No Uses* from `fuzzer` (#2761)

* go

* fixing stuf

* hello from windows

* more

* lolg

* lolf

* fix

* a

---------

Co-authored-by: Your Name <you@example.com>

* Remove useless cfgs (#2764)

* Link libresolv on all Apple OSs (#2767)

* Somewhat ugly CI fix... (#2768)

* Maybe fix CI

* does this help?

* Very dirty 'fix'

* Add Input Types and Mutators for Numeric Types (#2760)

* fixing empty multipart name

* fixing clippy

* New rules for the contributing (#2752)

* Rules

* more

* aa

* Improve Flexibility of DumpToDiskStage (#2753)

* fixing empty multipart name

* fixing clippy

* improve flexibility of DumpToDiskStage

* adding note to MIGRATION.md

* Introduce WrappingMutator

* introducing mutators for int types

* fixing no_std

* random fixes

* Add hash derivation for WrappingInput

* Revert fixes that broke things

* Derive Default on WrappingInput

* Add unit tests

* Fixes according to code review

* introduce mappable ValueInputs

* remove unnecessary comments

* Elide more lifetimes

* remove dead code

* simplify hashing

* improve docs

* improve randomization

* rename method to align with standard library

* add typedefs for int types for ValueMutRefInput

* rename test

* add safety notice to trait function

* improve randomize performance for i128/u128

* rename macro

* improve comment

* actually check return values in test

* make 128 bit int randomize even more efficient

* shifting signed values

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>

* Add HashMutator

* Fix docs

* Fix docs again

* introducing bloom filter

* fix tests

* Implement evaluate_filtered

* Add macros to libafl_bolts tuples for mapping and merging types (#2788)

* Add macros

* Use the macros for havoc_mutations

* Fix docs

* improve merge_tuple_list_type to accept n items

* libafl_cc: Automatically find llvm_ar path (#2790)

* imemory_ondisk: Don't fail write under any circumstances if locking is disabled (#2791)

* imemory_ondisk: Don't fail write under any circumstances if locking is disabled

* fmt

* inmemory_ondisk: Add a log message on failure

* clippy'

* micro optimization

* Revert changes to global Cargo.toml

* Hide std-dependent dependency behind std feature

* Fix example fuzzer

* Rename constructor for filtered fuzzer

* Reorder generics alphabetically

* Rename HashingMutator, add note to MutationResult about filtered fuzzers

* Improve StdFuzzer according to feedback

* rename hashing mutator

* Fix english in comment

* Cleanup of old PRs that break the CI

* Fix more CI bugs

* Code cleanup

* Remove unnecessary comments

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Sharad Khanna <sharad@mineo333.dev>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: s1341 <s1341@users.noreply.github.com>
2024-12-28 15:22:31 +01:00
s1341
2a79ee5b4f
frida: Deduplicate with IfElseRuntime (#2792)
* frida: Deduplicate with IfElseRuntime

* clippy'

* get rid of cfg

* fmt

* documentation

* fix lint

* fix lint

* debug: add tmate

* debug: add tmate

* frida_windows_gdiplus: move to mimalloc on windows

* remove tmate
2024-12-25 14:42:54 +02:00
s1341
9b4cd51c63
imemory_ondisk: Don't fail write under any circumstances if locking is disabled (#2791)
* imemory_ondisk: Don't fail write under any circumstances if locking is disabled

* fmt

* inmemory_ondisk: Add a log message on failure

* clippy'

* micro optimization
2024-12-24 14:22:01 +01:00
s1341
6927d61a89
libafl_cc: Automatically find llvm_ar path (#2790) 2024-12-24 11:00:44 +02:00
Valentin Huber
54202c3ef3
Add macros to libafl_bolts tuples for mapping and merging types (#2788)
* Add macros

* Use the macros for havoc_mutations

* Fix docs

* improve merge_tuple_list_type to accept n items
2024-12-23 13:25:14 +01:00
Valentin Huber
03f7fc93ad
Fix empty multipart (#2789) 2024-12-23 11:39:51 +01:00
Valentin Huber
25386bfb5f
Use #[expect(…)] instead of #[allow(…)], remove unnecessary allows (#2784)
* Use expect instead of allow, remove unnecessary allows

* Remove more whitelist lint warnings

* tranisitioning more subprojects

* Re-add some necessary allows

* Re-add more required allows

* Some more windows clippy fixes

* Re-add more whitelist items for expect

* More clippy whitelist fun

* Reset changes to generated files

* Reset generated files to correct version

* Move libafl_concolic to expect instead of allow

* Move libafl_frida to expect from allow

* Move libafl_libfuzzer to expect from allow

* Remove more whitelist items for macOS

* Fix unknown clippy allow

* Remove more unnecessary allow statements

* moving fuzzers

* Remove mistakenly added subdirs

* fixing imports

* Remove more unnecessary whitelisted lints

* Fix test for /home/ubuntu/LibAFL/fuzzers/inprocess/libfuzzer_libpng_accounting

* More clippy improvements for libafl_qemu

* fmt

* Some pedantic options

* Fix more stuff

* Remove Little-CMS again

* Add note to static_mut_refs

* Reset the changed testing routine since it is unnecessary
2024-12-20 16:55:35 +01:00
Celian G.
09950ccc34
Update last found time when evaluating an input (#2782)
Co-authored-by: celian <cglenaz>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-12-19 14:51:59 +01:00
Valentin Huber
5d70216cc7
Remove MutVecInput and MappedInput in Favour of Impls on References (#2783)
* Remove MutVecInput and MappedInput

* Rename mapping mutators

* Update MIGRATION.md

* Fix test in docs

* Rename mapping mutators mappers

* Fix MIGRATION.md

* Fix docs link
2024-12-19 14:35:17 +01:00