Abstract
File systems are critical kernel components whose complexity makes them prone to bugs. Traditional fuzzers struggle with large disk images, context-dependent syscalls, and "OS aging" that hinders reproducibility. This paper presents JANUS, a first-of-its-kind feedback-driven fuzzer that explores a two-dimensional input space: disk image metadata and context-aware system calls. By utilizing a Library OS (LKL) for rapid, clean-slate execution, JANUS discovered 90 bugs in the Linux kernel, including 32 CVEs, while achieving significantly higher code coverage and reproducibility than state-of-the-art tools.
Introduction
File systems are the bedrock of data integrity, yet their implementation is massive and complex—Btrfs alone contains approximately 130,000 lines of code. Fuzzing these systems effectively presents three major challenges:
- The "Large Blob" Problem: Disk images are often 100MB or larger. Randomly mutating such large binaries is computationally expensive and statistically unlikely to hit critical metadata structures.
- Context-Awareness: System calls are highly dependent on the disk state. Executing a
rename()on a non-existent file terminates the execution path prematurely, wasting fuzzing resources. - OS Aging and Reproducibility: Running thousands of syscalls on a single Virtual Machine (VM) instance leads to "dirty" kernel states. Crashes may result from cumulative side effects rather than the final syscall, making bugs nearly impossible to reproduce.
Methodology: Two-Dimensional Exploration
JANUS addresses these challenges by treating file system fuzzing as a two-dimensional exploration problem involving the image dimension (static disk state) and the operation dimension (syscall sequences).
Metadata-only Mutation
Rather than fuzzing the entire disk image, JANUS uses file-system-specific parsers to identify and mutate only metadata blocks, which typically comprise only ~1% of the image. It also recalculates checksums to ensure the kernel does not reject the mutated image during mounting.
Image-Directed Syscall Fuzzing
To maintain context, JANUS probes the mutated image to identify existing files and directories. It uses this information to generate meaningful syscall sequences, such as targeting rmdir() only at actual directories found on the disk.
Library OS (LKL) Executor
JANUS replaces heavy VMs with the Linux Kernel Library (LKL). This allows the kernel to run as a user-space library. JANUS can "reboot" the kernel by forking a new process, providing a clean-slate OS state in roughly 10ms—orders of magnitude faster than traditional VM reboots (~14s) or snapshot reverts (~1.4s).
Evaluation and Results
The researchers evaluated JANUS against eight Linux file systems, including mainstream (ext4, XFS, Btrfs, F2FS) and legacy/specialized (GFS2, HFS+, ReiserFS, VFAT) systems. JANUS was compared against Syzkaller, the industry-standard kernel fuzzer.
Bug Discovery and Coverage
JANUS found 90 unique bugs in the upstream Linux kernel, resulting in 32 assigned CVEs. In head-to-head tests, JANUS achieved vastly superior code coverage, visiting 4.19x more code paths in Btrfs and 2.01x more in ext4 compared to Syzkaller over a 12-hour period.
Stability and Efficiency
A key breakthrough was solving the reproducibility crisis. JANUS reproduced 88–100% of its found crashes because it starts every test case with a fresh kernel state. In contrast, Syzkaller failed to reproduce any crashes found during the same period due to the OS aging issue.
Conclusion
JANUS demonstrates that synergistic exploration of disk images and syscall sequences is essential for effective file system fuzzing. By focusing on metadata and leveraging a Library OS for rapid resets, JANUS significantly improves bug discovery and reproducibility. Future work includes extending support to FUSE drivers and improving automated Proof of Concept (PoC) minimization through advanced taint tracking.
Summary updated