ok github.com/google/syzkaller/dashboard/app (cached) ? github.com/google/syzkaller/dashboard/dashapi [no test files] ok github.com/google/syzkaller/executor 0.313s ok github.com/google/syzkaller/pkg/ast 1.056s ok github.com/google/syzkaller/pkg/bisect 3.165s ok github.com/google/syzkaller/pkg/build 1.425s ok github.com/google/syzkaller/pkg/compiler 2.219s ok github.com/google/syzkaller/pkg/config (cached) --- FAIL: TestReportGenerator (3.25s) --- FAIL: TestReportGenerator/fuchsia-amd64 (0.00s) --- FAIL: TestReportGenerator/fuchsia-amd64/good-pie (0.05s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test937514063/kcov.o /tmp/syz-cover-test937514063/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-amd64/good (0.05s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test818224868/kcov.o /tmp/syz-cover-test818224868/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-amd64/no-coverage (0.06s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test318533133/kcov.o /tmp/syz-cover-test318533133/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-amd64/bad-pcs (0.06s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test784744481/kcov.o /tmp/syz-cover-test784744481/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-amd64/no-pcs (0.06s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test946839897/kcov.o /tmp/syz-cover-test946839897/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-amd64/no-debug-info (0.06s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test712375564/kcov.o /tmp/syz-cover-test712375564/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-amd64/good-pie-relocs (0.13s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test626049354/kcov.o /tmp/syz-cover-test626049354/kcov.c -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64 (0.00s) --- FAIL: TestReportGenerator/fuchsia-arm64/good-pie (0.01s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test039765475/kcov.o /tmp/syz-cover-test039765475/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64/good-pie-relocs (0.05s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test680255689/kcov.o /tmp/syz-cover-test680255689/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64/no-coverage (0.05s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test229362784/kcov.o /tmp/syz-cover-test229362784/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64/no-debug-info (0.05s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test157913843/kcov.o /tmp/syz-cover-test157913843/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64/good (0.13s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test254354440/kcov.o /tmp/syz-cover-test254354440/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64/bad-pcs (0.13s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test462112157/kcov.o /tmp/syz-cover-test462112157/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory --- FAIL: TestReportGenerator/fuchsia-arm64/no-pcs (0.13s) report_test.go:160: failed to start /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [/syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang -c -w -x c -o /tmp/syz-cover-test372159842/kcov.o /tmp/syz-cover-test372159842/kcov.c -Wno-deprecated -target aarch64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/arm64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/arm64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/arm64/arm64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384]: fork/exec /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang: no such file or directory FAIL FAIL github.com/google/syzkaller/pkg/cover 4.022s ? github.com/google/syzkaller/pkg/cover/backend [no test files] --- FAIL: TestGenerate (4.92s) --- FAIL: TestGenerate/fuchsia/amd64 (0.12s) csource_test.go:68: seed=1612457991149442676 --- FAIL: TestGenerate/fuchsia/amd64/0 (0.12s) csource_test.go:124: opts: {Threaded:false Collide:false Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_one(void) { intptr_t res = 0; memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); syz_future_time(1); syz_job_default(); syz_mmap(0x20ffd000, 0x1000); syz_process_self(); syz_thread_self(); syz_vmar_root_self(); } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor675080142 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/11 (0.13s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:true Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor399052751 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/7 (0.13s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:true RepeatTimes:0 Procs:0 Slowdown:10 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 500); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor091068130 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/4 (0.14s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:true RepeatTimes:10 Procs:0 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor896492644 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/9 (0.14s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:false HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor584770675 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/2 (0.06s) csource_test.go:124: opts: {Threaded:true Collide:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; int collide = 0; again: for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (collide && (call % 2) == 0) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); if (!collide) { collide = 1; goto again; } } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor966646686 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/3 (0.07s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:false RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void loop(void) { int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor005187685 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/6 (0.07s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); for (procid = 0; procid < 4; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor909081728 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/13 (0.07s) csource_test.go:124: opts: {Threaded:true Collide:true Repeat:true RepeatTimes:0 Procs:2 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:true Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; int collide = 0; again: for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (collide && (call % 2) == 0) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); if (!collide) { collide = 1; goto again; } } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); for (procid = 0; procid < 2; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor118879199 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/5 (0.02s) csource_test.go:124: opts: {Threaded:true Collide:false Repeat:true RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none Fault:false FaultCall:0 FaultNth:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false USB:false VhciInjection:false Wifi:false Sysctl:false UseTmpDir:true HandleSegv:false Repro:false Trace:false} program: rename(&(0x7f0000000000)='./file0\x00', &(0x7f0000000040)='./file0\x00') creat(&(0x7f0000000080)='./file0\x00', 0x4) r0 = zx_deadline_after(0x6) zx_channel_call$fuchsia_cobalt_LoggerLogIntHistogram(0x0, 0x0, r0, &(0x7f00000101c0)={&(0x7f00000000c0)={{}, 0x0, 0x8, {0x9, 0xffffffffffffffff}, {0x8, 0xffffffffffffffff}, {'$:%-,(\\-'}, {[{0x200, 0x3}, {0x3, 0x9}], [{}]}}, &(0x7f0000000140)={[{}, {}]}, &(0x7f0000000180), &(0x7f0000010180), 0x58, 0x0, 0x10000}, &(0x7f0000010200), &(0x7f0000010240)) r1 = zx_deadline_after(0x9) zx_channel_call$fuchsia_cobalt_LoggerLogCustomEvent(0x0, 0x0, r1, &(0x7f00000204c0)={&(0x7f0000010280)={{}, 0x80, {0x7}, {[{{0x1, 0xffffffffffffffff}, @index_value={0x4, 0x40}}, {{0xa3, 0xffffffffffffffff}, @int_value={0x2, 0x100}}, {{0x200, 0xf0d578772b85ab89}, @string_valueInLine={0x1, {0x4, 0xffffffffffffffff}}}, {{0x80000000, 0xffffffffffffffff}, @int_value}, {{0x1, 0xffffffffffffffff}, @double_value={0x3, 0x1}}, {{0xe3b7, 0x5e1f7aa474eb90a0}, @double_value={0x3, 0x4}}, {{0x1, 0xffffffffffffffff}, @string_valueInLine={0x1, {0x3, 0xffffffffffffffff}}}], [{{'$:%-,(\\-'}}, {{'$:%-,(\\-'}}, {{'!'}}, {{'-$$'}}, {{'@\x9a\'},-\xf9'}}, {{'$:%-,(\\-'}}, {{'/\\\xf9.-\'!,&'}}, {}, {{'$:%-,(\\-'}}]}}, &(0x7f0000010440)={[{}, {}, {}, {}, {}, {}, {}, {}]}, &(0x7f0000010480), &(0x7f0000020480), 0x184, 0x0, 0x10000}, &(0x7f0000020500), &(0x7f0000020540)) zx_channel_read$fuchsia_io_DirectoryAdminOnOpen(0x0, 0x0, &(0x7f0000030700), 0x10000, &(0x7f0000040700)={@device={0x0}}, 0x4, &(0x7f0000040740), &(0x7f0000040780)) zx_channel_create$fuchsia_cobalt_MetricEventLoggerFactory(0x0, &(0x7f0000040800), &(0x7f0000040840)=0x0) zx_channel_create$fuchsia_process_Resolver(0x0, &(0x7f0000040880), &(0x7f00000408c0)=0x0) zx_channel_write$fuchsia_process_LauncherAddHandles(r2, 0x0, &(0x7f00000407c0)={{}, {0x7}, {[{0xffffffff}, {0xffffffff}], [{}]}}, 0x30, &(0x7f0000040980)={[{r3}, {r4}, {}, {}, {}, {}, {}]}, 0x1c) syz_execute_func(&(0x7f0000000000)="c482d50331c46101dcc76636f342a4c401285c766fc4025d0252ffc4215b10e5f3460fa7c08f6870cd860ba1f47a7bc4c13dd14810c4428537b339410000") syz_future_time(0x1) syz_job_default() syz_mmap(&(0x7f0000ffd000/0x1000)=nil, 0x1000) syz_process_self() syz_thread_self() syz_vmar_root_self() csource_test.go:125: failed to build program: // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static void use_temporary_dir(void) { char tmpdir_template[] = "/tmp/syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) usleep(200); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout_ms) { uint64_t start = current_time_ms(); for (;;) { if (__atomic_load_n(&ev->state, __ATOMIC_RELAXED)) return 1; if (current_time_ms() - start > timeout_ms) return 0; usleep(200); } } long syz_mmap(size_t addr, size_t size) { zx_handle_t root = zx_vmar_root_self(); zx_info_vmar_t info; zx_status_t status = zx_object_get_info(root, ZX_INFO_VMAR, &info, sizeof(info), 0, 0); if (status != ZX_OK) { return status; } zx_handle_t vmo; status = zx_vmo_create(size, 0, &vmo); if (status != ZX_OK) { return status; } uintptr_t mapped_addr; status = zx_vmar_map(root, ZX_VM_FLAG_SPECIFIC_OVERWRITE | ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE, addr - info.base, vmo, 0, size, &mapped_addr); zx_status_t close_vmo_status = zx_handle_close(vmo); if (close_vmo_status != ZX_OK) { } return status; } static long syz_process_self(void) { return zx_process_self(); } static long syz_thread_self(void) { return zx_thread_self(); } static long syz_vmar_root_self(void) { return zx_vmar_root_self(); } static long syz_job_default(void) { return zx_job_default(); } static long syz_future_time(volatile long when) { zx_time_t delta_ms = 10000; switch (when) { case 0: delta_ms = 5; break; case 1: delta_ms = 30; break; } zx_time_t now = 0; zx_clock_get(ZX_CLOCK_MONOTONIC, &now); return now + delta_ms * 1000 * 1000; } static void loop(); static int do_sandbox_none(void) { loop(); return 0; } #define CAST(f) ({void* p = (void*)f; p; }) static long syz_execute_func(volatile long text) { ((void (*)(void))(text))(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 17; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); static void loop(void) { execute_one(); } uint64_t r[5] = {0x0, 0x0, 0x0, 0x0, 0x0}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x20000000, "./file0\000", 8); memcpy((void*)0x20000040, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(rename))(0x20000000, 0x20000040); break; case 1: memcpy((void*)0x20000080, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t))CAST(creat))(0x20000080, 4); break; case 2: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(6); if (res == ZX_OK) r[0] = res; break; case 3: *(uint64_t*)0x200101c0 = 0x200000c0; *(uint32_t*)0x200000c0 = 0; *(uint8_t*)0x200000c4 = 0; *(uint8_t*)0x200000c5 = 0; *(uint8_t*)0x200000c6 = 0; *(uint8_t*)0x200000c7 = 1; *(uint64_t*)0x200000c8 = 0x7afcfd3000000000; *(uint32_t*)0x200000d0 = 0; *(uint32_t*)0x200000d4 = 8; *(uint64_t*)0x200000d8 = 9; *(uint64_t*)0x200000e0 = -1; *(uint64_t*)0x200000e8 = 8; *(uint64_t*)0x200000f0 = -1; memcpy((void*)0x200000f8, "$:%-,(\\-", 8); *(uint32_t*)0x20000100 = 0x200; *(uint64_t*)0x20000104 = 3; *(uint32_t*)0x2000010c = 3; *(uint64_t*)0x20000110 = 9; *(uint64_t*)0x200101c8 = 0x20000140; *(uint64_t*)0x200101d0 = 0x20000180; *(uint64_t*)0x200101d8 = 0x20010180; *(uint32_t*)0x200101e0 = 0x58; *(uint32_t*)0x200101e4 = 0; *(uint32_t*)0x200101e8 = 0x10000; *(uint32_t*)0x200101ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[0], 0x200101c0, 0x20010200, 0x20010240); break; case 4: res = -1; res = ((intptr_t(*)(intptr_t))CAST(zx_deadline_after))(9); if (res == ZX_OK) r[1] = res; break; case 5: *(uint64_t*)0x200204c0 = 0x20010280; *(uint32_t*)0x20010280 = 0; *(uint8_t*)0x20010284 = 0; *(uint8_t*)0x20010285 = 0; *(uint8_t*)0x20010286 = 0; *(uint8_t*)0x20010287 = 1; *(uint64_t*)0x20010288 = 0x3cfd7fbc00000000; *(uint32_t*)0x20010290 = 0x80; *(uint64_t*)0x20010294 = 7; *(uint64_t*)0x2001029c = 0; *(uint64_t*)0x200102a4 = 1; *(uint64_t*)0x200102ac = -1; *(uint32_t*)0x200102b4 = 4; *(uint32_t*)0x200102b8 = 0x40; *(uint64_t*)0x200102cc = 0xa3; *(uint64_t*)0x200102d4 = -1; *(uint32_t*)0x200102dc = 2; *(uint64_t*)0x200102e4 = 0x100; *(uint64_t*)0x200102f4 = 0x200; *(uint64_t*)0x200102fc = 0xf0d578772b85ab89; *(uint32_t*)0x20010304 = 1; *(uint64_t*)0x2001030c = 4; *(uint64_t*)0x20010314 = -1; *(uint64_t*)0x2001031c = 0x80000000; *(uint64_t*)0x20010324 = -1; *(uint32_t*)0x2001032c = 2; *(uint64_t*)0x20010334 = 0; *(uint64_t*)0x20010344 = 1; *(uint64_t*)0x2001034c = -1; *(uint32_t*)0x20010354 = 3; *(uint64_t*)0x2001035c = 1; *(uint64_t*)0x2001036c = 0xe3b7; *(uint64_t*)0x20010374 = 0x5e1f7aa474eb90a0; *(uint32_t*)0x2001037c = 3; *(uint64_t*)0x20010384 = 4; *(uint64_t*)0x20010394 = 1; *(uint64_t*)0x2001039c = -1; *(uint32_t*)0x200103a4 = 1; *(uint64_t*)0x200103ac = 3; *(uint64_t*)0x200103b4 = -1; memcpy((void*)0x200103bc, "$:%-,(\\-", 8); memcpy((void*)0x200103c4, "$:%-,(\\-", 8); memcpy((void*)0x200103cc, "!", 1); memcpy((void*)0x200103d4, "-$$", 3); memcpy((void*)0x200103dc, "@\232\'},-\371", 7); memcpy((void*)0x200103e4, "$:%-,(\\-", 8); memcpy((void*)0x200103ec, "/\\\371.-\'!,&", 9); memcpy((void*)0x200103fc, "$:%-,(\\-", 8); *(uint64_t*)0x200204c8 = 0x20010440; *(uint64_t*)0x200204d0 = 0x20010480; *(uint64_t*)0x200204d8 = 0x20020480; *(uint32_t*)0x200204e0 = 0x184; *(uint32_t*)0x200204e4 = 0; *(uint32_t*)0x200204e8 = 0x10000; *(uint32_t*)0x200204ec = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_call))(0, 0, r[1], 0x200204c0, 0x20020500, 0x20020540); break; case 6: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_read))(0, 0, 0x20030700, 0x10000, 0x20040700, 4, 0x20040740, 0x20040780); if (res == ZX_OK) r[2] = *(uint32_t*)0x20040700; break; case 7: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040800, 0x20040840); if (res == ZX_OK) r[3] = *(uint32_t*)0x20040840; break; case 8: res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(zx_channel_create))(0, 0x20040880, 0x200408c0); if (res == ZX_OK) r[4] = *(uint32_t*)0x200408c0; break; case 9: *(uint32_t*)0x200407c0 = 0; *(uint8_t*)0x200407c4 = 0; *(uint8_t*)0x200407c5 = 0; *(uint8_t*)0x200407c6 = 0; *(uint8_t*)0x200407c7 = 1; *(uint64_t*)0x200407c8 = 0x5cd6900b00000000; *(uint64_t*)0x200407d0 = 7; *(uint64_t*)0x200407d8 = 0; *(uint32_t*)0x200407e0 = -1; *(uint32_t*)0x200407e4 = 0; *(uint32_t*)0x200407e8 = -1; *(uint32_t*)0x200407ec = 0; *(uint32_t*)0x20040980 = r[3]; *(uint32_t*)0x20040984 = r[4]; *(uint32_t*)0x20040988 = 0; *(uint32_t*)0x2004098c = 0; *(uint32_t*)0x20040990 = 0; *(uint32_t*)0x20040994 = 0; *(uint32_t*)0x20040998 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(zx_channel_write))(r[2], 0, 0x200407c0, 0x30, 0x20040980, 0x1c); break; case 10: memcpy((void*)0x20000000, "\xc4\x82\xd5\x03\x31\xc4\x61\x01\xdc\xc7\x66\x36\xf3\x42\xa4\xc4\x01\x28\x5c\x76\x6f\xc4\x02\x5d\x02\x52\xff\xc4\x21\x5b\x10\xe5\xf3\x46\x0f\xa7\xc0\x8f\x68\x70\xcd\x86\x0b\xa1\xf4\x7a\x7b\xc4\xc1\x3d\xd1\x48\x10\xc4\x42\x85\x37\xb3\x39\x41\x00\x00", 62); syz_execute_func(0x20000000); break; case 11: syz_future_time(1); break; case 12: syz_job_default(); break; case 13: syz_mmap(0x20ffd000, 0x1000); break; case 14: syz_process_self(); break; case 15: syz_thread_self(); break; case 16: syz_vmar_root_self(); break; } } int main(void) { syz_mmap(0x20000000, 0x1000000); use_temporary_dir(); do_sandbox_none(); return 0; } compiler invocation: /syzkaller/shared/fuchsia/prebuilt/third_party/clang/linux-x64/bin/clang [-o /tmp/syz-executor053392306 -DGOOS_fuchsia=1 -DGOARCH_amd64=1 -DHOSTGOOS_linux=1 -x c - -Wno-deprecated -target x86_64-fuchsia -ldriver -lfdio -lzircon --sysroot /syzkaller/shared/fuchsia/out/x64/zircon_toolchain/obj/zircon/public/sysroot/sysroot -I /syzkaller/shared/fuchsia/sdk/lib/fdio/include -I /syzkaller/shared/fuchsia/zircon/system/ulib/fidl/include -I /syzkaller/shared/fuchsia/src/lib/ddk/include -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.device.manager -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.nand -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/sdk/fidl/fuchsia.hardware.usb.peripheral -I /syzkaller/shared/fuchsia/out/x64/fidling/gen/zircon/vdso/zx -L /syzkaller/shared/fuchsia/out/x64/x64-shared -O2 -pthread -Wall -Werror -Wparentheses -Wframe-larger-than=16384] --- FAIL: TestGenerate/fuchsia/amd64/12 (0.06s) csource_test.go:122: --- FAIL: TestGenerate/fuchsia/amd64/1 (0.02s) csource_test.go:122: --- FAIL: TestGenerate/fuchsia/amd64/8 (0.03s) csource_test.go:122: --- FAIL: TestGenerate/fuchsia/amd64/10 (0.02s) csource_test.go:122: FAIL FAIL github.com/google/syzkaller/pkg/csource 7.938s ok github.com/google/syzkaller/pkg/db (cached) ? github.com/google/syzkaller/pkg/debugtracer [no test files] ok github.com/google/syzkaller/pkg/email (cached) ? github.com/google/syzkaller/pkg/gce [no test files] ? github.com/google/syzkaller/pkg/gcs [no test files] ? github.com/google/syzkaller/pkg/hash [no test files] ok github.com/google/syzkaller/pkg/host 7.066s ? github.com/google/syzkaller/pkg/html [no test files] ok github.com/google/syzkaller/pkg/ifuzz (cached) ? github.com/google/syzkaller/pkg/ifuzz/iset [no test files] ? github.com/google/syzkaller/pkg/ifuzz/powerpc [no test files] ? github.com/google/syzkaller/pkg/ifuzz/powerpc/generated [no test files] ? github.com/google/syzkaller/pkg/ifuzz/x86 [no test files] ? github.com/google/syzkaller/pkg/ifuzz/x86/gen [no test files] ? github.com/google/syzkaller/pkg/ifuzz/x86/generated [no test files] ok github.com/google/syzkaller/pkg/instance 0.455s ok github.com/google/syzkaller/pkg/ipc 5.785s ? github.com/google/syzkaller/pkg/ipc/ipcconfig [no test files] ? github.com/google/syzkaller/pkg/kcidb [no test files] ok github.com/google/syzkaller/pkg/kconfig 0.484s ok github.com/google/syzkaller/pkg/kd (cached) ok github.com/google/syzkaller/pkg/log (cached) ok github.com/google/syzkaller/pkg/mgrconfig 0.046s ok github.com/google/syzkaller/pkg/osutil (cached) ok github.com/google/syzkaller/pkg/report 2.643s ok github.com/google/syzkaller/pkg/repro 0.096s ? github.com/google/syzkaller/pkg/rpctype [no test files] ok github.com/google/syzkaller/pkg/runtest 32.413s ok github.com/google/syzkaller/pkg/serializer (cached) ? github.com/google/syzkaller/pkg/signal [no test files] ok github.com/google/syzkaller/pkg/symbolizer (cached) ok github.com/google/syzkaller/pkg/tool (cached) ok github.com/google/syzkaller/pkg/vcs (cached) ok github.com/google/syzkaller/prog 22.755s ok github.com/google/syzkaller/prog/test (cached) ? github.com/google/syzkaller/sys [no test files] ? github.com/google/syzkaller/sys/akaros [no test files] ? github.com/google/syzkaller/sys/akaros/gen [no test files] ? github.com/google/syzkaller/sys/freebsd [no test files] ? github.com/google/syzkaller/sys/freebsd/gen [no test files] ? github.com/google/syzkaller/sys/fuchsia [no test files] ? github.com/google/syzkaller/sys/fuchsia/fidlgen [no test files] ? github.com/google/syzkaller/sys/fuchsia/gen [no test files] ? github.com/google/syzkaller/sys/fuchsia/layout [no test files] ok github.com/google/syzkaller/sys/linux 0.089s ? github.com/google/syzkaller/sys/linux/gen [no test files] ? github.com/google/syzkaller/sys/netbsd [no test files] ? github.com/google/syzkaller/sys/netbsd/gen [no test files] ok github.com/google/syzkaller/sys/openbsd (cached) ? github.com/google/syzkaller/sys/openbsd/gen [no test files] ? github.com/google/syzkaller/sys/syz-extract [no test files] ? github.com/google/syzkaller/sys/syz-sysgen [no test files] ? github.com/google/syzkaller/sys/targets [no test files] ? github.com/google/syzkaller/sys/test [no test files] ? github.com/google/syzkaller/sys/test/gen [no test files] ? github.com/google/syzkaller/sys/trusty [no test files] ? github.com/google/syzkaller/sys/trusty/gen [no test files] ? github.com/google/syzkaller/sys/windows [no test files] ? github.com/google/syzkaller/sys/windows/gen [no test files] ok github.com/google/syzkaller/syz-ci 0.921s ok github.com/google/syzkaller/syz-fuzzer 0.508s ok github.com/google/syzkaller/syz-hub 0.029s ok github.com/google/syzkaller/syz-hub/state 0.061s ok github.com/google/syzkaller/syz-manager 0.413s ? github.com/google/syzkaller/tools/syz-benchcmp [no test files] ? github.com/google/syzkaller/tools/syz-bisect [no test files] ? github.com/google/syzkaller/tools/syz-build [no test files] ? github.com/google/syzkaller/tools/syz-check [no test files] ? github.com/google/syzkaller/tools/syz-cover [no test files] ? github.com/google/syzkaller/tools/syz-crush [no test files] ? github.com/google/syzkaller/tools/syz-db [no test files] ? github.com/google/syzkaller/tools/syz-execprog [no test files] ? github.com/google/syzkaller/tools/syz-expand [no test files] ? github.com/google/syzkaller/tools/syz-fmt [no test files] ? github.com/google/syzkaller/tools/syz-hubtool [no test files] ? github.com/google/syzkaller/tools/syz-imagegen [no test files] ? github.com/google/syzkaller/tools/syz-kcidb [no test files] ? github.com/google/syzkaller/tools/syz-kconf [no test files] ok github.com/google/syzkaller/tools/syz-linter (cached) ? github.com/google/syzkaller/tools/syz-make [no test files] ? github.com/google/syzkaller/tools/syz-minconfig [no test files] ? github.com/google/syzkaller/tools/syz-mutate [no test files] ? github.com/google/syzkaller/tools/syz-prog2c [no test files] ? github.com/google/syzkaller/tools/syz-reporter [no test files] ? github.com/google/syzkaller/tools/syz-repro [no test files] ? github.com/google/syzkaller/tools/syz-reprolist [no test files] ? github.com/google/syzkaller/tools/syz-runtest [no test files] ? github.com/google/syzkaller/tools/syz-showprio [no test files] ? github.com/google/syzkaller/tools/syz-stress [no test files] ? github.com/google/syzkaller/tools/syz-symbolize [no test files] ? github.com/google/syzkaller/tools/syz-testbuild [no test files] ? github.com/google/syzkaller/tools/syz-trace2syz [no test files] ok github.com/google/syzkaller/tools/syz-trace2syz/parser 0.014s ok github.com/google/syzkaller/tools/syz-trace2syz/proggen 0.216s ? github.com/google/syzkaller/tools/syz-tty [no test files] ? github.com/google/syzkaller/tools/syz-upgrade [no test files] ? github.com/google/syzkaller/tools/syz-usbgen [no test files] ok github.com/google/syzkaller/vm 8.067s ? github.com/google/syzkaller/vm/adb [no test files] ? github.com/google/syzkaller/vm/bhyve [no test files] ? github.com/google/syzkaller/vm/gce [no test files] ? github.com/google/syzkaller/vm/gvisor [no test files] ok github.com/google/syzkaller/vm/isolated 0.036s ? github.com/google/syzkaller/vm/kvm [no test files] ? github.com/google/syzkaller/vm/odroid [no test files] ? github.com/google/syzkaller/vm/qemu [no test files] ok github.com/google/syzkaller/vm/vmimpl 0.066s ? github.com/google/syzkaller/vm/vmm [no test files] ? github.com/google/syzkaller/vm/vmware [no test files] FAIL