-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproduce Linux ext4 Fuzzer Results #27
Comments
Hi there, Congrats on getting this to work! Perhaps you can elaborate on the changes you made / issues you encountered? I've seen a couple reports that PT feedback and/or VM loading did not work properly for this use case and it would be great to have a working tutorial again. Regarding the "lost seeds", I usually see this in connection with noisy coverage output due to non-deterministic target or buggy PT decode. The -funky option may help with this as it spends some more time to validate new findings. I don't recall what performance we can expect for ext4 fuzzing. If the performance of your corpus is degrading fast, it may help to set a more aggressive timeout initially so slow findings are discarded: kAFL/kAFL-Fuzzer/common/qemu.py Line 561 in 8c45d91
There is currently no logic to adapt the timeout dynamically, so you would have to restart fuzzing after some time with higher timeout. Check kafl_plot.py to see the execution time of individual inputs (perf=). Some stages are also a lot slower than others and you may get 'stuck' in these slow stages when facing a target with many or very long paths. You can run your corpus just using the havoc stage to see what speed you may get in the best case (add -D, and don't use -redqueen -grimoire -radamsa). Grimoire is probably not very useful for ext4. I would also disable Radamsa initially as it does a lot of repetition+length extension which can produce slow inputs. If you then see the fuzzer stuck for a long time in deterministic stages or even redqueen, consider disabling deterministic (-D) or limiting redqueen/deterministic to run only on favorite inputs (in state_logic.py handle_redqueen(), return if len(metadata["fav_bits"] ==0 or <=1). |
Thanks for the reply. So far disabling deterministic mode is improving perf considerably (up to about 2000 execs/s). Funky mode also does help decrease the frequency of "lost seeds", so I'll use that as well. I still haven't found any panics; my next steps are to look at different kernel configurations (make ext4 loadable, enable KASAN). As for my VM loading setup, here's a more detailed write-up:
|
…efile windows: remove virtio from template Makefile
Hello,
Awesome project, many thanks for maintaining it.
I'm attempting to reproduce the Linux ext4 fuzzer as described in the kAFL USENIX paper. I'm using the
-vm_dir
/-vm_ram
method to start an Ubuntu 16.10 VM, as follows:Some more details on this configuration:
debootstrap
to create the Ubuntu image. The kernel I'm using is a precompiled4.8.0-22-generic
.dd
/mkfs.ext4
/tune2fs
to generate a few 64KB seed images, then I'm appending 4 bytes to the end for the flags tomount
. In practice I usually need to pass at least 4 seeds to stop the fuzzer from getting stuck on the import phase.-ip0
range I'm looking through/proc/kallsyms
for ext4 functions. My first attempt used the entire kernel core range, but that seemed to slow down the fuzzer too much.fs-fuzzer.c
to addHYPERCALL_KAFL_LOCK
and a handshake at the beginning so I wouldn't need to use the loader binary.q35
topc
to get loadvm working, and the parallel-vm_ram
fix mentioned here: Failed to reuse ram.qcow2 in parallel fuzzing mode. #15 (comment)So far my fuzzer appears to run in a stable manner, but the performance I'm seeing makes me suspicious that something isn't configured right:
Any idea if there's an issue in my configuration that could be hampering performance? Any guidance is greatly appreciated.
The text was updated successfully, but these errors were encountered: