>> Among other things, an evil unprivileged user on the system can
>> pre-create symlinks (or hardlinks) in /tmp to cause you to clobber
>> sensitive files.
>
> That's still not something afl toolset should concern itself about, it's
> a completely unrelated (system administration) issue with no impact on the
> afl functionality.
Not sure I follow. AFL runs on operating systems that have semantics
that allow such attacks. That's not somebody else's problem, the
platform existed before AFL.
>> It really should not. If your core_pattern is not set correctly, AFL
>> will not be able to detect crashes, and the whole point of fuzzing
>> will be lost.
>
> That's not what afl-fuzz.c says on the issue - crashes can still be detected
> as no core_pattern can prevent you from getting the right WTERMSIG() from
> waitpid, just that it will be delayed and thus be potentially counted as
> a timeout if the user didn't set -t high enough.
There is no clear definition of "high enough"; on some OSes, this can
be several seconds (!). Setting -t to this value has an extremely
detrimental effect on many types of fuzzing jobs (to the point of
making them useless).
FWIW, you can override the check if you really want. It's just that
it's almost never a good idea - and the UX philosophy of AFL is very
different from rm -rf /, in that it really tries to help you do the
right thing.
[Jakub's mail:]
> - They check too much. For example, "afl-cmin -i /tmp/foo/in -o /tmp/foo/bar ..." will barf, even when /tmp/foo is accessible only to me. (I had to implement a gross work-around to make python-afl test suite pass in a subdirectory of /tmp...)
Yeah, they are just a prefix check to detect the most common misuse pattern.
> - They check too little. People might want to (ab)use /dev/shm as a substitute for /tmp, because the former is always tmpfs, unlike the latter. But afl-cmin hates only /tmp and /var/tmp.
Ditto.
Look, I'm not a fan of these checks. They are there basically because
I woke up one day thinking that somebody is gonna post a stupid
advisory. I can remove them if you are *really* bothered, or rework
the scripts to use set -C and then double-check that every single
utility we call (e.g., gnuplot) behaves safely (probably not). But...
why?=)
/mz