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

在GPU程序中追捕 elusive 内存错误

Chasing Elusive Memory Bugs in GPU Programs

Indian Institute of Science(印度科学学院)

Anubhab Ghosh, Ajay Nayak, Dhananjay Rao Thallikar Shyam, Arkaprava Basu

AI总结:

SCuBA通过分析CPU和GPU代码中的语义关系,首次提出编译时检测GPU程序中隐蔽内存错误的方法,有效识别越界访问问题。

摘要:

内存安全错误,如在GPU程序中出现的越界访问(OOB),可能会破坏GPU加速软件的安全性和可靠性。我们报告了在野外存在输入依赖的OOB错误,这些错误只有在特定输入下才会显现。现有的所有检测GPU程序中OOB错误的工具都依赖于运行时技术,需要OOB错误显现才能检测。因此,输入依赖的OOB错误逃避了它们。我们还发现了在内存分配逻辑划分成多个数据结构时出现的内部分配OOB错误。现有技术对这种OOB错误的可能性漠不关心。我们做出一个关键观察,即程序变量之间的语义关系的存在(或不存在)决定了分配的大小(CPU代码)和计算内存分配偏移量的代码(GPU代码),有助于识别OOB错误的存在(或不存在)。我们构建了SCuBA,一种首次出现的编译时技术,分析CPU和GPU代码以捕获此类语义关系(如果存在)。它使用SAT求解器来检查在任何输入下是否存在OOB访问的可能性,给定捕获的关系作为约束。它进一步分析GPU代码以跟踪内存分配的逻辑划分以检测内部分配OOB。与NVIDIA的Compute Sanitizer相比,后者在20个程序中遗漏了45个隐蔽的内存错误,而SCuBA在没有假警报的情况下遗漏了零个。

英文摘要:

Memory safety bugs, such as out-of-bound accesses (OOB) in GPU programs, can compromise the security and reliability of GPU-accelerated software. We report the existence of input-dependent OOBs in the wild that manifest only under specific inputs. All existing tools to detect OOBs in GPU programs rely on runtime techniques that require an OOB to manifest for detection. Thus, input-dependent OOBs elude them. We also discover intra-allocation OOBs that arise in the presence of logical partitioning of a memory allocation into multiple data structures. Existing techniques are oblivious to the possibility of such OOBs. We make a key observation that the presence (or absence) of semantic relations among program variables, which determines the size of allocations (CPU code) and those calculating offsets into memory allocations (GPU code), helps identify the absence (or presence) of OOBs. We build SCuBA, a first-of-its-kind compile-time technique that analyzes CPU and GPU code to capture such semantic relations (if present). It uses a SAT solver to check if an OOB access is possible under any input, given the captured relations expressed as constraints. It further analyzes GPU code to track logical partitioning of memory allocations for detecting intra-allocation OOB. Compared to NVIDIA's Compute Sanitizer that misses 45 elusive memory bugs across 20 programs, SCuBA misses none with no false alarms.

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

↑