507 Commits

Author SHA1 Message Date
9bbc5e7c78 Merge branch 'fret_141' into fret_153 2025-07-28 12:03:09 +00:00
Andrea Fioraldi
ce63b76558
Update to v0.15.3 (#3259)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-05-23 22:50:23 +02:00
jma
71d08f5f04
Update aarch64.rs (#3266) 2025-05-23 14:28:27 +02:00
jma
871548c366
Allow passing Qemu object to QemuBytesCoverageSugar (#3261)
* attempt to return Qemu object as a parameter to QemuBytesCoverageSugar

* apply clippy suggestions from precommit.sh

* python qemu sugar: add option to enable stdout

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-05-23 10:22:00 +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
WorksButNotTested
1355bd5294
Improve CI (#3258)
* Improve CI

* Fix markup errors

* Remove unnecessary matrix parameters

* Rename matrix jobs to tidy up the UI

* Allow the docker cache to be updated

* Fix cache name

* Share some caches

* Rename tools
2025-05-22 16:08:35 +02:00
WorksButNotTested
3a62013c85
LibAFL_QEMU: Add redirect stdout module (#3256)
* Add redirect stdout

* Review changes
2025-05-21 13:26:02 +02:00
WorksButNotTested
db1d38eeb6
LibAFL_QEMU/librasan: Add support for reading environment (#3241)
* Add support for reading environment

* Fix clippy

* Review fixes
2025-05-20 21:48:08 +02:00
WorksButNotTested
d7eb3bd234
LibAFL_QEMU: Fix snapshots for large mappings (#3252) 2025-05-20 17:30:26 +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
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
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
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
e3a3dfb41b
Optimize data structures used by librasan (#3227) 2025-05-15 06:29:37 +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
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
WorksButNotTested
ec734c74a5
Move to nostd printf and musl crates (#3188)
* Adopt nostd-printf

* Adopt nostd-musl
2025-05-02 18:46:08 -07:00
Wim de With
0ddc5f156d
librasan: Support patching Thumb functions (#3176)
* librasan: Use bx instruction for ARM patch

* librasan: Support patching Thumb functions

* Get page size dynamically, protect two pages and undo changes after

* Rename ARM patch test functions

* librasan: Simplify patch for ARM
2025-05-02 18:45:03 -07:00
Wim de With
3b23012faf
Exclude ASAN DSO address ranges in QEMU AsanModule (#3180)
Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2025-05-02 15:14:39 +02:00
Dongjia "toka" Zhang
b11ec7e630
Clean up LLVM Passes (#3182)
* cleanup llvm passes

* upd

* clean up

* LOL

* mac

* ?

* ?

* aaaaaa

* stop

* ?/

* i'm done with this shit language

* nothing works

* debug

* diet

* mm

* aa

* bb
2025-04-30 19:03:37 +02:00
Wim de With
977189174b
librasan: Fix errno_location function name (#3172) 2025-04-25 23:08:30 +02: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
Konstantinos Kanavouras
50e1239de9
Remove unneeded workaround for bindgen not supporting f16 types (#3166) 2025-04-24 18:33:12 +02:00
jma
e443d68a39
Fix python bindings (#3164)
* fix python bindings when compiling for ARM Qemu user

* apply partial precommit.sh
2025-04-17 13:07:16 +02:00
Romain Malmain
7680ea1346
Safe qemu cpu from index (#2941)
* safe cpu from index

* add comment
2025-04-09 14:43:26 +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
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
Marco C.
a7d735c1de
Add IntelPT tracing module to libafl_qemu systemmode with KVM (#2774)
* intelpt module
2025-04-08 10:10:39 +02:00
Romain Malmain
184b69be8e
Update QEMU syshook ret value (#3092)
* update syshook ret value
2025-03-31 15:51:01 +02:00
WorksButNotTested
c68b30ae2a
Add iniitialize feature to librasan (#3113)
* Optimize memset

* Make the initialization of memory buffers an optional feature

---------

Co-authored-by: Your Name <you@example.com>
2025-03-28 20:52:57 +01:00
WorksButNotTested
36c748100e
Change GuestTracking to use a BTreeSet to remove performance bottleneck (#3112)
Co-authored-by: Your Name <you@example.com>
2025-03-28 20:13:34 +01:00
WorksButNotTested
869edd068d
Various updates to librasan (#3106)
* Add rawmemchr

* Add stpncpy

* Add strchrnul

* Fix strcat

* Added strncat

* Add wcschr

* Minor tweak

* Add wcsncmp

* Add wcsnlen

* Add wcsrchr

* Add wmemchr

* Fix asan load/store sizes for wide string functions

* Refactor patches

* Rename tracking functions to prevent collision with allocator

* Change return type of asan_sym to make it consistent with the other native functions

* Fix mutex re-entrancy issue in Patches by splitting locks

* Fix tests on 32-bit platforms

---------

Co-authored-by: Your Name <you@example.com>
2025-03-25 15:22:20 +01:00
Romain Malmain
58607dc333
Update QEMU to v9.2.2 (#3088)
* update qemu to v9.2.2

* alignment field has been removed
2025-03-25 14:34:44 +01:00
Dongjia "toka" Zhang
bd12639f8e
0.15.2 (#3104)
* 0.15.2

* miri

* mistake

* unsafe

* lock file
2025-03-25 13:30:15 +01:00
Romain Malmain
c863c8bd6c
Fix clippy (#3102)
* fix clippy

* libafl_frida/

* lol

* lol

---------

Co-authored-by: Toka <tokazerkje@outlook.com>
2025-03-24 15:03:04 +01:00
Dongjia "toka" Zhang
4130e3860f
Add redirect stdin module (#3077)
* forkserver api

* poc

* i'm dumb

* add things

* use snapshot

* delete println debug

* anglais

* d

* fixer

* take care of further read

* take care about u32

* aa

* fix cursor

* mm

* pushing things temporary so i can try this path later

* delete useless setter

* rme

* BytesConverter

* now revert

* clp

* typo

* change how input passing works

* fuck

* fmt

* fixer

* fix

* lol

* lol

* lol

* disable CI

* delete assert

* clp

* a
2025-03-19 19:03:02 +01:00
WorksButNotTested
30946641cd
Add filter to ASAN module in qemu_launcher (#3089)
also add filters to rasan runner.

Co-authored-by: Your Name <you@example.com>
2025-03-19 16:13:45 +01:00
Dongjia "toka" Zhang
d0da90cf6a
Make Qemu.mmap public and accept fd as the argument (#3083)
* chg mmap

* Proper error handling

* lol

* fix ci
2025-03-18 12:21:11 +01:00
Romain Malmain
d5ddc1359e
Fix qemu snapshot module unmap (#3084)
* fix qemu usermode snapshot unmap

* fix phys addr computation for qemu. some cleanup.
2025-03-18 10:31:16 +01:00
Romain Malmain
a613676675
Fix LibAFL QEMU race condition between main loop and a vcpu (#3072) 2025-03-18 09:43:00 +01:00
Romain Malmain
d67296f34e
Soft recovery from crashes in libafl qemu usermode (#3073)
* soft recovery from crashes in qemu

* regen bindings for clippy

* configurable crash behaviour
2025-03-14 16:56:03 +01:00
WorksButNotTested
0154a3b930
Added heap feature (#3074)
* Added heap feature

* Rename feature and add some more docs

* Use document-features crate

* Expose the patching API for more flexibility

---------

Co-authored-by: Your Name <you@example.com>
2025-03-14 13:19:23 +01:00
Dongjia "toka" Zhang
f4cb9a827d
Partially Revert #3029 and #3053 (#3063)
* revert begins

* fixer

* e?

* fixer

* how you didn't report that at the same time though???

* i'm tired of you
2025-03-11 12:53:27 +01:00
s1341
bf3c391ffa
librasan: tiny fixes to make it build (#3065)
* librasan: tiny fixes to make it build

* librasan: source -> .
2025-03-11 09:12:43 +02:00
WorksButNotTested
728b1216bb
Librasan (#3023)
* Fixes to main

* Add librasan

* Party like it's 2024

* Fix snapshot module to work with guest asan

* Fix guest_asan module

* Fixes to runner

* Fix linking issues using a REL

* Fix qemu_launcher

* Change modify_mapping to a method

* Fix gasan_test

* Remove debug from Justfile

* Optimize release build of librasan

* Set ulimit for qasan and gasan tests

* Tidy up symbol renaming

* Add missing symbols for PPC

* Change to support rustix 1.0.0

* Canonicalize the CUSTOM_ASAN_PATH

* Review changes

* Restructure backends

* release_max_level_info

* More review changes

* Clippy fixes

* Changes to reduce the burden on the CI

* Fix macos clippy

---------

Co-authored-by: Your Name <you@example.com>
2025-03-10 17:27:55 +01:00
Dongjia "toka" Zhang
620500e295
Remove AdaptiveSerializer, Send off interesting testcase from crash handler, Add clearer error message (#3053)
* clean

* test thread 1

* add some error messages

* mm

* std

* mm

* aa

* pp

* fix

* change fuzzers

* fix

---------

Co-authored-by: Your Name <you@example.com>
2025-03-08 20:12:16 +01:00
Dongjia "toka" Zhang
629787771b
Fix snapshot module (#3047) 2025-03-06 16:12:05 +01:00
forky2
eaa600e5ac
libafl_qemu: access() size can be zero. (#3038)
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2025-03-05 20:42:06 +01:00
Dongjia "toka" Zhang
977ff10a0f
Make corpus and solution not mutually exclusive (#3029)
* make fuzzer great again

* crash handlers

* hello from windows

* fk

* gee

* m

* temporary fix

* f

* mm

* CICI

* fixer

* Fix Dockerfile

* lol

* clp

* Fuck you clippy

* This lint makes no sense, 0

* ??

* a

* fix

* this lint makes 0 sense

* mm

* clp

* a

* a

* clp

* clippy

* clp

* mm

* FMT

* p

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: toka <toka@tokas-MacBook-Air.local>
2025-03-05 20:10:04 +01:00