58 Commits

Author SHA1 Message Date
Dongjia "toka" Zhang
c12c6f31e2
Change fuzzbench_qemu fuzzer (#2520)
* change fuzzbench_qemu

* real test

* fix qemu crash hook

* update bindings

* fix fork executor, reduce trait bound overhead

* make EdgeModule depend on observer to get ptrs.

* do not make EdgeCoverageModule::new public

* map observer as builder call

* adapt examples with new edge coverage module builder.

* TMP: everyone is a variable length map observer

* reuse profile path script

* fix absolute paths

* remove some dependencies to make pipeline faster

* compile-time builder initialization check

---------

Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2024-10-08 15:18:13 +02:00
Dongjia "toka" Zhang
1172b5e5e0
Fix build and remove dump_state feature (#2513)
* fix

* remove dump_state
2024-09-06 14:22:33 +02:00
Dongjia "toka" Zhang
b37f9d4b27
Better error when non required pass failed to build (#2509) 2024-09-05 19:17:21 +02:00
Romain Malmain
82f11c22ad
Various CI improvements + fix wrong format check in CI (#2417)
use of LLVM 19 by default
    LLVM version should be much easier to switch from now on
    a lot of code repetition has been deleted
    removed llvm-related github action
    fix format check
    other small things

---------

Co-authored-by: Toka <tokazerkje@outlook.com>
2024-07-19 22:32:50 +02:00
Dongjia "toka" Zhang
762b6e008e
Make llvm pass build feature dependent (#2357)
* push

* everybody is default

* fix

* fix
2024-07-02 17:37:07 +02:00
Dominik Maier
8031111660
Make ddg map compilation optional (#2341)
* Make ddg map compilation optional

* undo

* undo
2024-06-27 01:19:45 +02:00
Dominik Maier
1556cba426
Update ratatui to 0.26 (#2269)
* Update ratatui to 0.26

* more build infos

* fix introspection
2024-06-03 15:23:12 +02:00
Dongjia "toka" Zhang
e6eb6c48d2
LibAFL Dynamic Analysis (#2208)
* aa

* push

* push

* push

* claude ai

* push

* add

* add stuff

* upd

* rdm

* fix

* ci

* fix

* fix

* fixing

* feature

* revert

* no submodules

* ci
2024-05-24 14:43:27 +02:00
Dongjia "toka" Zhang
e8cc1ba93d
Revert "Revert splitting libafl_edges_map_max and libafl_edges_map_in_use" (#2082)
* Revert "Revert splitting libafl_edges_map_max and libafl_edges_map_in_use (#2…"

This reverts commit c68b3816fb680b635f99c337f78185e699864705.

* all

* more
2024-04-19 19:03:58 +02:00
Dongjia "toka" Zhang
c68b3816fb
Revert splitting libafl_edges_map_max and libafl_edges_map_in_use (#2079)
* fix

* aa

* push

* fix

* fmt
2024-04-19 13:24:25 +02:00
Dongjia "toka" Zhang
c50af44099
Split edges_map_size and edges_map_size_alloc (#2012)
* two sizes

* rename

* build.rs

* rename

* capital

* FMT

* macro

* fuck

* fff
2024-04-17 17:58:08 +02:00
Dongjia "toka" Zhang
8bce605503
DDFuzz (#2056)
* push

* add

* book

* ddg

* works
2024-04-16 16:51:28 +02:00
Dongjia "toka" Zhang
1a41e65a5b
Sancov based ngram & ctx implementation (#1864)
* ngram

* ctx

* push stuff

* passing cargo check

* save stuf

* add

* no default

* fuzzbench ready

* formatt

* aaaaaaaa

* adaptive map

* add all

* chg

* fix

* deleting stuff

* fmt

* clang18

* fuck

* save space

* fix?

* feature name

* fucking nightly only

* harness

* fix libafl_cc

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-03-01 13:59:13 +01:00
Dongjia "toka" Zhang
b97598d239
Windows fix (#1876)
* win fix

* just some ci

* test

* revert

* aaaaa

* bbbbbb
2024-02-22 14:56:30 +01:00
Dominik Maier
244c6b0da5
QEMU: Fix injections build for hexagon, disable on system mode (#1821)
* Fix CI for Clippy, QEMU

* Clippy, fixes for system mode

* clippy

* clippy

* fixing new clippy
2024-01-30 04:25:14 +01:00
Dongjia "toka" Zhang
bb443027f7
Observer fix (#1807)
* fix

* Increase default edgemap size for libafl_cc and libafl_targets (#1798)

* fmt

---------

Co-authored-by: Dominik Maier <dmnk@google.com>
2024-01-24 03:30:22 +01:00
Dongjia "toka" Zhang
df8fa71aa7
Revert "Increase default edgemap size" (#1803) 2024-01-18 14:58:29 +01:00
Dongjia "toka" Zhang
c240cdec38
Increase default edgemap size for libafl_cc and libafl_targets (#1798) 2024-01-14 01:25:22 +01:00
Dongjia "toka" Zhang
3ed231db69
Don't use assert fail when building on libafl_libfuzzer on windows (#1792)
* fix

* fix

* clippy

* clippy
2024-01-13 16:02:10 +01:00
Dongjia "toka" Zhang
75fcd47044
Recover useful CmpLog updates from #1630 (#1684)
* add

* ci

* wip

* make type name more clear

* last

* add

* more fix

* chg

* fmt

* save changes

* fix_handler

* cfg

* win

* fix

* toml

* f

* more

* fix all the stuff

* fix

* revert fuzzers/fuzzbench to origin/main
2024-01-03 23:44:32 +01:00
David CARLIER
108c04a8d2
libafl_cc custom llvm_config lookup for solaris/illumos (#1708) 2023-12-03 10:23:33 +01:00
s1341
ba394c4acc
Fix LLMP map reuse overflow for slow brokers (#1679)
* Attempt to fix llmp refcounting

* readers->readers_count

* Removed refcounting for now, fixed

* fixes

* fixes

* add extra debug assert, remove duplicate line

* semicolons are pain :)

* Add comment

* oooooops, bugfix

* fmt

* Fix calcualtion in in_shmem

---------

Co-authored-by: Dominik Maier <dmnk@google.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-11-21 16:48:17 +01:00
s1341
7acdeacae8
Allow compiling 32bit (#1666)
* Allow compiling for 32bit

* Fmt

* Clean up minibsod for 32bit

* fmt
2023-11-15 12:43:04 +01:00
Dongjia "toka" Zhang
0b38fabeb0
CmpLog {Instruction, Switches} pass (#1612)
* switch and instruction pass copy paste

* FMT

* add cb

* put things in the functions

* fi

* working

* oops

* options

* no 128bit int on windows

* no 128bit on windows

* oops

* unix only

* windows

* PACKED

* let's stop using it, it's ugly

* fmt

* adjust

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2023-10-14 11:47:16 +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
Dongjia "toka" Zhang
8445ae54b3
Allow multiple source file in libafl_cc (#1296)
* add

* clp

* fi

* fmt
2023-05-26 11:35:04 +02:00
Tomas Duchac
53659f8a5c
Add file extension for clang in libafl_cc/build.rs (#1237)
* Add CLANG and CLANG_PP env vars

Add CLANG and CLANG_PP env variables for Windows. Resolves issue if clang and llvm-config are not in the same location.

* Just add clang".exe" for windows

User should have llvm-config and clang.exe clang++.exe in the same directory anyways.

* Ran cargo fmt
2023-05-04 11:52:51 +02:00
Dongjia "toka" Zhang
eab7c32e9f
Dump whole program's CFG pass (#1226)
* skelton

* pass

* compiles

* python

* optional pass

* rev

* chg
2023-04-24 14:57:24 +02:00
David CARLIER
fd95560512
Check for the presence of clang frontends. (#1158)
* checks the presence of clang frontends.

close GH-1149.

* fix clippy complaints
2023-03-17 16:00:54 +01:00
Marco Cavenati
b96e194812
Improve find_llvm on MacOS (#1124)
By looking for explicitly versioned Homebrew formulae for LLVM
2023-03-07 03:23:46 +01:00
Dominik Maier
31357aa7e2
Track parent testcase id, tuneable stage probabilistic settings (#1081)
* Added local event handlers

* clippy

* move tuned mutator to pow2

* Tunable updates

* parent ids

* no_std, etc

* windows

* remove local event manager handler

* maybe fix win

* win:

* win docs

* docs

* ASAN -> ASan
2023-02-28 16:36:04 +01:00
Dominik Maier
68fbfc8914
Fix Clippy (#926)
* Fix clippy

* undo comment fmt

* add unstracked nyx files to gitignore

* fix

* windows, no_std

* fix

* fix

* more

* macos

* remove doctest

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2022-12-06 00:05:42 +09:00
Dominik Maier
a22c76e02e
Improve Apple support for libafl_cc dll_extensions (#892) 2022-11-15 18:28:52 +01:00
Andrea Fioraldi
31077765de
Fix CI (#862)
* Autofix with new clippy

* Clippy
2022-10-26 09:41:08 +02:00
Dominik Maier
94f0c7f56e
Moving to named parameters in format strings (#827)
* autofix

* you're just asking for a clamping

* autofmt on linux

* fix nits

* change back nit

* unfixing as u64 for GuestAddr

* fix

* ignoring clippy for GuestAddress
2022-10-11 13:45:01 +02:00
Dominik Maier
5823320206
Fixes for new Clippy (#755) 2022-09-02 16:21:06 +02:00
Dongjia Zhang
93c361bcd9
New Pass Manager Arguments (#724)
* new pm arguments

* enable abgeana's code
2022-08-18 19:26:52 +02:00
Alexandru Geană
c1aafe3e98
LLVM passes for Windows (#710)
* libafl_cc fixes for windows

* libafl_cc checks for llvm-config (again)

* libafl_cc clang-format

* libafl_cc fixes for macos

* maintain libafl_cc pass manager selection logic

* libafl_cc rustfmt
2022-08-12 20:25:59 +02:00
syheliel
2504b6dae3
Add rustfmt.toml (#722)
* add `rustfmt.toml`

* format fix

Co-authored-by: syheliel <syheliel@gmail.com>
2022-08-12 02:28:32 +02:00
Dongjia Zhang
49de0046e8
Fix AFLCoverage Pass & small fixes (#678)
* fix

* more

* declare LIBAFL_CC_LLVM_VERSION at least when no llvm-config found

* More llvm14 fixes
2022-06-23 17:55:06 +02:00
Dominik Maier
828ebcff39
Clippy nits & fixes (#640)
* release autofix

* fix unused backtrace

* clippy fixes

* clippy

* more clippy

* more autofix

* clippy for frida

* more clippy
2022-05-22 02:43:25 +02:00
Dongjia Zhang
afb32fb351
Cmplog New Pass Manager & LLVM 14 Fixes (#626)
* wip

* more

* match aflpp

* llvm14

* fix

* more llvm14

* check llvm version in libafl_cc

* safe access

* more

* fmt

* no windows

* no windows
2022-05-17 08:45:48 +02:00
Dongjia Zhang
a02b90be44
Autotokens New PM (#605)
* autotokens newpm

* typo

* fmt

* clp

* fix

* fix

* include &fmt

* include

* fmt

* llvm14 & clippy fix

* fix
2022-05-09 18:41:53 +09:00
Dominik Maier
196569577f
Clippy nightly fixes (#622)
* removed unused errors

* Fixes
2022-05-06 19:11:09 +02:00
Dominik Maier
6bfbdd6318
Add sdk linker flag for broken MacOS systems (#527) 2022-02-08 18:29:48 +01:00
Andrea Fioraldi
1fca710813
llvm-config --libs only for apple (#522)
* Fuck apple

* fix fuzzbench_text
2022-02-04 11:49:02 +01:00
Andrea Fioraldi
0062bab412
libafl_cc: -fsanitize=fuzzer is an alias to --libafl (#518)
* libafl_cc: -fsanitize=fuzzer is an alias to --libafl

* no link runtime
2022-02-02 21:47:23 +01:00
Andrea Fioraldi
dd002a081b
Implement coverage accounting (BB metric atm) (#507)
* bb accounting llvm pass

* bb metric

* accoutning corpus scheduler

* fix warnings

* alloc

* clippy

* fix dockerfile

* clippy

* coverage accounting example

* finish CoverageAccountingCorpusScheduler

* fmt

* --libs in llvm-config

* merge
2022-02-01 14:08:38 +01:00
Dominik Maier
6810e6085b
Builder for CommandExecutor & Tokens Refactoring (#508)
* builder for CommandExecutor

* tokens api cleanup, clippy

* fix doctest

* cleanup

* added testcase, remodelled

* command executor builder fix

* fix fuzzer(?)

* implemented From for configurator

* nits

* clippy

* unused

* autotokens

* cleanup

* nits

* Err instead of empty tokens

* fix tokens fn

* fix err

* more error fixing

* tokens remodelling

* typo

* recoverable fail on missing autotokens

* clippy, nostd

* asslice, into_iter, etc. for tokens

* adapt fuzzers

* iter

* fixes, clippy

* fix

* more clippy

* no_std

* more fix

* fixed typo

* cmd_executor builds again

* bring back ASAN stuff to Command Executor

* forkserver speedup

* no need to static

* back to earlier
2022-02-01 10:10:47 +01:00
Dongjia Zhang
62614ce101
LLVM AutoTokens (#470)
* posix dict2file llvm pass

* new PM

* working

* clean up

* fmt

* fix

* silence clippy

* bring the println back

* early return

* rename

* weak symbols

* linux onky

* fuzzbench change

* only linux

* linux only

* cfg

* cfg

* fix

* fix

* fix

* why

* fix

* bug fix

* rename

* rename

* macros & rename

* add_from_autotokens

* fix fuzzbench

* std -> core

* builder pattern?

* clippy

* wrong cfg

* cfgstd

* fuzzbench fmt

* no unsafe

* update fuzzbench_text

* use TokenSectiopn

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2022-01-26 19:23:04 +01:00