R1-Fuzz: Specializing Language Models for Textual Fuzzing via Reinforcement Learning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lin, Jiayi, Su, Liangcai, Li, Junzhe, Qian, Chenxiong
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918147418750976
author Lin, Jiayi
Su, Liangcai
Li, Junzhe
Qian, Chenxiong
author_facet Lin, Jiayi
Su, Liangcai
Li, Junzhe
Qian, Chenxiong
contents Fuzzing is effective for vulnerability discovery but struggles with complex targets such as compilers, interpreters, and database engines, which accept textual input that must satisfy intricate syntactic and semantic constraints. Although language models (LMs) have attracted interest for this task due to their vast latent knowledge and reasoning potential, their practical adoption has been limited. The major challenges stem from insufficient exploration of deep program logic among real-world codebases, and the high cost of leveraging larger models. To overcome these challenges, we propose R1-Fuzz, the first framework that leverages reinforcement learning (RL) to specialize cost-efficient LMs and integrate them for complex textual fuzzing input generation. R1-Fuzz introduces two key designs: coverage-slicing-based question construction and a distance-based reward calculation. Through RL-based post-training of a model with our constructed dataset, R1-Fuzz designs a fuzzing workflow that tightly integrates LMs to reason deep program semantics during fuzzing. Evaluations on diverse real-world targets show that our design enables a small model, named R1-Fuzz-7B, to rival or even outperform much larger models in real-world fuzzing. Notably, R1-Fuzz achieves up to 75\% higher coverage than state-of-the-art fuzzers and discovers 29 previously unknown vulnerabilities, demonstrating its practicality.
format Preprint
id arxiv_https___arxiv_org_abs_2509_20384
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle R1-Fuzz: Specializing Language Models for Textual Fuzzing via Reinforcement Learning
Lin, Jiayi
Su, Liangcai
Li, Junzhe
Qian, Chenxiong
Cryptography and Security
Artificial Intelligence
Programming Languages
Software Engineering
Fuzzing is effective for vulnerability discovery but struggles with complex targets such as compilers, interpreters, and database engines, which accept textual input that must satisfy intricate syntactic and semantic constraints. Although language models (LMs) have attracted interest for this task due to their vast latent knowledge and reasoning potential, their practical adoption has been limited. The major challenges stem from insufficient exploration of deep program logic among real-world codebases, and the high cost of leveraging larger models. To overcome these challenges, we propose R1-Fuzz, the first framework that leverages reinforcement learning (RL) to specialize cost-efficient LMs and integrate them for complex textual fuzzing input generation. R1-Fuzz introduces two key designs: coverage-slicing-based question construction and a distance-based reward calculation. Through RL-based post-training of a model with our constructed dataset, R1-Fuzz designs a fuzzing workflow that tightly integrates LMs to reason deep program semantics during fuzzing. Evaluations on diverse real-world targets show that our design enables a small model, named R1-Fuzz-7B, to rival or even outperform much larger models in real-world fuzzing. Notably, R1-Fuzz achieves up to 75\% higher coverage than state-of-the-art fuzzers and discovers 29 previously unknown vulnerabilities, demonstrating its practicality.
title R1-Fuzz: Specializing Language Models for Textual Fuzzing via Reinforcement Learning
topic Cryptography and Security
Artificial Intelligence
Programming Languages
Software Engineering
url https://arxiv.org/abs/2509.20384