[论文解读] IvySyn: Automated Vulnerability Discovery in Deep Learning Frameworks
IvySyn 是一个完全自动化的框架,通过在底层 C/C++ 内核上进行类型感知的变异模糊测试,并自动生成高级别的漏洞证明(PoV)代码片段(以 Python 编写),从而发现深度学习框架中的内存安全漏洞。该框架在 TensorFlow 和 PyTorch 中识别出 61 个此前未知的漏洞,导致 39 个独立的 CVE 分配。
We present IvySyn, the first fully-automated framework for discovering memory error vulnerabilities in Deep Learning (DL) frameworks. IvySyn leverages the statically-typed nature of native APIs in order to automatically perform type-aware mutation-based fuzzing on low-level kernel code. Given a set of offending inputs that trigger memory safety (and runtime) errors in low-level, native DL (C/C++) code, IvySyn automatically synthesizes code snippets in high-level languages (e.g., in Python), which propagate error-triggering input via high(er)-level APIs. Such code snippets essentially act as "Proof of Vulnerability", as they demonstrate the existence of bugs in native code that an attacker can target through various high-level APIs. Our evaluation shows that IvySyn significantly outperforms past approaches, both in terms of efficiency and effectiveness, in finding vulnerabilities in popular DL frameworks. Specifically, we used IvySyn to test TensorFlow and PyTorch. Although still an early prototype, IvySyn has already helped the TensorFlow and PyTorch framework developers to identify and fix 61 previously-unknown security vulnerabilities, and assign 39 unique CVEs.
研究动机与目标
- 为解决从高层 API 传播到低层内存不安全内核代码的深度学习框架中内存安全漏洞检测挑战。
- 克服以往半自动或手动方法的局限性,这些方法需要专家注释或自定义驱动代码。
- 通过生成可重现原生内核代码崩溃的高层代码片段,实现完全自动化的、可操作的漏洞披露。
- 通过早期检测可利用的内存错误,提升 TensorFlow 和 PyTorch 等广泛使用的深度学习框架的安全性。
提出的方法
- IvySyn 使用源自静态类型原生 API 的类型感知变异,对低层 C/C++ 内核实现执行变异模糊测试。
- 通过在模糊测试过程中分析运行时错误和内存安全错误,识别出导致原生内核崩溃的输入。
- 利用导致崩溃的输入和框架特定的 API 映射,IvySyn 自动合成将这些输入通过高层 API 传播的高层 Python 代码片段。
- 生成的代码片段作为漏洞证明(PoV),证明攻击者可通过标准用户接口触发原生内核漏洞。
- 该框架直接集成到框架的 API 堆栈中,利用现有的类型信息和绑定结构,确保生成的 PoV 语义正确。
- 其运行无需手动注释、驱动代码或领域专家输入,实现了漏洞发现流程的完全自动化。
实验结果
研究问题
- RQ1我们能否在无需手动注释或开发者提供的驱动代码的情况下,自动发现深度学习框架中的内存安全漏洞?
- RQ2如何有效将来自低层内核代码的崩溃输入映射回高层 API,以生成可操作的漏洞证明(PoV)代码?
- RQ3在漏洞检测方面,对原生内核进行类型感知的变异模糊测试,在多大程度上优于现有的高层 API 模糊测试技术?
- RQ4完全自动化的自下而上的方法能否检测到生产级深度学习框架(如 TensorFlow 和 PyTorch)中此前未知的可利用内存错误?
主要发现
- IvySyn 在 TensorFlow 和 PyTorch 中发现了 61 个此前未知的安全漏洞,所有漏洞均经框架开发者确认并已修补。
- 该框架导致了 39 个独立的 CVE 分配,证明其在识别可利用的内存安全问题方面的有效性。
- IvySyn 在效率和效果两方面均优于先前方法,发现的崩溃输入多于低层模糊测试器,生成的可操作 PoV 多于高层 API 模糊测试器。
- 该框架成功生成了语义正确且可执行的 Python 代码片段,可重现原生内核代码中的崩溃,作为有效的漏洞证明。
- 该方法无需任何手动注释或自定义驱动代码,因此完全自动化且可扩展至复杂、多层的深度学习框架。
- IvySyn 的原型实现已发布在 GitLab 上,现已提升全球数百万用户广泛使用的深度学习框架的安全性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。