Kernel Fuzzing

Coverage-guided fuzzing of OS kernels, drivers, hypervisor-adjacent code and firmware, where the “input” is a sequence of syscalls, packets, files or device interactions, coverage comes from KCOV or a hypervisor, and reproducibility fights global kernel state.

How it works

  • Coverage: Linux KCOV is built for fuzzing. Enable CONFIG_KCOV, avoid KCOV_INSTRUMENT_ALL (slows and adds noise), and instrument only the subsystem under test — e.g. append KCOV_INSTRUMENT := y to every Makefile under net/ (Cloudflare: kernel fuzzing intro).
  • Engines: syzkaller is the standard Linux fuzzer, driven by syzlang descriptions of syscalls and their resources. Cloudflare showed the alternative of driving AFL with a userspace netlink shim whose KCOV coverage is mapped into AFL’s bitmap, inside KVM (Cloudflare). On Windows: WinAFL for kernel-reachable user-mode parsers (Check Point) and wtf for snapshot-based kernel-mode fuzzing (wtf).
  • State is the enemy: global pools, session tables and namespaces leak across programs, causing irreproducible crashes and false positives. See Fuzzing Harness Design.

Techniques

Remote attack surface (network)

xairy extended syzkaller with TUN/TAP packet injection via pseudo-syscalls (syz_emit_ethernet, syz_extract_tcp_res to learn sequence numbers for TCP), handled checksums, and collected coverage from packet-processing contexts with KCOV remote coverage. No “take over the Internet” bug, but a one-shot RCE in a non-public kernel flavor (xairy: RCE bugs in the Linux kernel).

In-kernel servers: ksmbd

Doyensec’s syzkaller work on ksmbd: wrote a grammar for every SMB2 command from MS-SMB2 (e.g. smb2_ioctl_req), parsed responses for TreeID/SessionID to chain valid state, enabled durable handles/oplocks/leases to widen surface, patched NTLMv2 auth (guest fallback) and credit limits, raised max connections = 128 after candidates got rejected, and tried reset_acc_state for determinism. focus_areas weighting ({"filter": {"functions": ["smb_check_perm_dacl"]}, "weight": 20.0}) drove an ACL that passed validation into an integer overflow. Output: CVE-2024-26980, CVE-2024-50283/-50285/-50286, and ~20 CVE-2025-2xxxx/-3xxxx ksmbd issues (Doyensec ksmbd).

net/sched and false positives

Repeated soft lockups (net_tx_action, tc_modify_qdisc, …) turned out to be syzkaller artifacts: reset_net_namespace does not truly reset namespaces, leaving residual state between programs. Fixing the net/sched syzlang descriptions removed the noise; of the bugs found, three were exploitable, including CVE-2025-38001 and CVE-2025-38616, with a kernelCTF payout (and the HangBuzz101 corCTF challenge) (willsroot: Syzkaller Summer).

LLM-generated descriptions

KernelGPT generates and iteratively repairs syzkaller specs for drivers/sockets from kernel source: 24 new bugs, 11 CVEs, specs merged upstream (eval_spec.py to reuse them) (KernelGPT). More on LLM-Assisted Fuzzing.

Concurrency

  • May-race-pair scheduling: decouple input generation from interleaving exploration, target “May Race Pairs”, LLM-assisted semantic mutation of syscall groups, backpressure thresholds — 187 data races (59 harmful), beating SegFuzz and CONZZER at equal budget (Concurrency fuzzing for data races).
  • MAccConc (Project Zero): memory-access tracing via KCOV/ASan instrumentation plus stack-based delay injection to confirm race candidates, write regression tests and explore interleavings, with TUI/GUI (P0 MAccConc).
  • Schedule shuffling: deterministic VMs like Rewind VM switch threads at rewind_point()s; even a counter++ race loses updates in 18 of 20 interleavings (Why shuffling the schedule finds bugs).

Windows

Check Point fuzzed EMF+ metafiles through GDI with WinAFL/WinAFL Pet; mutations kept bugchecking the host — a “denial of fuzzing” — traced (via memory dumps, Volatility/MemProcFS, and a client-server setup that stores each mutated file before it runs) to a bug in the new Rust kernel GDI component, fixed in OS Build 26100.4202 (KB5058499) (Check Point: Denial of Fuzzing). WinPE booted from RAM in QEMU makes a fast idempotent driver-test VM (WinPE harness).

macOS / XNU

Casco’s XNU harness (one decision per task, maximal determinism, isolated VMs, automatic PoC generation to prove reachability) produced 141 findings and 17 reports incl. CVE-2026-112524, -65350, -112507 (Casco XNU harness).

Firmware and multi-component targets

  • Metis rehosts EDK2 UEFI protocols in userspace (direct-dependency component rehosting) with LLM-guided harness synthesis: 73.1% coverage on 60 drivers, 137 new bugs (12 remotely triggerable), beating FuzzUEr (Metis).
  • MTCFuzz combines coverage from OS and firmware (OpenSBI) under QEMU (MTCFuzz).
  • Unicorn snapshot fuzzing of embedded daemons (Siemens PROFINET DCP) — see Fuzzing Harness Design (Nozomi).

Notable cases

  • ocfs2 local quota (CVE-2026-99430, GHSA-7vhf-83c4-h86c), modified syzkaller, filesystem-image surface (mount needs CAP_SYS_ADMIN, so the threat is untrusted removable media or loop-mounted files). ocfs2_local_read_info() trusts dqi_chunks == 0 from the image; ocfs2_local_quota_add_chunk() then reads the predecessor’s qc_num after list_add_tail, i.e. through the list head, landing on the dqi_gqinode pointer 16 bytes later. The truncating ol_dqblk_off() and full-width ol_dqblk_chunk_off() disagree, so release clears a bit far outside the bitmap. Triage lesson: the same bug surfaced as paging-request, KASAN UAF, slab-OOB, slab-UAF and KFENCE reports, because sanitizers name the object at the stray address, not the bug (GHSA-7vhf-83c4-h86c).
  • SUNRPC write_gssp() netns UAF (CVE-2026-99528), customized syzkaller via /proc/net/rpc/use-gss-proxy: the proc entry stored a struct net * without a reference and procfs pins only the proc_dir_entry, so open in a new netns → setns() back → write “1” increments an already-zero refcount while cleanup_net() is queued; the namespace is freed with an rpc_xprt and AF_LOCAL socket still pointing into it. Fix takes maybe_get_net() in the writer, as get_proc_net() does for other /proc/net files (GHSA-hv78-pcw8-89vv).
  • ksmbd CVE series (Doyensec); CVE-2025-38001/-38616 net/sched (willsroot); Rust GDI bugcheck (Check Point); XNU CVE trio (Casco); KernelGPT’s 11 CVEs.
  • Contrast: Microsoft FORGE’s MDASH used LLM code scanning (not fuzzing) on Linux subsystems for 59 upstream reports and 33 CVEs, heavily filtered by experts (Microsoft: 59 kernel reports).

Sources