3586 Commits

Author SHA1 Message Date
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
Ivan Gulakov
4763ada075
Use is_multiple_of instead of % == 0 (#3244)
I was reading the changelog of 1.87 and noticed that it's stable now.
Realised that I saw a todo in the code :)

https://releases.rs/docs/1.87.0/
2025-05-17 00:13:31 +02:00
WorksButNotTested
bb24fb555b
Update Dockerfile (#3243) 2025-05-16 18:31:17 +02:00
lazymio
be74774463
Use Arc<()> to ref-counting InputFile (#3240)
* clean lib_bolts::fs

* clippy

* avoid racy
2025-05-16 17:06:23 +02:00
Dongjia "toka" Zhang
7a9f46b9fb
Remove nightly from CI. (#3232)
* stable ci

* fixer

* aa

* no -z flag

* doc

* ??

* this one needs

* nightly for some of them ..

* turn off fail fast for now 🥱

* aaa

* afasdfasfas

* mm

* tmate

* linker's fault

* fixer

* f

* dfsafdasfasf
2025-05-16 15:23:44 +02:00
lazymio
8c0ee046cd
Implement HasBytesConverter for NopFuzzer (#3239) 2025-05-16 13:31:15 +02:00
lazymio
7a9cca9e1b
Expose AFL++ style extended cmplog for unicornafl (#3238)
* expose afl++ style extended cmplog for unicornafl

* also update map ptr

* fix imports

* fix naming

* feature dep
2025-05-16 13:29:49 +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
WorksButNotTested
b5ab6bad1c
Allow QEMU location and version to be specified in environment (#3226)
* Allow QEMU location and version to be specified in environment

* Rename things

* Change remote to url
2025-05-16 11:34:18 +02:00
d94da1b875 demo build script++ 2025-05-15 14:03:28 +00: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
WorksButNotTested
2e0d6343af
Add CI for utils (#3224) 2025-05-15 06:45:17 +02:00
WorksButNotTested
e3a3dfb41b
Optimize data structures used by librasan (#3227) 2025-05-15 06:29:37 +02:00
WorksButNotTested
23185b642b
Fix gdb_qemu after spurious find-replace (#3223) 2025-05-14 12:40:18 +02:00
f7804f9b0c update targets 2025-05-14 09:10:04 +00: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
2dbf636201
Fix fuzzers in docs, add them to CI (fixes #3185) (#3210)
* Fix fuzzers in docs, add them to CI (fixes #3185)

* ignore macos for now

* Ooops wrong one

* fix?

* clp

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-05-13 14:14:12 +02:00
12396f7104 plot script fixes 2025-05-13 12:09:58 +00:00
Dominik Maier
1eb61383d3
Simple Clippy Fix (#3219)
* Update sugar to new things

* Fixes

* tiny

* fix qemu

* Fix cmplog

* taplo fmt

* Fix cmplog forkserver sugar, clippy

* clip

* clip

* Simple clippy fix
2025-05-13 03:22:22 +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
ecaa013263
Replace parallellize_cargo_check.py with Rust code (#3217)
* ci_splitter

* clpo

* FIX

* aa
2025-05-12 18:01:21 +02:00
a0ab58a6c9 bump STG_MAP_SIZE 2025-05-12 15:45:39 +00:00
c420e5c381 configTASK_NOTIFICATION_ARRAY_ENTRIES=10 + new target 2025-05-12 15:15:17 +00:00
Romain Malmain
c9b0dc216f
LibAFL QEMU update to v10.0.0 (#3181)
* update qemu hash

* clippy, fmt

* update

* Revert "Update hashbrown requirement from 0.14.5 to 0.15.3 (#3184)" (#3186)

This reverts commit 4448799dc2205e4cb1753b8b8d91b4f6d299365d.

* update qemu

* fix systemmode

* update qemu

* update qemu

* update qemu with fix

* debug

* cargo hack

* FMT

---------

Co-authored-by: Dongjia Zhang <tokazerkje@outlook.com>
2025-05-12 16:58:11 +02:00
Wim de With
0d962bc561
librasan: Simplify assembly patches (#3192)
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-05-12 16:17:56 +02:00
lazymio
df9b5b7e3d
Fix for LLVM-15 (#3215) 2025-05-12 15:54:43 +02:00
dependabot[bot]
522e00eda0
Bump tokio from 1.44.1 to 1.45.0 in /fuzzers/binary_only/frida_libpng (#3212)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.1 to 1.45.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.45.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.45.0
  dependency-type: indirect
...

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-12 15:29:14 +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
139a637898 WIP: start parsing queues 2025-05-12 10:21:24 +00:00
Dominik Maier
87bd8a6c73
bolts: Fix UB in Truncate trait (#3207)
* bolts: Fix UB in Truncate trait

* fix test

* rename test

* fmt
2025-05-09 20:09:29 +02:00
dependabot[bot]
58bdbd293a
Bump tokio in /fuzzers/binary_only/frida_windows_gdiplus (#3204)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.1 to 1.45.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.45.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-08 14:44:18 +02:00
Dominik Maier
8d5a80d4b2
Update mach crate to maintained fork (#3203) 2025-05-08 13:09:52 +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
EvianZhang
2353eaa61a
Add weak symbol for forkserver (#3196)
* Add weak global symbol sharedmem_fuzzing

* Try

* Try

* Win
2025-05-06 13:23:25 +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
Ivan Gulakov
3ec09711eb
Add a mention of precommit.sh to CONTRIBUTING.md (#3194) 2025-05-04 18:58:17 +02:00
dependabot[bot]
d3ddc8edc4
Bump pyo3 in /fuzzers/structure_aware/baby_fuzzer_nautilus (#3189)
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.24.0 to 0.24.2.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.24.0...v0.24.2)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-version: 0.24.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 02:37:52 -07:00