Fuzzing: Randomness? Reasoning! Efficient Directed Fuzzing via Large Language Models
Xiaotao Feng, Xiaogang Zhu, Kun Hu, Jincheng Wang, Yingjie Cao, Guang Gong, Jianfeng Pan · 2025
Read Fuzzing: Randomness? Reasoning! Efficient Directed Fuzzing via Large Language Models by Xiaotao Feng, Xiaogang Zhu, Kun Hu, Jincheng Wang, Yingjie Cao, Guang Gong, Jianfeng Pan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-22065.txt.
Introduction
Xiaotao Feng and six co-authors use language models to sharpen fuzzing, a way to find bugs by feeding a program odd inputs. Their twenty twenty-five paper notes that fuzzing leans on luck, so bugs can take days or weeks to surface. Directed fuzzing aims the search at known weak spots, but luck still rules its seeds and its mutations.
Their tool, RandLuzz, asks a language model to craft seeds that can reach the target code. It also has the model study each bug and write custom mutators for it. Paired with four top directed fuzzers, the seeds sped up bug finds by two to five times on average.
Catalog record
| CREATOR | Xiaotao Feng, Xiaogang Zhu, Kun Hu, Jincheng Wang, Yingjie Cao, Guang Gong, Jianfeng Pan |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 64 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-22065
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Fuzzing: Randomness? Reasoning! Efficient Directed Fuzzing via Large Language Models Xiaotao Feng, Xiaogang Zhu, Kun Hu, Jincheng Wang, Yingjie Cao, Guang Gong, Jianfeng Pan Abstract Fuzzing is highly effective in detecting bugs due to the key contribution of randomness. However, randomness significantly reduces the efficiency of fuzzing, causing it to cost days or weeks to expose bugs. Even though directed fuzzing reduces randomness by guiding fuzzing towards target buggy locations, the dilemma of randomness still challenges directed fuzzers. Two critical components, which are seeds and mutators, contain randomness and are closely tied to the conditions required for triggering bugs. Therefore, to address the challenge of randomness, we propose to use large language models (LLMs) to remove the randomness in seeds and reduce the randomness in mutators. With their strong reasoning and code generation capabilities, LLMs can be used to generate reachable seeds that target pre-determined locations and to construct bug-specific mutators tailored for specific bugs. We propose RandLuzz , which integrates LLMs and directed fuzzing, to improve the quality of seeds and mutators, resulting in efficient bug exposure. RandLuzz analyzes function call chain or functionality to guide LLMs in generating reachable seeds. To construct bug-specific mutators, RandLuzz uses LLMs to perform bug analysis, obtaining information such as bug causes and mutation suggestions, which further help generate code that performs bug-specific mutations. We evaluate RandLuzz by comparing it with four state-of-the-art directed fuzzers, AFLGo, Beacon, WindRanger, and SelectFuzz. With RandLuzz -generated seeds, the fuzzers achieve an average speedup ranging from 2.1 × \times to 4.8 × \times compared to using widely-used initial seeds. Additionally, when evaluated on individual bugs, RandLuzz achieves up to a 2.7 × \times speedup compared to the second-fastest exposure. On 8 bugs, RandLuzz can even expose them within 60 seconds. I Introduction Fuzzing has been proven highly effective at detecting bugs in real-world applications, with the discovery of numerous bugs across a wide range of software systems [ 43 , 41 , 9 ] . While existing fuzzers have introduced various strategies for fuzzing to trigger bugs, random input generation remains central to their effectiveness. However, the other side of the coin is that the randomness often leads to inefficiency, causing fuzzers to run for days or even weeks to identify bugs located in deep code regions. Typically, directed fuzzing [ 1 ] is more efficient than coverage-guided fuzzing [ 2 , 41 ] ; however, because directed fuzzing still relies on random input generation, it suffers from the same issue of inefficient bug discovery. Many solutions have been proposed to improve the efficiency of directed fuzzing [ 13 , 34 , 14 ] . Some directed fuzzers optimize the guidance towards target locations based on program properties, such as satisfying execution path constraints [ 18 ] or identifying deviation basic blocks [ 8 ] . Another focus is generating inputs that are more likely to reach target locations via solutions such as predicting reachable inputs [ 45 , 14 ] and instrumenting related code only [ 24 ] . Nonetheless, the existing directed fuzzing uses coarse-grained guidance to reduce the randomness, with a distance-based metric to guide the random input generation so that fuzzing can gradually reach target locations. To improve the efficiency of triggering bugs, a straightforward yet challenging solution is to reduce or even remove the randomness when generating bug-triggering inputs. To trigger a bug, an input needs to satisfy both reaching the buggy code location and examining specific execution states. Thus, correspondingly, two critical components that significantly impact the efficacy of triggering bugs are the seeds and the mutation operators (mutators). Seeds introduce randomness because the code regions they examine are unknown. They may be far away from or close to target locations. If the seeds are already capable of reaching target locations, the efficiency of bug discovery can be greatly enhanced because it does not introduce randomness [ 17 ] . After reaching target locations, mutators are responsible of generating new inputs that examine diverse execution states for bugs. However, all existing works rely on pre-determined mutators, which are not designed for triggering specific bugs. Such pre-determined mutators increase the randomness in fuzzing because most mutations cannot move states towards buggy ones [ 25 ] . The challenge is that, both generating reachable seeds , which can reach target locations, and constructing bug-specific mutators , which are designed for triggering specific bugs, require deep understanding of the target programs and bugs. To address the challenge, in this paper, we propose to use large language models (LLMs) to remove the randomness in generating reachable seeds and reduce randomness in mutators. Our key insights are that i) LLMs [ 44 ] possess strong capabilities in reasoning about bug information from both documentation and program code; and ii) the code generation capabilities of LLMs offer the potential to create adaptable and customizable mutators. By leveraging these reasoning and code generation capabilities, LLMs can be used to generate reachable seeds and construct bug-specific mutators, enabling more efficient examination of buggy code regions. This will significantly reduce the impact caused by randomness in fuzzing. To use LLMs for reducing randomness in fuzzing, the basic required information is the bug information, program usage, and function summary, which aim to understand the semantic meaning of bugs and the program logic of target projects. To generate reachable seeds, because directly querying LLMs leads to exceeding token limits or misunderstanding, we query LLMs based on the Function Call Chain (FCC) that contains the paths from the entry point to the target vulnerable function. The FCC leads LLMs to generate reachable seeds step-by-step, which improves the effectiveness of generation process. If we cannot obtain FCC, we will generate reachable seeds based on the functionalities of functions that are neighbors of the target function. If a seed can reach a neighbor function, we can use FCC to guide the generation of reachable seeds. To generate bug-specific mutators, LLM is first utilized to analyze the cause for the target bug. The result is further utilized to generate mutation suggestions. Code is then generated for mutators based on the mutation suggestions via LLMs. We develop RandLuzz , which stands for Rand om- L ess F uzz er, to demonstrate the performance of our method. We compare our RandLuzz with four state-of-the-art fuzzers, AFLGo [ 1 ] , Beacon [ 12 ] , WindRanger [ 8 ] , and SelectFuzz [ 24 ] . The results show that RandLuzz -generated seeds significantly enhance bug discovery efficiency, achieving an average speedup ranging from 2.1 \times to 4.8 \times . Additionally, RandLuzz can expose 8 bugs within 60 seconds, demonstrating leading efficiency in bug discovery. Our contributions are as follows. • We analyze and demonstrate that randomness is the key factor that impacts the efficiency of directed fuzzing. • We introduce LLMs to remove randomness in generating reachable seeds and reduce randomness in generating bug-specific mutators. • We develop RandLuzz 1 1 1 Our code will be publicly available upon acceptance. incorporating LLMs to demonstrate the effectiveness and efficiency of our idea, showing the feasibility of using LLMs in guiding directed fuzzing. • Our evaluation demonstrates the effectiveness and efficiency of reachable seeds and bug-specific mutators. II Motivation