CuSafe: Capturing Memory Corruption on NVIDIA GPUs
Hongyi Lu, Fengwei Zhang, Zhenkai Zhang, Shuai Wang, Yanan Guo
摘要
Modern GPU applications, particularly in machine learning and scientific computing, are increasingly affected by memory corruption bugs due to their reliance on memory-unsafe languages like C/C++. However, existing solutions either depend on hardware/software that is not available on commodity GPUs, or incur prohibitive performance overheads, rendering them impractical for real-world deployment. We present CuSafe, a novel GPU sanitizer that is readily deployable on commodity NVIDIA GPUs. CuSafe employs a hybrid metadata scheme combining pointer tagging with in-band buffer bounds to enable accurate and efficient memory safety validation. CuSafe also introduces mechanisms such as stack epoch tracking and virtual address randomization to mitigate metadata confusion caused by temporal corruption. Our security evaluation on 33 programs demonstrates that CuSafe uniquely achieves the best coverages of both spatial and temporal bugs among existing GPU sanitizers. Moreover, our performance benchmarks on 44 programs, including large-language models like LLaMA2-7B and LLaMA3-8B, show that CuSafe incurs an average slowdown of 13% and a negligible memory overhead of 0.3%.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Implicit Memory Tagging: No-Overhead Memory Safety Using Alias-Free Tagged ECC 引用了 Securing GPU via region-based bounds checking
- From Prompt to Pwn: Exploiting GPU Memory Errors During ML Inference 引用了 Implicit Memory Tagging: No-Overhead Memory Safety Using Alias-Free Tagged ECC
- From Prompt to Pwn: Exploiting GPU Memory Errors During ML Inference 引用了 Securing GPU via region-based bounds checking
- Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory Tags 引用了 Stack Bounds Protection with Low Fat Pointers
- Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory Tags 引用了 PTAuth: Temporal Memory Safety via Robust Points-to Authentication
引用它的顶会 Paper1
它引用的 Paper13
- Stack Bounds Protection with Low Fat PointersGregory J. Duck, Roland H. C. Yap, Lorenzo CavallaroNDSS 2017 · 121 次引用
- PTAuth: Temporal Memory Safety via Robust Points-to AuthenticationReza Mirzazade Farkhani, Mansour Ahmadi, Long LuUSENIX Security 2021 · 67 次引用
- Sticky Tags: Efficient and Deterministic Spatial Memory Error Mitigation using Persistent Memory TagsFloris Gorter, Taddeus Kroes, Herbert Bos, Cristiano GiuffridaS&P 2024 · 22 次引用
- Securing GPU via region-based bounds checkingJaewon Lee, Yonghae Kim, Jiashen Cao, Euna Kim 等ISCA 2022 · 19 次引用
- Implicit Memory Tagging: No-Overhead Memory Safety Using Alias-Free Tagged ECCMichael B. Sullivan, Mohamed Tarek Ibn Ziad, Aamer Jaleel, Stephen W. KecklerISCA 2023 · 17 次引用
相关 Paper
- cuCatch: A Debugging Tool for Efficiently Catching Memory Safety Violations in CUDA ApplicationsMohamed Tarek Ibn Ziad, Sana Damani, Aamer Jaleel, Stephen W. Keckler 等PLDI 2023 · 15 次引用
- Triton-Sanitizer: A Fast and Device-Agnostic Memory Sanitizer for Triton with Rich Diagnostic ContextHao Wu, Qidong Zhao, Songqing Chen, Yang Chen 等ASPLOS 2026 · 1 次引用
- Hunting CUDA Bugs at Scale with cuFuzzMohamed Tarek Ibn Ziad, Christos KozyrakisOOPSLA 2026
- CMASan: Custom Memory Allocator-aware Address SanitizerJunwha Hong, Wonil Jang, Mijung Kim, Lei Yu 等S&P 2025
- M2K: Making the Model-Kernel Interface Explicit for Reliable CUDA Kernel VerificationMengting He, Shihao Xia, Haomin Jia, Wenfei Wu 等SOSP 2026
