paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript Engines

高层次抽取与变异:面向 JavaScript 引擎的基于模板的模糊测试
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 该论文研究JS引擎的模板基模糊测试,属于动态测试技术,而非用户关注的静态分析、LLM/Agent交叉、浮点程序分析或贝叶斯程序分析。虽然涉及从程序中提取抽象模板,但与用户核心研究方向距离较远。引用 3 inbox
Wai Kin Wong, Dongwei Xiao, Cheuk Tung Lai, Yiteng Peng, Daoyuan Wu, Shuai Wang
crossref: 2026-09-10

AI 速览

一句话:提出 TemuJs,从真实 JS 程序中抽取抽象模板并在模板层做语义感知变异,为 JS 引擎生成多样化且有效的测试用例。

JavaScript 引擎需要实现复杂的语言语义与优化策略以支持 JS 的动态特性,因此难以被充分测试,容易潜伏细微却安全攸关的缺陷。现有模糊测试器难以生成多样且合法的测试用例:要么依赖缺乏语义感知的语法层变异,要么只能在具体代码上做有限的局部变异,无法触及更深层、更复杂的程序行为。本文提出 TemuJs,一个在高层进行抽取与变异的模糊测试框架:它从真实 JS 程序中抽取抽象模板,模板以语义占位符刻画粗粒度的程序结构,从而支持语义感知的变异——在保留原始代码高层意图的同时使其行为多样化。通过将变异与具体语法解耦,并借助结构化的中间表示来承载模板,TemuJs 得以探索更广阔、更有意义的程序行为空间。作者在 V8、SpiderMonkey 和 JavaScriptCore 三个主流引擎上评估,共发现 44 个缺陷,边覆盖平均比当前最优模糊测试器相对提升 10.3%,验证了高层模板变异式模糊测试在 JS 引擎测试中的有效性。

问题
JS 引擎语义复杂、优化策略多变,现有模糊测试器生成的用例要么语法层变异缺乏语义感知,要么只在具体代码上做局部变异,难以探索深层程序行为。
方法
TemuJs 从真实 JS 程序中抽取带语义占位符的抽象模板,以结构化中间表示承载,并在模板层执行语义感知的变异,从而在保留原代码高层意图的同时多样化其行为。
评估
在 V8、SpiderMonkey 与 JavaScriptCore 三个主流 JS 引擎上评测,共发现 44 个缺陷,边覆盖相对当前最优模糊测试器平均提升 10.3%。
原文摘要(Abstract)

JavaScript (JS) engines implement complex language semantics and optimization strategies to support the dynamic nature of JS, making them difficult to test thoroughly and prone to subtle, security-critical bugs. Existing fuzzers often struggle to generate diverse and valid test cases. They either rely on syntax-level mutations that lack semantic awareness or perform limited, local mutations on concrete code, thus failing to explore deeper, more complex program behaviors. This paper presents TemuJs , a novel fuzzing framework that performs extraction and mutation at a high level, operating on abstract templates derived from real-world JS programs. These templates capture coarse-grained program structures with semantic placeholders, enabling semantics-aware mutations that preserve the high-level intent of the original code while diversifying its behavior. By decoupling mutation from concrete syntax and leveraging a structured intermediate representation for the templates, TemuJs explores a broader and more meaningful space of program behaviors. Evaluated on three major JS engines, namely, V8, SpiderMonkey, and JavaScriptCore, TemuJs discovers 44 bugs and achieves a 10.3% relative increase in edge coverage compared to state-of-the-art fuzzers on average. Our results demonstrate the efficacy of high-level, template-mutation fuzzing in testing JS engines.

链接与引用

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

BibTeX
@article{paperbot2992,
  title = {Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript Engines},
  author = {Wai Kin Wong and Dongwei Xiao and Cheuk Tung Lai and Yiteng Peng and Daoyuan Wu and Shuai Wang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763154}
}