arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.01317cs.SE
收藏

FUTURE的种子从历史中萌芽:用于揭示前瞻性深度学习库中漏洞的模糊测试

The Seeds of the FUTURE Sprout from History: Fuzzing for Unveiling Vulnerabilities in Prospective Deep-Learning Libraries

Zhiyuan Li, Jingzheng Wu, Xiang Ling, Tianyue Luo, Zhiqing Rui, Yanjun Wu

AI总结:

针对现有模糊测试框架难以适配新兴深度学习库的问题,提出首个通用模糊测试框架FUTURE,通过利用历史漏洞微调LLM生成测试代码,在多个新库及PyTorch中检测出大量未知漏洞,显著提升检测与复现效果。

摘要:

大语言模型(LLM)的广泛应用凸显了依赖PyTorch、TensorFlow等基础深度学习(DL)库的深度学习技术的重要性。尽管这些库功能强大,但仍面临可扩展性不足以及难以适配LLM领域快速发展的挑战。为此,苹果、华为等科技巨头正在开发自研DL库,以提升性能、增强可扩展性并保护知识产权。确保这类库的安全性至关重要,而模糊测试是关键解决方案。然而,现有模糊测试框架在目标适配灵活性、有效测试易出错的API序列、利用新库有限可用信息方面存在不足。\n为解决这些局限,我们提出FUTURE——首个专为新推出及前瞻性DL库定制的通用模糊测试框架。FUTURE利用现有库的历史漏洞信息,微调LLM以实现专用代码生成。该策略可发现新库中的漏洞,并借助从新库中获得的洞见提升现有库的安全性,形成“从历史到未来再反向赋能”的循环。\n为评估FUTURE的有效性,我们在三个新推出的DL库上开展了全面评估。结果表明,FUTURE在漏洞检测能力、漏洞复现成功率、代码生成有效率、API覆盖率方面均显著优于现有模糊测试工具。值得注意的是,FUTURE在452个目标API中检测到148个漏洞,其中142个为此前未知的漏洞,且已有10个获得CVE编号。此外,FUTURE还在PyTorch中检测到7个漏洞,证明其具备反向提升现有库安全性的能力。

英文摘要:

The widespread application of large language models (LLMs) underscores the importance of deep learning (DL) technologies that rely on foundational DL libraries such as PyTorch and TensorFlow. Despite their robust features, these libraries face challenges with scalability and adaptation to rapid advancements in the LLM community. In response, tech giants like Apple and Huawei are developing their own DL libraries to enhance performance, increase scalability, and safeguard intellectual property. Ensuring the security of these libraries is crucial, with fuzzing being a vital solution. However, existing fuzzing frameworks struggle with target flexibility, effectively testing bug-prone API sequences, and leveraging the limited available information in new libraries. To address these limitations, we propose FUTURE, the first universal fuzzing framework tailored for newly introduced and prospective DL libraries. FUTURE leverages historical bug information from existing libraries and fine-tunes LLMs for specialized code generation. This strategy helps identify bugs in new libraries and uses insights from these libraries to enhance security in existing ones, creating a cycle from history to future and back. To evaluate FUTURE's effectiveness, we conduct comprehensive evaluations on three newly introduced DL libraries. Evaluation results demonstrate that FUTURE significantly outperforms existing fuzzers in bug detection, success rate of bug reproduction, validity rate of code generation, and API coverage. Notably, FUTURE has detected 148 bugs across 452 targeted APIs, including 142 previously unknown bugs. Among these, 10 have been assigned CVE IDs. Additionally, FUTURE detects 7 bugs in PyTorch, demonstrating its ability to enhance security in existing libraries in reverse.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑