paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DevGen: Automated Generation of Virtual Device Models for Kernel Drivers via Large Language Models

DevGen:基于大语言模型的内核驱动虚拟设备模型自动生成
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 3/10 · 论文用 LLM 从内核驱动源码提取硬件交互逻辑并生成 QEMU 虚拟设备以支撑模糊测试,属于 LLM 辅助软件工程/测试方向,并非用户核心关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析;仅与“LLM 作为工具”和工程落地有间接关联。引用 0 inbox
Mingyu Wang, Bin Yu, Wenjian Lu, Kefeng Gao, Zhi Wang, Cheng Wen, Xu Lu, Cong Tian
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:利用大语言模型从驱动源码中提取硬件交互逻辑,自动迭代生成 QEMU 虚拟设备,以支撑无真实硬件的内核驱动模糊测试。

Linux 内核设备驱动与硬件紧耦合,其执行与测试高度依赖设备接口与响应。缺乏真实硬件或精确设备仿真时,大量驱动代码无法被测试,给内核安全带来风险;而现有方法依赖人工设备建模或有限的物理硬件,难以扩展到庞大的驱动生态。本文提出 DevGen,首个利用大语言模型自动生成虚拟设备以增强内核驱动 fuzzing 的方法:它从驱动源码中抽取硬件交互逻辑,迭代生成基于 QEMU 的虚拟设备,并借助语法检查与由执行反馈引导的语义修复逐步修正生成结果;生成的设备进一步与 Syzkaller 集成,从而在无物理硬件条件下探索驱动代码路径。在 Linux 6.18 内核的 50 个驱动上,DevGen 为 44 个驱动成功生成虚拟设备,其中 24% 的驱动 fuzzing 覆盖率显著提升,并触发了 7 个此前未知的崩溃。

问题
内核驱动与硬件紧耦合,缺少真实硬件或准确设备仿真时大量驱动代码无法被测试,而人工建模或依赖物理硬件的方式难以规模化。
方法
从驱动源码中提取硬件交互逻辑,用大语言模型迭代生成 QEMU 虚拟设备,并结合语法检查与基于执行反馈的语义修复,最后与 Syzkaller 集成进行驱动 fuzzing。
评估
在 Linux 6.18 内核的 50 个驱动上评估:成功为 44 个驱动生成虚拟设备,24% 的驱动 fuzzing 覆盖率显著提升,并触发 7 个此前未知的崩溃。
原文摘要(Abstract)

A large number of Linux kernel device drivers are tightly coupled with hardware, making their execution and testing heavily dependent on device interfaces and responses. Without access to real hardware or accurate device emulation, significant parts of driver code remain untested, posing a major risk to kernel security. Existing approaches mainly rely on manual device modeling or limited physical hardware, making it difficult to scale across the vast driver ecosystem. In this paper, we introduce DevGen, the first approach for automatically generating virtual devices using Large Language Models (LLMs) to enhance kernel driver fuzzing. Our approach extracts hardware interaction logic from driver source code and generates QEMU-based virtual devices iteratively, employing syntax checking and semantic repair guided by execution feedback. Furthermore, the generated devices are integrated with Syzkaller, enabling the exploration of driver code paths without the need for physical hardware. Experiments on 50 drivers from the latest Linux 6.18 kernel show that DevGen successfully generates virtual devices for 44 drivers. With these generated models, 24% of the drivers achieve significant improvements in fuzzing coverage, and 7 previously unknown crashes are triggered.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{WangYLGWWLT26,
  title = {DevGen: Automated Generation of Virtual Device Models for Kernel Drivers via Large Language Models},
  author = {Mingyu Wang and Bin Yu and Wenjian Lu and Kefeng Gao and Zhi Wang and Cheng Wen and Xu Lu and Cong Tian},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3805564}
}