1988 Commits

Author SHA1 Message Date
Rowan Hart
fe6daecf0b
Make harness function take mut ref (#1338)
* Change executor trait to allow \&mut Input

* Add mut inprocess executor

* Add mut inprocess executor

* Format and fix clippy errors

* Fix more clippy errors

* Revert accidental refactoring of InMemoryCorpus

* Add mut versions of all executors that can support it

* Do not persist possible testcase mutation in stages, shadow/differential executors, or corpus minimization

* Fix missing imports

* Fix executor type for missed qemu items

* Add re-exports for mut executors

* Use InProcessForkExecutorMut in QemuForkExecutorMut

* Update BytesInput harnesses to take mutable references

* Update other-input-type-taking harnesses to take mut references

* Clippy fixes

* Feature gate TryFromIntError import

* Fix missed harness input type in baby_fuzzer

* Fix additional clippy issues

* Fix unnecessary hashes on string literal

* Even MORE clippy fixes

* Fix one more clippy issue

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2023-07-10 13:06:38 +02:00
Dongjia "toka" Zhang
52ab8c02d6
Fix CI (#1354)
* Update build_and_test.yml

* Update build_and_test.yml
2023-07-07 17:24:03 +02:00
Dongjia "toka" Zhang
44bbaf7d22
Update build_and_test.yml (#1353) 2023-07-07 16:22:27 +02:00
Dongjia "toka" Zhang
8cca87f2bd
Fix #1342 (#1345)
* push

* fmt
2023-07-05 13:03:09 +02:00
Dominik Maier
e5b3e5a677
Fixed Forkserver shmem input length, made it configurable (#1342)
* Fixed Forkserver shmem input length, made it configurable

* fix redqueen clippy

* Clippy

* Clippy

* WHY ARE THERE TWO TIMES THE SAME FN

* More clippy
2023-07-04 14:57:09 +01:00
Ivan Fratric
829b5049e6
Hexagon support (#1323)
* Hexagon support

* Fix format

* Fix needless bool

* Address comments

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2023-07-04 11:08:36 +02:00
Dongjia "toka" Zhang
07f4c42ecf
AFL++ redqueen update (#1291)
* up

* dbg

* fix

* fmt

* fix

* refactor

* more

* clp

* upd

* fmt

* fmt

* last

* debugging

* wip

* lastlast

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-07-03 19:27:34 +02:00
David CARLIER
4897c3f205
util/noaslr porting to FreeBSD (the non-lib part). (#1337)
to port to the library, might need a nice layer over the FreeBSD's C api (nix?)
before hand.
2023-07-03 00:51:32 +01:00
Dominik Maier
c0e1236a07
Formatting fuzzers with new fmt (#1340) 2023-07-02 18:19:48 +01:00
Dominik Maier
6f4955619a
Latest fmt (#1339) 2023-07-02 18:13:46 +01:00
WorksButNotTested
07047cb3bb
Added noaslr (#1333) 2023-06-30 20:37:48 +02:00
WorksButNotTested
97b3d3c7c7
Add gdb_qemu utility (#1331) 2023-06-30 20:36:46 +02:00
WorksButNotTested
c6062889d5
Extend qemu_launcher to support multiple architectures (#1328)
* Change qemu_launcher fuzzer to support multiple architectures and remove qemu_arm_launcher

* Review changes

* Changes to milliseconds

---------

Co-authored-by: Your Name <you@example.com>
2023-06-30 02:18:00 +02:00
s1341
871dfa0a01
Insert into corpus if feedback is_interesting on crash/timeout (#1327)
* Insert into corpus if feedback is_interesting on crash/timeout

* Use correct import for HasExecutions

* Windows add missing import

* QemuExecutor add HasFeedback

* Windows asan fix

* Add missing call to scheduler.on_add

* Add missing HasExecutions for windows frida

* QemuExecutor missing HasScheduler

* QemuExecutor missing HasCorput
2023-06-28 23:53:51 +02:00
s1341
71aa0221a0
Add feature to build variants/configurations automatically, with libtool/cc/cxx shims (#1322)
* Add feature to build variants/configurations automatically, with libtool/cc/cxx shims

* Fixes

* Clippy

* Add brief comment describing usage

* Fix

* Fix fuzzers: add ToolWrapper

* Clippy

* More clippy

* More clippy

* Add Compound configuration

* Clippy

* Fix

* Clippy

* Damn that Clippy

* Change names of Configurations

* Add ar wrapper

* Fix

* Clippy

* Windows build

* Clippy

* Clippy

* Clippy
2023-06-22 16:17:33 +02:00
Andrew-Fryer
07530fea57
Trigger feedback side effects during force-loading (#1317)
* this triggers feedback side effects during force-loading

* oops; correct typo in introspection branch

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2023-06-17 02:06:07 +02:00
Dongjia "toka" Zhang
dad8217c38
Update build_and_test.yml (#1318) 2023-06-16 01:26:40 +02:00
WilliamParks
dec202e6d6
Fixes math with register offsets (#1314) 2023-06-15 21:53:22 +02:00
s1341
c66c3ff2b8
Attempt to fix ci (#1315)
* Attempt to fix ci

* fix

* fix

* rm all the stuff
2023-06-15 21:53:06 +02:00
Dominik Maier
f858e1a247
Add TcpEventManager (#1302)
* Tcp manager, initial commit

* no tokio by default

* Allow Any broker type

* Add tcp_manager example

* fix CI
2023-06-10 06:25:25 +02:00
s1341
751d96f45a
libafl_cc: Add override env vars to configure LLVM (#1310)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-06-09 16:55:31 +02:00
Dominik Maier
62b1bde7a9
Fix AnyMap for TypeIds with 128 bit (#1311)
* Fix AnyMap for TypeIds with 128 bit

* make const

* added test, removed static_assertions
2023-06-09 14:06:42 +02:00
Daniel Blackwell
fa63493cee
Fix for issue with CommandExecutor when using InputLocation::StdIn (issue #1306) (#1308)
Co-authored-by: dan <dan@localhost.localdomain>
2023-06-08 16:25:20 +02:00
Dimitri Kokkonis
7d67fc77b5
Give baby fuzzer listings unique package names (#1307)
As discussed in [#1305], it is problematic for the listings to have the
same package name, as they cause warnings to be emitted.
2023-06-08 15:23:39 +02:00
Addison Crump
60c1990f4a
Make it possible to escape from simple event restarter (#1303) 2023-06-06 23:43:41 +02:00
WorksButNotTested
747a636f4f
Add sample fuzzer which collects DrCov coverage for various architect… (#1300)
* Add sample fuzzer which collects DrCov coverage for various architectures using QEMU instrumentation

* Fix clippy

* Rename NullCorpus to NopCorpus

* Added support for verbose output

* Attempt to fix clippy again

* Fix remaining defaults to use x86_64 when no arch specified and be more robust handling partial builds

* Make build even more robust against partial re-builds

* Added missing dependencies to workflow, updated README

* Add missing dependencies for i386

* Another dependency

* More dependencies

* Disable tests on OSX

* Add tmate

* Add missing dependencies and symlink header directory

* Tidy up after test so we don't hog all the disk space

---------

Co-authored-by: Your Name <you@example.com>
2023-06-06 11:50:38 +02:00
Dongjia "toka" Zhang
fa1e3fd504
CI (#1301)
* ci

* fi

* Revert "fi"

This reverts commit ed298d71057607f019e64d58687273a01d30e260.

* Revert "ci"

This reverts commit 6b65936990143a6069abd56dcbe633ac37be2ede.

* fi
2023-06-05 16:29:51 +02:00
Andrea Fioraldi
356698c24b
Update to QEMU 8 (#1299)
* Update to QEMU 8

* fix

* fix snapshots

* fix pcrel
2023-06-02 18:24:07 +02:00
Dongjia "toka" Zhang
8445ae54b3
Allow multiple source file in libafl_cc (#1296)
* add

* clp

* fi

* fmt
2023-05-26 11:35:04 +02:00
WorksButNotTested
0336eae908
Tidy libaf_qemu hooks (#1293)
* Simplify hooks

* More simplification

* Appease the clippy gods

---------

Co-authored-by: Your Name <you@example.com>
2023-05-25 00:24:28 +02:00
Dongjia "toka" Zhang
594ce420fc
Fix libafl_cc (#1295)
* push

* fix
2023-05-24 18:44:13 +02:00
WorksButNotTested
53dd6c6be6
Post gen (#1282)
* Add post_gen

* Adopt post_gen hooks in DrCovHelper

* Bump qemu-libafl-bridge revision

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2023-05-24 16:03:59 +02:00
Andrea Fioraldi
258780370f
Update publish.sh (#1294) 2023-05-24 14:16:09 +02:00
Dimitri Kokkonis
89876f2d89
Use listings for baby_fuzzer book chapter (#1289)
* Clarify setup steps for the baby fuzzer

Specifically:
- Explicitly mention that the dependency path must point to a specific
  directory in the cloned repo (and not the root directory)
- Explicitly mention how to manually trigger the panic in the harness
  for testing purposes

* Clean up documentation on the baby fuzzer

Since the baby fuzzer chapter of the documentation is done in a
"tutorial", step-by-step fashion, it would be nice to be able to see
where exactly new lines have to be placed in the existing code. To that
end, the code used in the tutorial is moved to snippets (as is done in
the Rust Book), as it allows for much more convenient maintenance of the
snippets, as well as easy hiding of the non-important code on any given
snippet.

Furthermore, a few minor fixes are applied; a typo on a comment and a
missing unsafe block.

* Fix code snippet attributes for baby fuzzer

Specifically:
- Remove unnecessary `compile_fail` attribute
- Add `ignore` attribute to the snippets of the complete baby fuzzer. As
  explained in [#1290], it is expected for the baby fuzzer to return a
  non-0 exit code, so this should not trigger a failure during `mdbook
  test`.

* Fix CLI snippet language

For CLI snippets, the "language" should be set to `console`.

* Remove nested safe block in baby_fuzzer listings
0.10.1
2023-05-24 12:18:26 +02:00
Rowan Hart
5a6d683fed
Add an observer for COUNTERS_MAPS for 8-bit SanCov (#1283)
* Add sancov multimap observer to sancov_8bit target

* Undo autofmt of Cargo.toml

* Fix formatting

* Fix import errors under no-default-features, add Safety to counters_maps_observer

* Make observer function no_mangle to allow it to easily be used in a staticlib crate

* Make clippy happy by using export_name instead of no_mangle

* Add observers feature flag and hide counters maps observer behind it

* Fix formatting
2023-05-23 23:31:07 +02:00
Dongjia "toka" Zhang
aa6d331110
Fix CI (#1292) 2023-05-23 18:07:54 +02:00
David CARLIER
dc82a53bec
minibsod dragonflybsd's portage (#1287) 2023-05-22 13:13:07 +02:00
Dongjia "toka" Zhang
2be9686a80
Fix clippy (#1288) 2023-05-22 13:12:43 +02:00
David CARLIER
b9b70b0d51
minibsod: generate_minibsod further memory maps data for freebsd. (#1285) 2023-05-22 12:43:31 +02:00
David CARLIER
0d7d52decf
afl_cc fix build for LLVM 17 (#1286) 2023-05-22 12:42:56 +02:00
Dongjia "toka" Zhang
6f21cb3848
Bump to 0.10.1 (#1280)
* bmp

* remove DEBUG env var
2023-05-22 12:42:36 +02:00
Dongjia "toka" Zhang
cba9df9a28
Delete gitmodules (#1278)
* fix

* rm
2023-05-18 13:07:10 +02:00
WorksButNotTested
4029069640
Disable capstone when building qemu-afl-bridge for user-mode fuzzing (#1281)
Co-authored-by: Your Name <you@example.com>
2023-05-18 00:47:59 +02:00
Dongjia "toka" Zhang
52557aefdd
Fix #1276 2023-05-17 15:39:21 +02:00
Dongjia "toka" Zhang
3fd5671909
add (#1276) 2023-05-17 15:22:49 +02:00
Dongjia "toka" Zhang
66127d8492
Revert "Don't pass LLVM pass & its args during linking (#1274)" (#1275)
This reverts commit efc5756e3fac9ed3b82e6d82b770b578b47b42d0.
2023-05-17 14:53:17 +02:00
Dongjia "toka" Zhang
efc5756e3f
Don't pass LLVM pass & its args during linking (#1274) 2023-05-17 14:32:56 +02:00
Dongjia "toka" Zhang
b7c1591b00
Linking arguments for LLVM passes (#1273) 2023-05-17 13:53:02 +02:00
Dominik Maier
20f8cb10eb
Revert "Automatically add the comment about executions when a new PR triggers (#1270)" (#1271)
This reverts commit d2e4b9f206307db0898caac707c0d2687079bfb1.
2023-05-17 02:48:15 +02:00
ToSeven
d2e4b9f206
Automatically add the comment about executions when a new PR triggers (#1270)
Co-authored-by: toseven <Byone.heng@gmail.com>
2023-05-17 00:30:15 +02:00