-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs/linux: add instructions for fuzzing Linux x86-64 kernel on Android virtual device #6293
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
Conversation
|
Hi @Radon10043 . Thanks for summarizing your experience as a documentation page!
Internal links or external links? |
|
Thanks! Please note the following |
| - enable `virtio-blk` so Cuttlefish can emulate the device as expected; | ||
| - and minimize kernel size. | ||
|
|
||
| Add the following flags to the `update_kasan_config` function in `common-android13-5.15/common/build.config.gki_kasan.x86_64`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's not already enabled in the default Cuttlefish configs.
See e.g. https://github.com/google/syzkaller/blob/master/pkg/build/cuttlefish.go
Here we build the common-modules/virtual-device:virtual_device_x86_64_dist target and end up with the VIRTIO_* configs already enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked cuttlefish.go. For build.sh, I found that kasan config provided by GKI will be used by syzkaller to build the kernel. However, based on my experience, this configuration will not enable VIRTIO_* related configs, leading to cuttlefish failing to emulate a virtual device.
syzkaller/pkg/build/cuttlefish.go
Lines 20 to 21 in 1804e95
| kernelConfig = "common/build.config.gki_kasan.x86_64" | |
| moduleConfig = "common-modules/virtual-device/build.config.virtual_device_kasan.x86_64" |
Regarding bazel, I'm not sure if the applied kernel config enables VIRTIO_* related configs. Going to verify it later.
syzkaller/pkg/build/cuttlefish.go
Line 22 in 1804e95
| bazelTarget = "//common-modules/virtual-device:virtual_device_x86_64_dist" |
|
Hi @a-nogikh ,
Thanks for the heads-up! I've just amended the commit to fix the line length in the description. The |
|
The CI will now fail because of the merge commit - we rebase instead. |
Hi syzkaller maintainers,
When I was trying to set up syzkaller for fuzzing the Linux kernel on an Android virtual device, I found that several crucial links are broken in existing documentation (leading to 404 errors). This may make the setup process challenging for new users.
To address this, I have created a new documentation page that provides instructions for fuzzing the Linux x86-64 kernel on an Android virtual device.
This new page specifically covers:
Hope this contribution will be helpful to the community!
Please let me know if any changes are needed.
Thanks!