syzkaller-xnu

Last updated: Mar. 23, 2026 by Sungwoo Kim.

Syzkaller1 has discovered 1,000+ bugs across multiple operating systems, including Apple's XNU kernel. However, the last update to XNU support was five years ago (for macOS 11.5) and no longer works on recent kernels. In addition, it mainly covers legacy system calls, leaving Mach and newly introduced system calls largely uncovered.

I therefore extended Syzkaller to support recent XNU kernels, including Mach system calls. The two primary technical challenges were (1) building XNU with KCOV and sanitizers, and (2) automatically extracting syscall descriptions. Challenge (1) is an engineering task, and this documents the workflow and operational tips. For (2), I developed a transpiler that automatically converts system call definitions into syzlang. This describes the design and limitations.

As a result, I ran Syzkaller on macOS 15.x in emulation and identified five previously unknown bugs. I reported these issues to Apple about six months ago, and three bugs are now fixed. This provides the bug analysis.

Source code is availabe at https://github.com/swkim101/syz-xnu

Index:

  1. Building an KCOV- and sanitizer-enabled XNU kernel
  2. Supporting new syscalls
  3. Bug discovery

Demo

Syzkaller coverage reports: dashboard / graphs / coverage (43MB)

Crash demo:

A non-root user can trigger an unexpected reboot. It is currently fixed.

PoC source: aio.c. Additional bugs and PoCs are documented in Bug discovery.

Limitations

Related works


  1. https://github.com/google/syzkaller back
  2. https://www.usenix.org/system/files/usenixsecurity23-yin.pdf back
  3. https://dl.acm.org/doi/pdf/10.1145/3658644.3690376 back
  4. https://www.ndss-symposium.org/wp-content/uploads/ndss2021_5B-2_23126_paper.pdf back
  5. https://www.usenix.org/system/files/usenixsecurity23-cai-zechao.pdf back