Gregory Petrosyan e1b8c9b5d8
libafl_bolts: improvements to the rands module, add next_float (#2086)
* rands: use splitmix64 for seeding

Seeding with splitmix64 is a good way to avoid starting with
low-entropy PRNG states, and is explicitly recommended
by the authors of both xoshiro256++ and Romu.

While at it, give the xoshiro256++ PRNG its proper name.

* rands: use fast_bound() to generate number in range

* rands: add top-level choose()

* rands: add Rand::next_float()

* rands: add Rand::coinflip() helper

* libafl: unbreak tests that relied on direct seeding

* rands: add SFC64 PRNG

SFC64 is a well-established and well-understood PRNG designed by
Chris Doty-Humphrey, the author of PractRand. It has been tested
quite a lot over the years, and to date has no known weaknesses.

Compared to xoshiro256++, it is slightly faster and is likely to
be a more future-proof design (xoshiro/xoroshiro family of generators
come with quite long history of [flaws][1] found over the years).

Compared to Romu, it is slightly slower, but guarantees absense
of bias, minimum period of at least 2^64 for any seed, and
non-overlapping streams for different seeds.

[1]: https://tom-kaitchuck.medium.com/designing-a-new-prng-1c4ffd27124d
2024-04-23 15:37:28 +02:00
..
2023-04-26 20:22:57 +02:00
2023-08-17 17:15:03 +02:00
2024-02-19 16:46:06 +01:00

LibAFL Utils

Welcome to the LibAFL Utils folder. Here, you find some helful utilities that may be helpful for successfull fuzzing campaigns.

DeExit: ldpreload exit lib

In the deexit folder, you'll find a ldpreloadable library, that changes calls to exit to abort()s. When a target exits, it quits, and LibAFL will not be able to catch this or recover. Abort, on the other hand, raises an error LibAFL's inprocess executor will be able to catch, thanks to its signal handlers.

Gramatron: gramatron grammars and preprocessing utils

See https://github.com/HexHive/Gramatron

libafl_benches

This folder contains benchmarks for various things in LibAFL, like hash speeds and RNGs. Run with cargo bench