New

CuSafe: GPU Memory Safety on Commodity NVIDIA GPUs

How parallel metadata traffic, compiler reach, and reuse shape protection

8 chapters74 min total
Keywords
CuSafeGPUCUDASanitizersNVIDIALLVMMetadataBoundsLifetimesCompute Sanitizer
Overview

CuSafe explores how to detect spatial and temporal memory corruption in CUDA programs without requiring custom hardware. The series moves from GPU parallelism and memory-space constraints to a hybrid design: pointer metadata locates in-band buffer bounds, compiler instrumentation checks dereferences, and runtime events track lifetimes. It then separates spatial checks from reuse-aware temporal checks and interprets results from a 33-program security suite and 44-program performance study. The evidence supports full detection in the reported suite and moderate average overhead on tested workloads, not universal coverage; object-level bounds, unsupported paths, bounded epochs, probabilistic identity, and workload-dependent cost remain.

Learning outcomes
  • GPU parallelism makes metadata placement and traffic part of sanitizer cost.
  • CuSafe combines pointer-side identity with buffer-side exact bounds and liveness state.
  • CuSafe detected all 33 programs in the reported security suite, not every possible CUDA failure.
  • Across 44 evaluated programs, average overhead was 13% in execution time and 11% in LLM throughput.
  • Deployment still depends on supported LLVM and allocation paths, with bounded and probabilistic identity limits.
Keywords
CuSafeGPUCUDASanitizersNVIDIALLVMMetadataBoundsLifetimesCompute Sanitizer

Chapters

Preview every chapter · Unlock full text, audio, and video from chapter 4

Plans
Ch.1-3 FreeCh.4-8 Premium

FAQ

Why does GPU memory safety require an architecture-aware sanitizer?

GPU parallelism makes metadata traffic, memory-space ownership, and compiler reach part of the safety problem, not just the bounds formula. CuSafe designs its checks around those constraints on commodity NVIDIA hardware.

How does CuSafe detect both spatial and temporal corruption?

CuSafe validates pointer metadata and exact buffer bounds for spatial errors, then uses buffer invalidation plus local stack epochs or global address identity for reuse-related temporal errors.

Does CuSafe provide complete memory safety for CUDA?

No. The paper reports detection of all 33 programs in its constructed suite, but object-level bounds, unsupported paths, bounded epochs, and probabilistic identity limit the broader claim.

What determines whether CuSafe is practical for a workload?

Practicality depends on LLVM and allocation-path coverage, access patterns, and tolerance for measured overhead; averages across 44 programs were 13% execution-time overhead and 11% lower LLM throughput.