Psyzkaller: Learning from Historical and On-the-Fly Execution Data for Smarter Seed Generation in OS kernel Fuzzing
Liu, Zhang, Cheng et al.
Fuzzing has become a cornerstone technique for uncovering vulnerabilities and enhancing the security of OS kernels. However, state-of-the-art kernel fuzzers, including the de facto standard Syzkaller, struggle to generate valid syscall sequences that respect implicit Syscall Dependency Relations (SDRs). Consequently, many generated seeds either fail kernel validation or cannot penetrate deep execution paths, resulting in significant inefficiency.
We hypothesize that SDRs can be effectively learned from both historic and present kernel execution data, and that incorporating these learned relations into fuzzing can substantially improve seed validity and diversity. To validate this, we propose an approach that utilizes the N-gram model to mine SDRs from the Dongting dataset-one of the largest Linux kernel execution datasets available-as well as from execution traces collected on the fly during fuzzing. The resulting model is used to continuously augment the Choice Table of Syzkaller to improve its seed generation and demonstrably increases the Shannon Entropy of the Choice Table throughout fuzzing, reflecting more empirically-grounded choices in expanding syscall sequences into valid and diverse seeds. In addition, we introduce a Random Walk strategy that instructs Syzkaller to construct seeds in a bidirectional manner to further diversify the generated seeds.
We implement our approach in a prototype, Psyzkaller, built on top of Syzkaller. Experiments on three representative Linux kernel versions show that Psyzkaller improves Syzkaller's code coverage by 4.6%-7.0% in 48-hour fuzzing, while triggering 110.4%-187.2% more crashes. Moreover, our investigation shows that Psyzkaller discovered eight previously unknown kernel vulnerabilities, compared to only one found by Syzkaller.
academic
Psyzkaller: Learning from Historical and On-the-Fly Execution Data for Smarter Seed Generation in OS Kernel Fuzzing
Fuzzing has become a cornerstone technique for discovering operating system kernel vulnerabilities and enhancing security. However, state-of-the-art kernel fuzzers, including the de facto standard Syzkaller, struggle to generate effective system call sequences that respect implicit system call dependencies (SDRs). Consequently, many generated seeds either fail kernel validation or cannot penetrate deep execution paths, resulting in significant inefficiency. This paper posits that SDRs can be effectively learned from historical and current kernel execution data, and incorporating these learned relationships into fuzzing can substantially improve seed validity and diversity. To validate this hypothesis, the authors propose a method that leverages N-gram models to mine SDRs from the DongTing dataset (one of the largest Linux kernel execution datasets) as well as execution traces collected in real-time during the fuzzing process.
The operating system kernel is a critical component of modern computing platforms, and kernel-level security compromises allow attackers to gain complete control of the system. The core challenges faced by current kernel fuzzers are:
Difficulty in Identifying System Call Dependencies (SDRs): Many generated system call sequences (SCSs) are invalid due to SDR violations
Low Efficiency in Seed Generation: Invalid test cases fail prematurely, contributing little to code exploration
Difficulty in Reaching Deep Execution Paths: Lack of understanding of semantic constraints between system calls
The authors propose a novel perspective of learning SDRs directly from kernel execution traces, combining the broad coverage of historical data with the adaptability of online learning.
Proposes a novel strategy combining historical and real-time kernel execution data to learn SDRs, balancing broad coverage with kernel version adaptability
Develops the Psyzkaller prototype, integrating Bigram-based SDR learning and RandomWalk strategy into the Syzkaller workflow
Pre-trains the Bigram model using the largest historical Linux kernel execution dataset (DongTing)
Validates effectiveness on three representative Linux kernel versions, demonstrating superiority in branch coverage and vulnerability detection
Constructs an RPM matrix where RPM[i]j records the probability of calling system call wj immediately after system call wi.
Algorithm 1: LearnSDR
Input: C (corpus of system call sequences), CallNum (total number of system calls in kernel)
Output: M (N-gram model learned from C)
1. Initialize matrix M and count array Count
2. Iterate through each sequence sc in corpus C:
- Count consecutive system call pairs
- Update count statistics
3. Calculate transition probabilities: M[i][j] = M[i][j] / Count[i]
Overall Assessment: This is a high-quality systems security research paper that proposes an innovative data-driven approach to address key challenges in kernel fuzzing. The experimental design is rigorous, results are convincing, and it possesses significant academic value and practical significance.