DarthShader:模糊测试 WebGPU 着色器翻译器与编译器
DarthShader: Fuzzing WebGPU Shader Translators & Compilers
AI总结:
本文提出首个结合中间表示与抽象语法树变异策略的语言模糊测试器 DarthShader,针对 WebGPU 着色器编译流水线各阶段进行差异化模糊测试,在三大主流浏览器中发现 39 个此前未被发现的软件故障,其中 15 个获 CVE 编号。
摘要:
近年来,在浏览器中运行更高要求的 Web 应用(如视频游戏或客户端大语言模型)的趋势促使 WebGPU 标准被广泛采用,该标准提供了一个将 GPU 暴露给网站的跨平台 API。这开辟了一个新的攻击面:不受信任的 Web 内容被直接传递到 GPU 栈中,而 GPU 栈传统上一直以性能而非安全为优化目标。使问题更加严重的是,WebGPU 的大部分内容无法在管理其他 Web 内容的严格沙箱进程中运行,这为攻击者攻陷客户端机器提供了更便捷的路径。与其重要性形成鲜明对比的是,WebGPU 着色器处理在自动化测试领域受到的关注少得惊人。部分原因在于着色器翻译器期望高度结构化且静态类型化的输入,这使得典型的模糊测试变异方法效果不佳。进一步增加测试复杂性的是,着色器翻译由一个复杂的多阶段编译流水线组成,每个阶段都呈现出独特的需求和挑战。在本文中,我们提出了 DarthShader,这是第一个将基于中间表示的变异器与使用更传统抽象语法树的变异器相结合的语言模糊测试器。其关键思想在于,着色器编译流水线的各个阶段容易受到不同类别故障的影响,需要完全不同的变异策略才能进行彻底测试。通过对整个流水线进行模糊测试,我们确保维持一个现实的攻击者模型。在实证评估中,我们展示了我们的方法在代码覆盖率方面优于最先进的模糊测试器。此外,一项广泛的消融研究验证了我们的关键设计。DarthShader 在所有现代浏览器——Chrome、Firefox 和 Safari——中发现了总计 39 个先前工作遗漏的软件故障。其中 15 个故障,Chrome 团队分配了 CVE 编号,认可了我们研究结果的影响力。
英文摘要:
A recent trend towards running more demanding web applications, such as video games or client-side LLMs, in the browser has led to the adoption of the WebGPU standard that provides a cross-platform API exposing the GPU to websites. This opens up a new attack surface: Untrusted web content is passed through to the GPU stack, which traditionally has been optimized for performance instead of security. Worsening the problem, most of WebGPU cannot be run in the tightly sandboxed process that manages other web content, which eases the attacker's path to compromising the client machine. Contrasting its importance, WebGPU shader processing has received surprisingly little attention from the automated testing community. Part of the reason is that shader translators expect highly structured and statically typed input, which renders typical fuzzing mutations ineffective. Complicating testing further, shader translation consists of a complex multi-step compilation pipeline, each stage presenting unique requirements and challenges. In this paper, we propose DarthShader, the first language fuzzer that combines mutators based on an intermediate representation with those using a more traditional abstract syntax tree. The key idea is that the individual stages of the shader compilation pipeline are susceptible to different classes of faults, requiring entirely different mutation strategies for thorough testing. By fuzzing the full pipeline, we ensure that we maintain a realistic attacker model. In an empirical evaluation, we show that our method outperforms the state-of-the-art fuzzers regarding code coverage. Furthermore, an extensive ablation study validates our key design. DarthShader found a total of 39 software faults in all modern browsers -- Chrome, Firefox, and Safari -- that prior work missed. For 15 of them, the Chrome team assigned a CVE, acknowledging the impact of our results.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。