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, avoidKCOV_INSTRUMENT_ALL(slows and adds noise), and instrument only the subsystem under test — e.g. appendKCOV_INSTRUMENT := yto every Makefile undernet/(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 acounter++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()trustsdqi_chunks == 0from the image;ocfs2_local_quota_add_chunk()then reads the predecessor’sqc_numafterlist_add_tail, i.e. through the list head, landing on thedqi_gqinodepointer 16 bytes later. The truncatingol_dqblk_off()and full-widthol_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 astruct net *without a reference and procfs pins only theproc_dir_entry, so open in a new netns →setns()back → write “1” increments an already-zero refcount whilecleanup_net()is queued; the namespace is freed with anrpc_xprtand AF_LOCAL socket still pointing into it. Fix takesmaybe_get_net()in the writer, asget_proc_net()does for other/proc/netfiles (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).
Related
Sources
- Linux kernel ocfs2 bug found by syzkaller fuzzing · original
- Linux kernel SUNRPC netns use-after-free (fuzzer-found) · original
- A Gentle Introduction to Linux Kernel Fuzzing · original
- Looking for RCE Bugs in the Linux Kernel · original
- ksmbd: Fuzzing Improvements and Vulnerability Discovery · original
- Syzkaller Summer: Fixing False Positive Soft Lockups in net/sched · original
- KernelGPT: Enhanced Kernel Fuzzing via LLMs · original
- Efficient concurrency fuzzing for Linux kernel data race detection · original
- Testing race conditions with memory access tracing and stack-based delay injection · original
- Why does shuffling the schedule find so many bugs? · original
- Denial of Fuzzing: Rust in the Windows kernel · original
- wtf: snapshot-based fuzzing of Windows user- and kernel-mode targets · original
- WinPE as a stateless harness for Windows driver testing and fuzzing · original
- Building an XNU bug-hunting harness: 141 findings, 17 reports · original
- Towards Effective Fuzzing of EDK2 Components (Metis) · original
- Multi-target Coverage-based Greybox Fuzzer · original
- Fuzzing Siemens PROFINET DCP with Unicorn-AFL · original
- Microsoft: Lessons from 59 Linux kernel bug reports · original