On Mon, Nov 21, 2016 at 8:26 PM, Alexander Popov <
alex....@linux.com> wrote:
> Hello,
>
> I would like to contribute to syzkaller. I've installed it and got 3 issues. I'm new to
> this project and not sure about my fixes. Could I have a feedback before making pull requests?
Hi!
Sure
> The first issue is about create-image.sh.
> It adds the string "V0:23:respawn:/sbin/getty 115200 hvc0" to inittab, but a fresh
> debian-wheezy doesn't have a hvc0 device. So getty fails to start and respawns over and
> over again. Does it work in your setup?
I saw messages about init restarting something and then disabling
because it restarts too frequently. But I had no idea what it is. Yes,
I guess we need to remove it.
> The second issue is about create-image.sh too. It tries to enable eth0 network interface,
> but there is no eth0 in a fresh debian-wheezy, since biosdevname renames interfaces. The
> simplest fix is disabling biosdevname by adding "net.ifnames=0 biosdevname=0" to the
> kernel command line. Would you like it?
If enabling fails, but everything works, should we just remove that
enabling of eth0?
I need to note that I just don't fully understand what happens here.
> The third issue is about CONFIG_KCOV.
> My kernel config is based on the default config of Linux Mint 18. It has
> CONFIG_RANDOMIZE_BASE and CONFIG_RANDOMIZE_MEMORY enabled. So applying addr2line to the
> output of the program from Documentation/kcov.txt doesn't give any sane result. Does
> CONFIG_KCOV conflict with KASLR?
CONFIG_KCOV per se works with KASLR... for some definition of "works".
It works in the sense that it just gives user real PCs with or without
KASLR. It's just that's it's more difficult to make some sense of out
of PCs with KASLR.
So far our strategy was simply to disable KASLR when we are building a
kernel for fuzzing. I don't see any serious downsides of this
approach. But it's definitely something to note in documentation
(added a note to
https://github.com/google/syzkaller/wiki/Kernel-configs).
Generally it would be nice to make syzkaller work with KASLR, but I
would not consider it a high priority (unless there is something I am
missing). Note the problem is not just with addr2line, syz-manager
compares coverage from different VMs, so it is faked into thinking
they all are covering new code, while in reality they are covering the
same code with different randomization offsets. Maybe we should just
make __sanitizer_cov_trace_pc subtract the base.
There is also a more serious issue with dynamically loaded modules --
we somehow need to "normalize" their PCs, so we that syz-manager can
compare coverage in modules loaded at different addresses.
Thanks