skip to main content
10.1145/3448734.3450774acmotherconferencesArticle/Chapter ViewAbstractPublication PagesdtmisConference Proceedingsconference-collections
research-article

A GPU memory leakage code defect detection method based on the API calling feature

Published: 17 May 2021 Publication History

Abstract

The General-Purpose Graphics Processing Unit (GPGPU) programming has been widely used in artificial intelligence and deep learning, and the GPGPU programming framework, represented by the CUDA framework launched by NIVIDIA Corporation, can apply the powerful parallel computing power of Graphics Processing unit (GPU) to non-graphics tasks. The gradually open computing power of GPU also brings related security risks, but the industry is still mainly concerned with how to dig into the potential security risks of GPU rather than the protection of known problems. In this paper, we propose an API calling feature (ACF) based method for detecting memory leaks in GPU codes and programmatically implement a prototype method to detect the risk of memory data residue in GPU codes written in CUDA framework. The prototype detection method is implemented using the Pass module development capability provided by the LLVM compiler project, and the method is tested to have good accuracy an effectiveness, which can provide a basis for subsequent GPU codes' security research.

References

[1]
High Performance Computing, https://developer.nvidia.com/cuda-zone
[2]
Parallel Thread Execution ISA, https://docs.nvidia.com/cuda/parallel-thread-execution/index.html
[3]
The LLVM Compiler Infrastructure, https://llvm.org/
[4]
CUDA Support in Clang, https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html#cuda-support-in-clang
[5]
M. J. Patterson, “Vulnerability analysis of GPU computing,” Ph.D. dissertation, Iowa State University, 2013.
[6]
S. Lee, Y. Kim, J. Kim, and J. Kim, “Stealing webpages rendered on your browser by exploiting GPU vulnerabilities,” in IEEE Symposium on Security and Privacy (SP). IEEE, 2014, pp. 19–33.
[7]
C. Maurice, C. Neumann, O. Heen, and A. Francillon, “Confidentiality issues on a GPU in a virtualized environment,” in International Conference on Financial Cryptography and Data Security. Springer, 2014, pp. 119–135.
[8]
A. Miele, “Buffer overflow vulnerabilities in CUDA: a preliminary analysis,” Journal of Computer Virology and Hacking Techniques, vol. 12, no. 2, pp. 113–120, 2016.
[9]
B. Di, J. Sun, and H. Chen, “A Study of Overflow Vulnerabilities on GPUs,” in IFIP International Conference on Network and Parallel Computing. Springer, 2016, pp. 103–115.
[10]
Z. Zhu, S. Kim, Y. Rozhanski, Y. Hu, E. Witchel, and M. Silberstein, “Understanding The Security of Discrete GPUs,” in Proceedings of the General Purpose GPUs. ACM, 2017, pp. 1–11.
[11]
D. Balzarotti, R. Di Pietro, and A. Villani, “The impact of GPU-assisted malware on memory forensics: A case study,” Digital Investigation, vol. 14, pp. S16–S24, 2015.
[12]
CUDA Toolkit Documentation, https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html .
[13]
CUDA Toolkit Documentation, https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html .
[14]
GPUDetection, https://github.com/hry712/GPUDetection
[15]
Cppcheck 2.3,  http://cppcheck.net/ .
[16]
VisualCodeGrepper 2.2.0, https://github.com/nccgroup/VCG .
[17]
GPUCodeAuditSamples,https://gitee.com/hry2021/gpucode-audit-samples/tree/dev/

Index Terms

  1. A GPU memory leakage code defect detection method based on the API calling feature
          Index terms have been assigned to the content through auto-classification.

          Recommendations

          Comments

          Information & Contributors

          Information

          Published In

          cover image ACM Other conferences
          CONF-CDS 2021: The 2nd International Conference on Computing and Data Science
          January 2021
          1142 pages
          ISBN:9781450389570
          DOI:10.1145/3448734
          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          Published: 17 May 2021

          Permissions

          Request permissions for this article.

          Check for updates

          Author Tags

          1. General-purpose graphics processing unit programming
          2. code defects
          3. detection
          4. features

          Qualifiers

          • Research-article
          • Research
          • Refereed limited

          Conference

          CONF-CDS 2021

          Contributors

          Other Metrics

          Bibliometrics & Citations

          Bibliometrics

          Article Metrics

          • 0
            Total Citations
          • 60
            Total Downloads
          • Downloads (Last 12 months)19
          • Downloads (Last 6 weeks)1
          Reflects downloads up to 18 Feb 2025

          Other Metrics

          Citations

          View Options

          Login options

          View options

          PDF

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader

          HTML Format

          View this article in HTML Format.

          HTML Format

          Figures

          Tables

          Media

          Share

          Share

          Share this Publication link

          Share on social media