Skip to content

Conversation

@Radon10043
Copy link
Contributor

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:

  • How to build the Android Generic System Image (GSI).
  • How to build the corresponding Generic Kernel Image (GKI).
  • How to launch the Android virtual device on an Ubuntu host and fuzz its kernel with syzkaller.

Hope this contribution will be helpful to the community!

Please let me know if any changes are needed.

Thanks!

@tarasmadan
Copy link
Collaborator

Hi @Radon10043 . Thanks for summarizing your experience as a documentation page!

several crucial links are broken in existing documentation (leading to 404 errors)

Internal links or external links?

@a-nogikh
Copy link
Collaborator

Thanks!

Please note the following ci/aux error:

Error: Please limit commit description line length to 120 characters.

- 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`:
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

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.

bazelTarget = "//common-modules/virtual-device:virtual_device_x86_64_dist"

@Radon10043
Copy link
Contributor Author

Hi @tarasmadan ,

Internal links or external links?

Some external links are broken. Here is the list of invalid links I found:

@Radon10043
Copy link
Contributor Author

Hi @a-nogikh ,

Thanks!

Please note the following ci/aux error:

Error: Please limit commit description line length to 120 characters.

Thanks for the heads-up!

I've just amended the commit to fix the line length in the description. The ci/aux check should pass now.

@a-nogikh
Copy link
Collaborator

The CI will now fail because of the merge commit - we rebase instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants