Hi Pengfei,
Thank you for your interest in syzkaller and syzbot!
Please find my comments below.
On Sun, Jun 4, 2023 at 5:07 AM Xu, Pengfei <
pengf...@intel.com> wrote:
>
> Hi Dmitry and Aleksandr,
>
> Greeting!
>
> I am a user of syzkaller, thank you for creating this great fuzzing tool, found many valuable bugs for the Linux kernel and other operating systems.
>
> This is a great fuzzing tool!
>
> For the issue link in “linux-xfs” community:
https://lore.kernel.org/all/20230526205...@mit.edu/
>
> I think there are 3 points that led me to find some bugs that syzbot didn't find, thanks for corrections or comments if any.
>
> Kconfig difference like IOMMUFD.
> Syzkaller is a KCOV-oriented random fuzzing test tool: different syzkaller instances may fill the syscall parameters with different random values and use different combinations of syscalls to find different problems with a certain probability.
Yes, kernel fuzzing is very probabilistic and we've also observed that
every time syzkaller is run, it finds slightly different sets of bugs.
So at least in some cases your instances might have just had more luck
than those of syzbot :)
> Platform specific like Alder lake hybrid platforms for perf related issues.
>
> If possible, can I get the following answers, without infringing on the confidentiality of your company:
>
> Kconfig: does syzbot enable IOMMUFD in general tests on Intel x86 platform?
The upstream Linux kernel configurations we fuzz are public (not all
files there are being used, but we only use configs from this folder):
https://github.com/google/syzkaller/tree/master/dashboard/config/linux
We tried to cover as many options as we could, but there are of course
still many good-to-test configs that we didn't notice/know of. If you
have any suggestions as to what else could be enabled, feel free to
share with us.
> May I suggest to syzbot some new kconfig settings for syzbot in future or should I figure out a way to cover these kconfig configurations, based on the interests of the respective companies?
>
> If IOMMUFD is enabled as follow in kconfig for guest:
>
> CONFIG_IOMMUFD=y
>
> CONFIG_IOMMUFD_TEST=y
>
> CONFIG_IOMMUFD_VFIO_CONTAINER=y
>
> CONFIG_FAULT_INJECTION=y
Out of these configuration options, we currently only don't set
CONFIG_IOMMUFD_VFIO_CONTAINER=y:
https://github.com/google/syzkaller/blob/058b3a5a6a945a55767811552eb7b9f4a20307f8/dashboard/config/linux/upstream-apparmor-kasan.config#L7138-L7140
I can enable it, that's not a problem at all.
> And then below non-IOMMUFD VFIO_CONTAINER will be set to n automatically if above CONFIG_IOMMUFD_VFIO_CONTAINER is set to y.
>
> CONFIG_CONFIG_VFIO_CONTAINER=n // Maybe there are 2 kconfigs IOMMUFD and legacy VFIO settings we should cover.
I think it should be fine since we don't set
CONFIG_CONFIG_VFIO_CONTAINER=y at the moment anyway.
But, apart from Kconfig, we should also somehow make iommu available
to the fuzzed kernel/VM, right? Otherwise fuzzing won't go very deep
into the code. Qemu seems to have a "-device intel-iommu" option. Are
you aware of any other alternatives?
> A maintainer asked me privately how many machines syzbot uses to run syzkaller?
(The figures below are only about upstream Linux kernel fuzzing)
We have a pretty diverse setup in terms of fuzzed kernel trees /
different sanitizers, but not so diverse in terms of CPU platforms.
These use e2-standard-2 VMs for fuzzing:
ci-upstream-kasan-gce -- 10 VMs
ci-upstream-kasan-gce-root -- 10 VMs
ci-upstream-kasan-gce-selinux-root -- 10 VMs
ci-upstream-kasan-gce-smack-root -- 10 VMs
ci-upstream-linux-next-kasan-gce-root -- 10 VMs
ci-upstream-bpf-kasan-gce -- 7 VMs
ci-upstream-bpf-next-kasan-gce -- 10 VMs
ci-upstream-net-this-kasan-gce -- 7 VMs
ci-upstream-net-kasan-gce -- 10 VMs
ci-upstream-kasan-gce-386 -- 5 VMs
ci-upstream-gce-leak -- 10 VMs
ci-upstream-kmsan-gce -- 10 VMs
ci-upstream-kmsan-gce-386 -- 5 VMs
ci-upstream-gce-arm64 -- 8 VMs
ci2-upstream-usb -- 10 VMs
ci2-upstream-kcsan-gce -- 5 VMs
ci2-upstream-fs -- 10 VMs
Around 150 in total?
Also these run on a Intel Ice Lake machine:
ci-qemu-upstream -- 5 qemu VMs
ci-qemu-upstream-386 -- 5 qemu VMs
And these on an AMD Rome machine:
ci-qemu2-arm32 -- 5 emulated qemu VMs
ci-qemu2-arm64 -- 5 emulated qemu VMs
ci-qemu2-arm64-compat -- 5 emulated qemu VMs
ci-qemu2-arm64-mte -- 5 emulated qemu VMs
ci-qemu2-riscv64 -- 10 emulated qemu VMs
All syz-manager instances above are united via syz-hub [1], so they
exchange programs/reproducers and, in some sense, act like one big
syzkaller instance.
[1]
https://github.com/google/syzkaller/blob/master/docs/hub.md
> Why I can find some bugs that syzbot didn't find, they think that as long as there are enough platforms, it should be able to make up for such a gap.
If the issues are platform-specific, then that should definitely help.
> Currently I used Intel x86 platforms like Alder lake-s, Raptor lake-p/s, Tiger lake and so on platforms, about 8 machines are running syzkaller fuzzing test on Intel x86 platforms.
By the way, are you running syzkaller on real devices (via e.g.
isolated mode) or do you fuzz kernels in virtual machines that are
running on those platforms?
> Platform specific, may I ask which types of Intel x86 platforms syzbot are using for syzkaller fuzzing?
As I described above, there are some qemu instances on Intel Ice Lake
and the rest are just transient E2 VMs:
https://cloud.google.com/compute/docs/general-purpose-machines#e2_machine_types
(sometimes Intel, sometimes AMD?)
I think we may well consider making our setup more diverse in terms of
platforms, but it'd be great to first understand what available CPU
platforms can enable what Linux kernel feature fuzzing.
> Ted mentioned that:
>
> “
> If we could import the fuzzing seed for this and similar reports into Google's syzkaller instance, it seems to
> me that this would be a Good Thing.
> ”
>
> And if my private syzkaller found some bugs that syzbot didn’t find in mainline kernel.
>
> Could I import the fuzzing report seed to syzbot like Ted mentioned?
>
> Is syzbot willing to accept the above way of releasing bugs from other private syzkaller to the Linux kernel community?
>
> I also have the following concerns: whether it will affect the interests of their respective companies and the efficiency of reporting in this way.
(I'll leave these questions unanswered in this email, we'll send a
separate reply re. this)
--
Best Regards,
Aleksandr
>
>
> Thanks!
>
> BR
>
> Pengfei
>