1400 Commits

Author SHA1 Message Date
9bbc5e7c78 Merge branch 'fret_141' into fret_153 2025-07-28 12:03:09 +00:00
Ch4r1l3
9a202acfed
fix fuzzbench cmplog ForkServer builder and rtn_extend_encoding buffer copy overflow (#3270) 2025-05-24 18:02:43 +02:00
lazymio
18d46bed29
Allow InputLocation::Stdin to specify a file name (#3265)
* Allow filename for InputLocation::StdIn

* clippy

* format code

* rename to input_file

* fix

* changes left out
2025-05-23 16:31:41 +02:00
Dongjia "toka" Zhang
fa8fd63eb3
Fix heartbeat (#3262)
* Update fastbloom requirement from 0.9.0 to 0.10.0

---
updated-dependencies:
- dependency-name: fastbloom
  dependency-version: 0.9.0
  dependency-type: direct:production
...

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

* manual upd

* dfasf

* put it back

* more

* fixer

* ci

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 18:14:16 +02:00
dependabot[bot]
6cd6600e7e
Update fastbloom requirement from 0.9.0 to 0.10.0 (#3213)
* Update fastbloom requirement from 0.9.0 to 0.10.0

---
updated-dependencies:
- dependency-name: fastbloom
  dependency-version: 0.9.0
  dependency-type: direct:production
...

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

* manual upd

* dfasf

* put it back

* more

---------

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-05-22 16:49:40 +02:00
EvianZhang
0015254071
Use ShMemProvider for forkserver (#3249)
* Add android CI

* update

* Move together

* Use shmem for forkserver several pointers

* Fix clippy

* Fix

* Make shmem's into_raw private

* Log error message in forkserver

* Fix clippy

* Fix clippy

---------

Co-authored-by: mio <mio@lazym.io>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-05-19 12:17:53 +02:00
lazymio
90223028fd
Remove spurious logs (#3246) 2025-05-19 11:29:06 +02:00
lazymio
0e9dfd62ee
LetForkserverExecutor being Send (#3242)
* Implement `Send` for `Shm`

it is safe because we take the ownership of the inner map pointer. Only potential
violation is deref the underlying pointer but that’s already unsafe. Therefore,
the properties of Send still hold within the safe world.

* Bump 1.87

* use std::io::pipe so that they are `Send`

* clippy

* upgrade

* Avoid phantomdata to make ForkserverExecutor !Send

* Missing gates

* Fix nostd

* bump in Dockerfile

* use dtolnay/rust-toolchain@stable instead

* setup latest toolchain on non Linux

* Fix typo
2025-05-17 14:45:08 +02:00
lazymio
ba93e9d2ea
Add support for AFL_LLVM/GCC_ONLY_FSRV (#3245)
* Add support for AFL_LLVM/GCC_ONLY_FSRV

* clippy
2025-05-17 13:56:28 +02:00
lazymio
ddd0930e67
Support binding to a single core for ForkserverExecutor (#3236)
* support bind to core for ForkserverExecutor

* fix for non-fork platforms

* clippy

* Remove redundant env
2025-05-17 13:55:44 +02:00
lazymio
8c0ee046cd
Implement HasBytesConverter for NopFuzzer (#3239) 2025-05-16 13:31:15 +02:00
Dominik Maier
8b0fc8ca73
Forkserver: Add __AFL_SHM_FUZZ_MAP_SIZE, clean up env variables (#3235)
* Clean up env variables, add env for map size

* Bring back lockfiles

* fix

* PAGE_SIZE->MAP_SIZE
2025-05-16 12:15:17 +02:00
Dongjia "toka" Zhang
626812a7ce
Remove nightly feature from libafl_qemu (#3231)
* ci_splitter

* clpo

* FIX

* aa

* no nightly qemu
2025-05-15 14:29:44 +02:00
Dominik Maier
b138c528ec
Add doc links to newly added load_callback return err (#3222) 2025-05-14 09:41:26 +02:00
Aarnav
c44802cf02
Make input loading fallible in SyncFromDiskStage (#3195)
* Make input loading fallible in SyncFromDiskStage

* fmt

* Add InvalidInput in Error enum and skip the Input in SyncFromDiskStage if it is encountered

* sync: remove file if error on loading in SyncFromDiskStage

* add reason to Error::InvalidInput

* sync make failure log a warning. clippy, fmt

* typo

* fmt

* fmt

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2025-05-14 08:39:25 +02:00
Dominik Maier
fef129e23c
Conform AFL struct casing to codebase/rust (#3221)
* Conform AFL struct casing to codebase/rust

* Actually, Aflpp looks better
2025-05-13 17:56:58 +02:00
Dominik Maier
c606ac106a
Add Lua mutator, a mutator to write mutations in Lua (#3220)
* Add Lua mutator, a mutator using Lua

* lua?

* fix name

* move lints about

* Testing more fix

* More fix?

* macros?

* macros

* more fmt

* fix doc?
2025-05-13 17:36:28 +02:00
lazymio
f901c2085d
Support capturing stdout/stderr for ForkserverExecutor and code clean (#3216)
* Support capture stdout/stderr for ForkserverExecutor

Reduce code duplication for ForkserverExecutor and CommandExecutor

* use memfd_create from nix for macos and remove debug print

* resolve macos issue

* clippy

* fix macos again

* fix docs

* fix imports

* format code

* fix docs again

* fix sample

* fix another wrong import

* restore cargo.lock

* add an inner for target args

* fix and docs

* fix

* rename to ChildArgs and ChildArgsInner

* revert forkserver_simple

* allow debug child with observers

* fmt

* std marker

* fix

* move implementation to observers

* implement serde

* Add a forkserver_capture_stdout

* renaming

* fix

* fmt

* fix CommandExecutor

* add a test to check capture

* fix imports

* clippy

* fix sample

* update sample to make it closer to real usecase

* also CommandExecutor for sample

* format

* add forkserver_capture_stdout to CI

* fix doc

* accidentally remove

* fix non_std

* fix for windows

* remove useless lint

* remove spurious fuzzer

* fix for windows again

* fix imports

* fix doc sample

* fix docs

* fix sample

* fmt

* clippy

* clippy again

* fix msrv

* have cargo.lock for sample fuzzer

* avoid double read

* fix fsrv and cmd

* fix sample

* fix docs for windows

* fix typo

* clippy again

* fix exec

* typo

* clippy

* update

* fix nyx executor

* cliipy

* fmt again

* last clippy

* clippy
2025-05-13 16:08:27 +02:00
Dominik Maier
24c31943f3
Update libafl-sugar with latest bells and whistles (#3209)
* Update sugar to new things

* Fixes

* tiny

* fix qemu

* Fix cmplog

* taplo fmt

* Fix cmplog forkserver sugar, clippy

* clip

* clip
2025-05-13 03:06:00 +02:00
Dongjia "toka" Zhang
390008e1d5
fix qemu launcher bug (#3206)
* no more shellscript

* metadatas

* clp

* clippo

* fix bug

* taplo

* Merge branch 'qemu_launcher_insane' of github.com:AFLplusplus/LibAFL into qemu_launcher_insane

* fix wrong code
2025-05-12 15:12:20 +02:00
Dongjia "toka" Zhang
60c05396da
Remove scripts/test_fuzzer.sh, Rewrite in Rust (#3205)
* no more shellscript

* metadatas

* clp

* clippo

* this language breaks everyday

* stop

* 2404?

* purge rust

* everything is broken

* test

* ci dead

* aa

* aa

* remove broken shit

* remove broken shit

* broken shit

* a

* lol

* aaaaa

* AI fix

* aa

* aaa

* yes?

* a

* FK

* tmate

* wtf who tf did this shit????

* aa

* useless printlnt

* for system too

* unset first
2025-05-12 13:25:04 +02:00
Dongjia "toka" Zhang
d8f8640982
Always show user monitor in SimpleMonitor (#3202)
* *recursion* is not proper

* user monitor on

* api changer

* no submodule anymore
2025-05-07 18:17:58 +02:00
Dongjia "toka" Zhang
f33376f1cd
Change error message in restarting manager a bit (#3201)
* *recursion* is not proper

* say that it's a bug
2025-05-07 13:55:52 +02:00
EvianZhang
6dd52722de
Add cmplog shared memory mapping method for forkserver (#3200) 2025-05-07 10:44:44 +02:00
WorksButNotTested
3b6a350b24
Change formatting for durations (#3198) 2025-05-06 17:24:30 +02:00
Dongjia "toka" Zhang
feedca9de8
Enable errors backtrace always (#3199) 2025-05-06 15:08:24 +02:00
Ivan Gulakov
1f91420cd3
Add disable/enable to Corpus (#3193)
* Add enable and disable methods for Corpus

* Add insert_inner_with_id to fix disable/enable & test

Since we need to insert an 'existing' testcase with a certain id, let's
use a private inner function for it.

It's not the most posh way to keep consistency, but as showed in the
test it works 'good enough'.

* Implement disable/enable for libafl_libfuzzer/corpus

* fix clippy issues and fix cfg[not"corpus_btreemap"]

* Move enable/disable from Corpus to a trait

* Rename HasCorpusEnablementOperations to EnableDisableCorpus

Unless we come up with a better idea. Naming is hard.

* fmt the changes
2025-05-05 17:55:55 -07:00
EvianZhang
c0e32cdbba
Refactor to new forkserver (#3183)
* Refactor to new forkserver

* Fix fuzzer examples and delete forkserver.c

* Fix clippy and doc warnings

* Fix symbol error

* Format Cargo.toml; Fix wrong doc link

* Fix silly typo.

* Rename ForkServer to Forkserver to make it more consistent

* Fix build.rs

* Merge StdForkserverParent and PersistentForkserverParent since the forkserver parent has not idea of whether it is persistent and the persistent version can handle the non-persistent version

* Fix clippy

* Do not take ownership for last_child_pid since it may be in persistent mode
2025-05-05 16:45:12 +08:00
Henry Chu
4ae6f34ab4
Split nautilus Python dependencies into separate feature (#3191)
* Split nautilus Python dependencies into separate feature

* Fix Nautilus imports order and tidy formatting

* Refactor tree generation to reduce code duplication

* Make plain_or_script_rule mutable
2025-05-05 00:11:20 -07:00
Henry Chu
b9f1c51531
Remove unnecessary trait bounds in NautilusSpliceMutator (#3190)
* Remove unnecessary triat bounds in NautilusSpliceMutator

* Remove unused HasCorpus import
2025-05-03 02:37:33 -07:00
forky2
c3475cd577
Qemu tmin (#3118)
* Start on qemu_tmin

* WIP

* qemu_tmin working for single testcase.
Also some comment improvements.

* Add env_logger to baby_fuzzer

* Remove old reference.

* Added comment doc for qemu_tmin.

* Slight reorder for parallelisation

* Finished single-thread qemu_tmin

* Finishing touches to single thread version.

* A pre_commit.sh change I didn't notice.

* Duplicate to attempt multi-threaded version

* Fix taplo whine.
Mark "fork" mode as broken.

* Launcher for parallelisation implemented, but for one core.

* Running in parallel. Now need tidy up.

* Parallel version complete.

* Add comment

* Merged single-core/multi-core qemu_tmin into one crate

* Removed forkexecutor mode.

* Precommit fixes

* Add qemu_tmin to build_and_test.yml

* Clippy fixes

* Change tmin test cores to 0.
2025-04-25 23:08:18 +02:00
Dongjia "toka" Zhang
95f7c155bd
Make fuzzer hold testcase bytes converter (#3127)
* add

* fixing

* done

* fix

* a

* no std

* mm

* aaa

* fix

* mm

* please stop

* please stop

* please stop

* Just

* aaaaa

* aaa

* plz stop

* aaa

* mmm

* aaa

* AAAAAAAAAAAAAA

* a bit faster CI?

* win

* wtf are these garbages..?

* no cache?

* ???

* always

* ?/

* aa

* aa

* glib

* glib

* pixman

* AAA

* AA

* unicorn

* unicron

* nyx
2025-04-24 19:34:24 +02:00
Dongjia "toka" Zhang
d0acc3efc2
Add doc (#3171) 2025-04-23 16:04:35 +02:00
Dongjia "toka" Zhang
03a49fa5a8
Make InputFilter public (#3170) 2025-04-23 15:06:52 +02:00
Nathaniel Bennett
a198b33096
Fix 0/0 stability feedback for libafl_nyx (#3162) 2025-04-15 14:58:18 +02:00
lazymio
eb06d4a757
Default to use SIMD acceleration map feedbacks (#3157)
* Feature renam and clean urls

* Fix features renaming

* wip: working libafl_bolts simd

* initial default SimdMapFeedback implementation

* clippy

* fix imports

* clippy again

* fmt

* also generalize simplify_map

* clippy again

* fix no_std

* fmt

* fix import for no-std

* fmt

* fixes

* Fix fuzzers

* Fix cargo docs

* better bounds

* fmt

* Fix fuzzer

* Accidentally commit the file
2025-04-14 12:29:51 +02:00
Dongjia "toka" Zhang
dd0bcba103
Fix #3155 (#3156)
* robot

* do ne

* FIXER

* fixer

* plz

* LOL

* FIXER
2025-04-12 22:39:32 +02:00
Francesco Cirillo
796ce20cd8
ScheduledMutator Fix with_max_stack_pow (#3148)
* ScheduledMutator Fix with_max_stack_pow

* Renamed StdScheduledMutator to HavocScheduledMutator

* Added SingleChoiceScheduledMutator

* Changed HavocScheduledMutator description

* Added rename in migration

* Missed renaming

* cargo fmt fix

* cargo fmt fix 2

* Clippy duplicate code and safer test

* cargo fmt fix 3

* Removed my hallucination
2025-04-12 20:35:31 +02:00
Dongjia "toka" Zhang
7ea4070338
Fix TUI (#3151) 2025-04-10 18:27:39 +02:00
Dongjia "toka" Zhang
d1f566c441
Remove "global" prefix from TUI (#3146) 2025-04-09 11:22:18 +02:00
Dongjia "toka" Zhang
8683c68e59
Fix #3133 #2755 (#3143)
* incroyable

* lolg
2025-04-08 22:20:17 +02:00
Romain Malmain
fb8939eefc
Fix fork bug in libafl qemu (#3109)
* fix fork bug

* lol

* fix

* lower it; we're gonna move from this anyway

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-04-08 19:08:40 +02:00
lazymio
bfc55c98a7
Enable SIMD acceleration for stable rust toolchain (#3140)
* initial support

* migrate SAND

* Update comments

* Fmt

* Clippy

* Fix missing docs

* fmt fix

* clippy again

* weird clippy

* clippy

* Fix

* Allow new SIMDMapFeedback

* Fix features

* Fix features again

* Allow custom names

* Fix imports

* Fix imports

* Fmt

* Fix missing implementations

* Requires std to simd

* DO NOT Overwrite names

* Format toml

* no_std fix

* fmt

* Use SIMDMapFeedback for libfuzzer_libpng

* no_std (?)

* clippy

* fix no_alloc

* allow cargo docs to enable all features

* clippy again

* Fix missing import

* Fix cargo docs

* Naive simplify_map doesn't require wide

* Accidentally commit the file

* more fine grined features

* Fix clippy.ps1

* Fix wide256 for simplify_map

* Renaming to SimdMapFeedback

* Dynamic dispatch

* Fix naming

* Move to simd.rs

* clippy

* clippy

* dispatch earlier

* Fix clippy

* clippy

* clippy

* Revert previous change

* Fix comments

* Update comments for std_covmap_is_interesting

* remove SIMD and choose fastest implementation based on target_arch

* no longer nightly imports

* Fix

* upstream benchmark code

* Fix docs

* Fix libfuzzer_libpng

* Disable clippy for benchmark

* clippy

* clippy again

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-04-08 19:08:16 +02:00
Dongjia "toka" Zhang
373fe03633
Use HashMap to manage ClientStat, Fix #3133 (#3142)
* fix

* lol

* lol

* clp fixer

* clp fixer

* revert cargo.toml
2025-04-08 19:06:20 +02:00
lazymio
fa8a576ef0
Introduce HasAflStyleTargetArguments and restore parse_afl_cmdline for CommandExecutor (#3125)
* Introduce HasAflStyleTargetArguments and restore parse_afl_cmdline for CommandExecutor

* clippy

* Fix imports

* Move envs to the shared trait

* Move to a standalone file

* Format

* Gate via std and unix

* Fix

* clippy

* move InputLocation to afl_args

* clippy

* Fix

* fmt

* Fix more

* Shall last missing

* Rename to AflTargetArgs

* Fmt

* move AflTargetArgs to libafl_bolts and adapt CMainArgsBuilder to use it

* use_stdin is no longer needed

* leaveout

* Fix again

* Renaming

* Leave out lib.rs

* Leave out fmt

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-04-08 13:19:44 +02:00
dependabot[bot]
8426ba5d58
Update crossterm requirement from 0.28.1 to 0.29.0 (#3135)
---
updated-dependencies:
- dependency-name: crossterm
  dependency-version: 0.29.0
  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-04-07 16:12:54 +02:00
lazymio
a1b090609d
Migrate NopExecutor used in tests to ConstExecutor (#3129) 2025-04-04 14:55:33 +02:00
lazymio
caf12a647c
NopStage::should_restart shall return false (#3128) 2025-04-04 07:50:58 +02:00
lazymio
db7ce822dc
QoL Types and Changes (#3124)
* Nop executor

* Qol types

* no stage

* A new() for NopStage

* clippy

* clippy again

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-04-03 17:25:11 +02:00
lazymio
0fdfa1d7a1
Add back executions to Testcase (#3115)
* Add back executions to Testcase

* Small clippy

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-04-03 17:24:38 +02:00