On Wed, Aug 31, 2016 at 10:00:56AM +0000, Jussi Judin wrote:
> Ctrl-Z approach would require quite complicate startup/resume logic, as I (or
> anyone else) could not run afl on a random shell instance (like in Jenkins)
> and survive the death of that instance. I also took a look on approaches for
> generic process suspend/resumption given in those links. They are quite cool,
> but unfortunately are not really applicable to existing environments. They
> generally require newer kernel (3.11 or 3.19) that is available on many
> machines that are available and staying idle at night-time, specific kernel
> options, or binaries for reliable operation that require CAP_SYS_ADMIN (like
> pid namespacing). Also they are not necessarily easy to build and maintain, as
> for example criu has tons of dependencies to various packages that can be
> tricky to get working properly on all various Linux distributions (I assume)
> that we have possibility to use. Virtual machines also sound like a hammer
> approach into this problem and make it quite opaque to see what happens inside
> and special support from the host and guest system if I want to use shared
> directories to pass data between fuzzers inside the virtual machine and the
> outside world.
It seems to me that this and probably many other problems would be solved by
something I've dreamed of, but implementing what would obviously require work: A
master/slave fuzzing architecture where a single running master/tracker (that
doesn't itself fuzz) keeps track of fuzzing tasks assigned to slaves. I think
this with its implications would probably deviate somewhat from AFL's stated
goal of being very easy to use. The idea is that slaves are somehow guaranteed
to run in an identical enviroment - either guaranteed by the user running it
(garbage in, garbage out) or by transporting some kind of containers/VMs with
the software to be fuzzed. The master would keep track of which inputs exercise
globally new paths; the slaves would be just a fleet of fuzzers reporting back
results so that if 10% of them suddenly lose power the only thing you lose is
10% of fuzzing power and a few minutes of work per slave.
I think it could be useful for this fast restarting use case if the slaves could
just trust that the maps given to them by the master are valid, or retest a few
of them for a sanity check. I think this could also massively speed up the
deterministic fuzzing phase, as it could be split over multiple cores and
computers.
I think the initial steps for this would probably be to refactor the fork server
and mutation logics into generally usable libraries (also something I want to do
once I find the time). Also, call me dazzled by shiny new things, but I would
move to a higher level language for that logic, even if it be C++.
Sami