72 Commits

Author SHA1 Message Date
Dominik Maier
68e7b203f5
Add file descriptor logger (#1742)
* Add file descriptor logger

* clippy

* Fix closing fds

* fix no_std, fmt

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2023-12-20 16:53:33 +01:00
Dongjia "toka" Zhang
78060ea308
0.11.2 (#1735) 2023-12-18 14:33:14 +01:00
Andreas
2f036b72e4
Make inner value of llmp Flags pub (#1725) 2023-12-15 20:58:05 +09:00
mkravchik
b336411516
Adding support for shutdown upon Ctrl+C on Windows for LLMP (#1704)
* Adding support for shutdown upon Ctrl+C on Windows for LLMP

* PR comments and clippy suggestions addressed

* Enable CI for PR branches and manually triggered CI

* Removed an empty line that broke compilation on some platforms

* Trying to fix nostd compilation

* Trying to fix nostd compilation for nightly toolchain

* Removing use that is unused on some platforms

* Trying to fix build on the nightly toolchain

* Trying to fix build on the nightly toolchain, take 2

* Unifying LlmpShutdownSignalHandler

* Fmt fix

* Making the handler pub(crate)

* Nightly toolchain fmt fixes

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2023-12-05 21:03:00 +01:00
Dongjia "toka" Zhang
fad59987d9
Better SigInt handler (#1710)
* fix simd

* better exit

* chg

* more

* more

* use

* change to proper name

* w

* aaaaaaa

* delete

* just separate them

* shell check
2023-12-04 20:06:11 +01:00
David CARLIER
c84629a2f8
bolts: fix solaris cpu binding (#1699)
Seems `PS_MYID` to save one syscall was not really working, explicit current id makes the test always pass.
2023-11-27 22:34:12 +01:00
Mrmaxmeier
84a87f1da8
bolts: support dump_registers for x86 linux (#1694)
* bolts: support dump_registers for x86 linux

* bolts: fix write_crash fault addr for linux/x86
2023-11-26 16:39:16 +01:00
Dongjia "toka" Zhang
16af5debbe
Fix aggreagator ui (#1693)
* fix

* more

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2023-11-24 13:50:57 +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
Addison Crump
281524dbf9
Unicode-preserving mutators (#1542)
* create the string classification stage

* modify API to pre-group

* preserving mutator

* more meaningful test

* subproperty mutators + some fixes

* document, finalise, integrate with libafl_libfuzzer

* add example, fix for weird range select

* fix for introspection

* fix fuzzer build

* speed optimisation: allow, but do not require, stacking

* property => category

* token replacement

* fixup: rare case where rust does not agree on valid character

* fix CI again

* again again

* take two: dynamic unicode discovery

* oops

* fix: last byte is never selected

* opt: bias to smaller unicode categories

* fix test

* opt: precompute regions and fix tests

* cache and allow stacking

* document and update libafl_libfuzzer

* oops, use reverse

* fix bolts clippy error

* fixup part 2

* clippy

* part 2

* clippy warning allow

* clippy complaint

* use alloc not std

---------

Co-authored-by: toka <tokazerkje@outlook.com>
2023-11-21 00:41:16 +01:00
David CARLIER
a013ad6085
bolts for haiku update (#1673)
core_affinity using available_parallelism which also support this
platform. further tests disabling.
2023-11-19 23:58:30 +01:00
Mark Giraud
0750a6c3ca
refactor: Remove unnecessary Debug trait bounds (#1667)
* refactor: Remove Debug supertraits

Instead of having the Debug trait as supertrait on several traits, the
Debug trait is now required in bounds in specific implementations that
need this specific trait. This keeps the API cleaner, since users now
don't have to propagate the Debug requirement if they don't need to use
the Debug trait.

* refactor: Reformat code
2023-11-15 20:26:12 +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
d53503b73e
Fix stb image on windows (#1657)
* fix

* fix

* HOW DO I ADD FROM:FROM????

* ok
2023-11-08 15:20:35 +01:00
David CARLIER
bae24d9072
bolts: haiku, addressing clippy warnings (#1647) 2023-11-04 17:03:09 +01:00
Addison Crump
56b37bb4bd
Improve the libafl_libfuzzer corpus (#1539)
* improved libfuzzer corpus

* use .into() for converting ids to usize

* oops

* fix warning about unused arg

* fix some lingering CI errors

* actually save the last lmao
2023-11-03 17:33:38 +01:00
Addison Crump
fd98eabfbf
clamp last to infinity to handle rare imprecision issues (#1532) 2023-11-03 17:32:48 +01:00
David CARLIER
2e980ca08d
bolts: initial haiku support (#1643) 2023-11-03 17:18:53 +01:00
Dongjia "toka" Zhang
f34bab2486
Fix CI (#1636) 2023-10-25 16:10:10 +02:00
Andrea Fioraldi
406e77faa9
QEMU Asan backtrace and report (#1628)
* wip

* ExtractFirstRefMutType

* Asan report with backtrace

* Print asan reports and fix backtraces in libafl qemu

* print context

* enlarge redzone

* nopstate

* fix

* reproducer

* clippy

* clippy

* Fix android

* Crash hook
2023-10-25 15:58:32 +02:00
Benjamin Beyret
1b7e1da809
Fix typo in SimpleStdoutLogger comment. (#1627) 2023-10-12 17:03:38 +02:00
Andrea Fioraldi
f6ba9de044
Add SplitBorrow trait to split borrow tuple_list elements (#1624)
* Add SplitBorrow trait to split borrow tuple_list elements

* clippy
2023-10-12 10:16:41 +02:00
Andrea Fioraldi
4c17da00b0
Clipped Fixxy (#1622)
* clippy fix

* fix

* fix

* it works

* imports
2023-10-11 21:19:30 +02:00
Andrea Fioraldi
6986317a03
Add iter() to owned slice (#1620) 2023-10-11 14:13:26 +02:00
Andrea Fioraldi
47cd4dfea6
Break on timeout in QEMU system mode (#1619)
* Break on timeout in QEMU system mode

* fix

* fix

* fix
2023-10-11 14:01:18 +02:00
Andrea Fioraldi
31f4669794
Autodetect llvm-config for QEMU bindings generation (#1610)
* Autodetect llvm-config for QEMU bindings generation

* fix ci

* Fix signal handlers without ucontext pointer

* ci
2023-10-10 15:26:32 +02:00
Dongjia "toka" Zhang
f17e49e9aa
Remove warnings (#1609)
* two falgs

* UNIX ONLY FLAGS

* moa

* FMT
2023-10-05 15:25:55 +02:00
Andrea Fioraldi
cffbf069d2
Call the original QEMU user crash handler in libafl_qemu (#1575)
* Call the original QEMU user crash handler in libafl_qemu

* Return if real crash or not

* merge

* Fix singal handlers in libafl and libafl_qemu

* doc and clippy

* clippy

* clippy

* clippy

* slirp

* fix

* fix system
2023-10-05 15:24:21 +02:00
Dominik Maier
25409119ff
Make Signals compatible with nix, implement TryFrom<&str> (#1599)
* Make our signals compatible to nix Signals

* no-default nix
2023-10-03 17:33:45 +09:00
Dongjia "toka" Zhang
60b3408737
Update dependencies (#1588)
* update

* downgrade some
2023-10-01 07:20:23 -05:00
Abc Xyz
6f67919622
fix(minibsod): allow dump_registers and write_crash for Android x86_64 (#1577) 2023-09-29 17:10:15 -04:00
Dominik Maier
f70a16a09a
Fix unsoundness for misaligned map observers (#1530)
* Fix unsoundness for misaligned map observers

* nits

* clippy

* Make sure beginning of the page is aligned
2023-09-20 18:25:37 +02:00
Addison Crump
8f6efe993d
Address recent clippy changes; build clippy in debug instead of release for perf (#1516) 2023-09-19 00:42:46 +02:00
Fabian Freyer
27333f9ce8
libafl_bolts fix potentially unaligned ucontexts in signal handler (#1520)
When entering a signal handler, the ucontext_t is not necessarily 0x10-aligned, so we need to use read_unaligned instead of dereferencing.
2023-09-18 23:17:54 +02:00
David CARLIER
b090bc7b4b
bolts: openbsd (snapshot) clippy fix (#1502) 2023-09-06 03:39:43 +02:00
David CARLIER
1b6ef52a4e
bolts core affinity illumos clippy fixes (#1497) 2023-09-02 21:56:22 +02:00
David CARLIER
7e5a1dba05
bolts linux arm64 clippy fix build (#1496) 2023-09-02 01:35:05 +02:00
David CARLIER
d0d378c174
bolts write_minibsod solaris version (#1494) 2023-08-31 22:48:43 +02:00
Andrea Fioraldi
00033426e7
Bump to 0.11.1 (#1491) 2023-08-31 15:07:31 +02:00
Addison Crump
9149d69699
Fixes for serdeany_autoreg (#1479)
* fixes for serdeany_autoreg

* fmt

* yet more docs

---------

Co-authored-by: Dominik Maier <dmnk@google.com>
2023-08-30 00:13:50 +02:00
Alexander Qi
51e4d814fb
bolts: Fix shmem leak when Drop-ing CommonUnixShMem (#1484) 2023-08-29 18:10:59 +02:00
Dominik Maier
61ad4a6ee8
bolts: Make xxh3 hashing optional with xxh3 feature flag (else use ahash for everything) (#1478)
* Make xxh3 hashing optional (and default to ahash)

* make xxh3 default anyway

* move import

* fix no_alloc

* No ahash without alloc

* fix import

* Keep xxh3 as default for libafl as well

* no randomness for xoshiro
2023-08-29 16:22:46 +02:00
Dominik Maier
7d2c854b71
Introduce document-features feature (#1477) 2023-08-29 12:40:35 +02:00
Andrea Fioraldi
7dd7c1a485
Bump to 0.11.0 (#1469)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-08-28 15:36:43 +02:00
Dominik Maier
b45985c76b
Less pub in LLMP (#1470)
* Less pub in LLMP

* add mut to docstring

* fix eample
2023-08-28 13:18:58 +02:00
Dominik Maier
1357b9f310
Add Broker.peek_next_client_id (#1468)
* Add Broker::next_client_id

* rename to peek_

* Undo change, probably not better
2023-08-28 09:00:05 +02:00
Dominik Maier
0a0c4639a6
Replace manual binary search with stdlib (#1466) 2023-08-27 23:12:36 +02:00
David CARLIER
fc6df5ef47
llmp: switch to binary search (#1465) 2023-08-26 13:52:14 +02:00
David CARLIER
4a96354276
bolts: fix netbsd/openbsd clippy (#1459) 2023-08-24 21:41:44 +02:00
David CARLIER
209d38a768
bolts: disable build for rust < 1.70 proposal. (#1460)
mostly due std::cell namespace introduction in the 1.70 version.
as rust versions evolve fast enough, it might be easier than
having conditional dependency on he old once_cell crate.
2023-08-24 21:41:26 +02:00