Abstract
Kernel fuzzing is a critical technique for identifying vulnerabilities in operating systems, yet traditional tools like Syzkaller often struggle to reach deep, complex code paths, resulting in a "coverage plateau." This paper introduces SyzAgent, a novel framework that integrates Large Language Models (LLMs) with existing fuzzing infrastructure to perform directed fuzzing. By utilizing GPT-4o to analyze kernel call graphs and provide real-time feedback based on dynamic execution data, SyzAgent guides the fuzzer toward specific target functions. Experimental results on 27 Linux kernel targets show that SyzAgent outperforms vanilla Syzkaller in 67% of cases, demonstrating the potential of LLMs to provide semantic heuristics that overcome the limitations of structural static analysis.
1. Introduction
Modern software security relies heavily on kernel fuzzing—the automated process of providing semi-random inputs to an operating system to trigger crashes and identify bugs. Syzkaller has emerged as the industry standard for this task. However, general-purpose fuzzers are frequently limited by their inability to explore deep logic or specific code changes in recent commits. Reaching these areas often requires a precise sequence of system calls (syscalls) with specific arguments, a task that traditional fuzzers, which rely on stochastic mutation, find difficult to achieve.
Direct fuzzing aims to solve this by focusing resources on a specific target. However, identifying the correct syscall sequences to reach a target is labor-intensive and often misses indirect dependencies. SyzAgent addresses this by using LLMs as a "navigator" for the fuzzer, providing the semantic intuition necessary to traverse complex kernel paths.
2. Methodology
SyzAgent augments the Syzkaller framework with an LLM-driven guidance loop. The system operates through three primary stages:
2.1 Static Analysis and Initial Prompting
Before execution, SyzAgent performs static analysis to generate a call graph of the Linux kernel. When a target function is identified, the system extracts the "calling code" (the chain of functions leading to the target). This context is provided to GPT-4o, which identifies the syscalls most likely to trigger the desired execution path.
2.2 Dynamic Feedback Loop
Unlike static tools, SyzAgent employs a real-time feedback mechanism. As the fuzzer runs, the system monitors "close area" coverage—code segments within a short distance of the target. Every 500 test cases, SyzAgent aggregates this coverage data and successful test cases, sending them back to the LLM to refine its guidance.
2.3 Choice Table Modification
Syzkaller utilizes a "choice table" to determine the probability of selecting specific syscalls during mutation. SyzAgent uses the LLM’s insights to dynamically boost the weights of syscalls identified as relevant to the target. This ensures that the fuzzer prioritizes paths that the model believes will lead to the target function.
3. Experimental Evaluation
The researchers evaluated SyzAgent against two baselines: vanilla Syzkaller and SyzDirect (a specialized direct fuzzer). The evaluation focused on 27 target functions within the Linux kernel, chosen for their complexity and the feasibility of their call paths.
3.1 Key Results
- Performance Improvement: SyzAgent achieved a higher "hit rate" (the frequency with which test cases reached the target area) than vanilla Syzkaller in the majority of tests.
- Success Rate: In 18 out of 27 cases (67%), SyzAgent outperformed the baseline by a margin of at least 10%.
- Navigating Complexity: SyzAgent demonstrated a superior ability to identify relevant syscalls that specialized tools missed. For example, it correctly identified
io_uring_enteras a relevant syscall in cases where SyzDirect's less precise call graph analysis failed. - Plateau Breaking: For specific targets such as
sk_set_bit, SyzAgent continued to discover new coverage long after the baseline fuzzer had reached a plateau.
4. Discussion and Insights
The primary contribution of SyzAgent is the use of LLMs as semantic heuristics. While traditional static analysis is purely structural, LLMs trained on vast repositories of open-source code can recognize semantic patterns—such as the relationship between an ioctl call preparing a buffer and a subsequent read operation. This "hybrid intelligence" allows the fuzzer to handle high-speed execution while the LLM provides high-level strategic guidance.
5. Limitations and Future Work
Several challenges remain for LLM-guided fuzzing:
- Context Windows: The 12.8k token limit of GPT-4o restricts the amount of kernel code and path information that can be analyzed simultaneously.
- Inference Latency: LLM inference is significantly slower than the execution speed of a fuzzer, necessitating parallel processing and sampling.
- Argument Mutation: Current iterations of SyzAgent focus on syscall selection. Future work will explore using LLMs to mutate syscall arguments, which is essential for reaching even deeper logic.
6. Conclusion
SyzAgent represents a significant advancement in AI-native security tooling. By providing the "intuition" needed to navigate the Linux kernel's complexity, it demonstrates that LLMs can effectively bridge the gap between high-level code semantics and low-level fuzzing execution.
Summary updated