tree: df4cd45f9516115469e9506bdfd0499f1c69efa3 [path history] [tgz]
  1. cpp/
  2. BUILD.gn
  3. README.md
examples/fuzzers/zx/README.md

Zircon fuzzer

This example shows a trivial fuzzer for Zircon system calls.

Building

Configure your build to use Kernel Address Sanitizer:

fx set core.x64 --with //examples/fuzzers --variant=kasan
fx build

Running

You'll want to open 4 terminals to run this program. In terminal 1, start the emulator:

fx qemu -kN

In terminal 2, serve package updates:

fx serve

In terminal 3, read the logs:

fx log

In terminal 4, start the component:

ffx component run /core/ffx-laboratory:hello-fuzzy-world fuchsia-pkg://fuchsia.com/example-fuzzers#meta/hello-fuzzy-world.cm --recreate

The log should show the component issuing many pointless system calls. The kernel should safely reject all these calls. If it does not, please file a bug!