ToxiHeap: LLM制导和毒性标记的JavaScript引擎模糊测试框架
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家自然科学基金重大项目(62293503); 江苏省前沿技术研发计划(BF2024071); 江苏省研究生科研与实践创新计划(KYCX24_1231)


ToxiHeap: LLM-guided JavaScript Engine Fuzzing Framework with Toxic Labeling
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    现有浏览器JavaScript引擎模糊测试工具在检测潜在漏洞方面仍存在局限, 尤其对不触发崩溃的堆内存错误识别能力不足. 为此, 提出ToxiHeap, 一种将内存毒性标记(toxic labeling)的运行时监测和大语言模型(large language model, LLM)制导语义生成, 设计为并行核心轨道的JavaScript引擎模糊测试框架. 检测轨在目标引擎的堆分配与访问路径上插桩, 通过影子内存与细粒度毒性标记统一刻画释放后使用(use-after-free, UAF)、double free、堆越界读写(out-of-bounds read/write,OOB-R/W)、内存泄漏(memory leak)和未初始化堆内存读(uninitialized memory read,UMR)等多类堆错误, 并将对已释放内存等非法状态的访问转化为可消费的异常信号, 弥补传统依赖崩溃信号方法对非崩溃漏洞缺乏有效检测信号的不足; 生成轨采用“蒸馏-激励”两阶段的LLM变异器, 从历史PoC中提炼语义特征并定向构造状态依赖的测试用例, 突破仅依赖语法或轻语义变异在深路径覆盖上的局限. 两条轨道以覆盖增益和非崩溃命中信号在反馈环路中汇合, 协同驱动样本保留、路径权重更新和知识库自增, 同时引入隔离重放验证机制, 在干净进程中二次确认异常, 显著降低非确定性误报. 实验结果表明, 在JavaScriptCore (JSC)引擎上, ToxiHeap在24 h运行下的分支覆盖率由31.17%提升至33.52%, 在V8、SpiderMonkey (SM)和ChakraCore (CH)等其他主流引擎上同样取得了最高或接近最高的分支覆盖率, 有效样本占比稳定在91%以上. 在覆盖UAF等多类缺陷模式的50条PoC参考集上, 4个引擎综合平均的整体检出率达到89.18%.

    Abstract:

    Existing fuzzer for browser JavaScript engines still have limitations in detecting potential vulnerabilities, especially in identifying non-crashing heap memory errors. This study proposes ToxiHeap, a JavaScript engine fuzzing framework that integrates runtime monitoring based on memory toxic labeling with large language model (LLM)-guided semantic generation as two parallel core components. The detection track instruments heap allocation and access paths in the target engine. Shadow memory and fine-grained toxic labeling provide a unified mechanism for representing multiple heap errors, including use-after-free (UAF), double free, heap out-of-bounds reads and writes (OOB-R/W), memory leak, and uninitialized memory read (UMR). Accesses to freed memory and other illegal states are converted into consumable exception signals, which compensates for the lack of effective detection signals for non-crashing vulnerabilities in approaches that rely solely on crash signals. The generation track employs a two-stage “distill-reward” LLM-based mutator that extracts semantic features from historical proofs of concept (PoCs) and generates state-dependent test cases in a targeted manner, thus overcoming the limitations of purely syntax-based or shallow-semantic mutations in exploring deep execution paths. The two tracks are integrated through a feedback loop driven by coverage gains and non-crashing detection signals. This feedback loop jointly drives sample retention, path weight updates, and knowledge base growth. An isolated replay verification mechanism is also introduced to revalidate anomalies in a clean process, which significantly reduces nondeterministic false positives. Experimental results show that on the JavaScriptCore (JSC) engine, ToxiHeap increases branch coverage from 31.17% to 33.52% in a 24-hour run, and achieves the highest or near-highest branch coverage on other mainstream engines including V8, SpiderMonkey (SM), and ChakraCore (CH). The proportion of valid samples remains above 91%. On a set of 50 PoC references covering multiple vulnerability patterns including UAF, the average detection rate across the four engines reaches 89.18%.

    参考文献
    相似文献
    引证文献
引用本文

沙乐天,龙章伯,丁加宇,黄海平,肖甫. ToxiHeap: LLM制导和毒性标记的JavaScript引擎模糊测试框架.软件学报,,():1-27

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-09-02
  • 最后修改日期:2025-11-03
  • 录用日期:
  • 在线发布日期: 2026-05-13
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号