In the AI-driven era, NVIDIA CUDA libraries have become indispensable for accelerating compute-intensive tasks, yet their security assessment remains critically understudied due to closed-source code and unique program.gming paradigms.Existing efforts primarily focus ontarget CUDA compiler vulnerabilities (e.g., NVCC), but leaving library-level risks largely unexplored.overlook broader library-specific risks.This The paper addresses the challenges of fuzzing CUDA libraries: 1) the absence of guidance narrows the set of APIs that generated harnesses can reach; and 2) input mutation remains inefficient for LLM-generated harnesses.We propose Cuda-Gen, Aa new tool called Cuda-Gen has been proposed, aimed at uncovering potential vulnerabilities in the CUDA libraries.Cuda-Gen has the ability tocan generate testing harnesses for various CUDA library functions from scratch, perform efficient parameter mutation, and adapt to the needs of multiple CUDA libraries.First, LLMs are used to extract semantic relationships from CUDA documentation and sample codes, constructing a knowledge graph that prioritizes API interactions and contextual dependencies.We introduce anThe API coverage bitmap is proposed to guide the fuzzer to explore under-tested library functions.AdditionallyBesides, we integrate the API knowledge graph is also combined with compiler diagnostics to automatically repair erroneous harnesses, thereby improving compilation success rates.Subsequently, Cuda-Gen employs the LLMs to analyze and decouple parameter dependencies, separates out the mutable parameters, and performs parameter-isolated mutation on them to enhance mutation efficiency.Evaluated across three CUDA releases (12.4, 12.7, and 13.0) on eightsix widely adopted libraries (e.g., cuBLAS, cuFFT), Cuda-Gen achieves on average 2.97× improvements inhigher API coverage and 4.0× improvements insuperior API edge coverage over the baseline tool Fuzz4Allrelative to baseline (Fuzz4all), on average.The experiments uncovered 43 unknown vulnerabilitiesbugs, validated by NVIDIA’s security team.
RaffelC, ShazeerN, RobertsA,et al.Exploring the limits of transfer learning with a unified text-to-text transformer[J].J Mach Learn Res, 2020, 21(140): 1-67.
[2]
LozhkovA, LiR, AllalL B, et al.StarCoder 2 and the stack v2: The next generation[EB/OL].[2025-08-24].
[3]
SunP, KretzschmarH, DotiwallaX,et al.Scalability in perception for autonomous driving: Waymo open dataset[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Seattle:IEEE,2020: 2443-2451.
[4]
KaplanJ, McCandlishS, HenighanT, et al.Scaling laws for neural language models[EB/OL].[2025-08-24].
[5]
NVIDIADeveloper.CUDA Toolkit[EB/OL].[2025-09-30].
[6]
JiangB, WangX, ChanW K,et al.CUDAsmith: A fuzzer for CUDA compilers[C]//2020 IEEE 44th Annual Computers,Software,and Applications Conference (COMPSAC).Madrid,Spain:IEEE,2020: 861-871.
[7]
YangX, ChenY, EideE,et al.Finding and understanding bugs in C compilers[J].SIGPLAN Not,2011, 46(6): 283-294.
[8]
XiaC S, PaltenghiM, TianJ L,et al.Fuzz4ALL: Universal fuzzing with large language models[C]//2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE).Lisbon,Portugal:IEEE,2024: 1547-1559.
[9]
JungJ, JangJ, JoY,et al.Moneta: Ex-vivo GPU driver fuzzing by recalling in-vivo execution states [C]//Proceedings 2025 Network and Distributed System Security Symposium.San Diego: Internet Society, 2025.
WuM, JiangL, XiangJ,et al.One fuzzing strategy to rule them all[C]//Proceedings of the 44th International Conference on Software Engineering.Pittsburgh Pennsylvania: ACM,2022: 1634-1645.
[18]
OdenaA, GoodfellowI.TensorFuzz: Debugging neural networks with coverage-guided fuzzing[EB/OL].[2025-08-24].
[19]
YangC, DengY, LuR,et al.WhiteFox:White-box compiler fuzzing empowered by large language models [J].Proc ACM Program Lang, 2024, 8: 709-735.
[20]
GreenH, AvgerinosT.GraphFuzz: Library API fuzzing with lifetime-aware dataflow graphs[C]//Proceedings of the 2022 IEEE/ACM 44th International Conference on Software Engineering (ICSE).Pittsburgh: IEEE, 2022: 1070-1081.
[21]
DengY, XiaC S, PengH,et al.Large language models are zero-shot fuzzers: Fuzzing deep-learning libraries via large language models[C]//Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis.Seattle:ACM, 2023: 423-435.
[22]
ChenP, XieY, LyuY,et al.Hopper: Interpretative fuzzing for libraries[C]//Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security.Copenhagen Denmark: ACM,2023: 1600-1614.
[23]
HuaZ, LinW, RenL,et al.GDsmith: Detecting bugs in cypher graph database engines[C]//Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis.Seattle:ACM, 2023: 163-174.
[24]
LiJ, ZhouY, WuL.Improving multitasking DBMS fuzzing with more accurate coverage and testcase trimming[J].IEEE Trans Dependable Secure Comput, 2025, 22(3): 2756-2770.
[25]
YangY, ChenY, ZhongR, et al.Towards generic database management system fuzzing[C]//33rd USENIX Security Symposium (USENIX Security 24).Berkeley, USA: USENIX Association,2024: 901-918.
[26]
ZhongR, ChenY, HuH,et al.SQUIRREL: Testing database management systems with language validity and coverage feedback[C]//Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security.Virtual Event:ACM,2020: 955-970.
[27]
SorensenT, DonaldsonA F.Exposing errors related to weak memory in GPU applications[J].SIGPLAN Not,2016,51(6): 100-113.
GuJ, LuoX, ZhouY,et al.Muffin: Testing deep learning libraries via neural architecture fuzzing[C]//2022 IEEE/ACM 44th International Conference on Software Engineering (ICSE).Pittsburgh:IEEE,2022: 1418-1430.
[31]
XieX, MaL, Juefei-XuF,et al.DeepHunter: A coverage-guided fuzz testing framework for deep neural networks[C]//Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis.Beijing, China:ACM,2019: 146-157.
[32]
YangC, DengY, YaoJ,et al.Fuzzing automatic differentiation in deep-learning libraries[C]//2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE).Melbourne,Australia:IEEE,2023: 1174-1186.
[33]
JeongB, JangJ, YiH, et al.UTopia: Automatic generation of fuzz driver using unit tests[C]//2023 IEEE Symposium on Security and Privacy (SP).San Francisco:IEEE,2023: 2676-2692.
[34]
LiW, YangH, LuoX,et al.PyRTFuzz: Detecting bugs in Python runtimes via two-level collaborative fuzzing[C]//Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security.Copenhagen Denmark: ACM,2023: 1645-1659.
[35]
LyuY, XieY, ChenP,et al.Prompt fuzzing for fuzz driver generation[C]//Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security.Salt Lake City:ACM,2024: 3793-3807.
[36]
Google.OSS-Fuzz[EB/OL].[2025-09-30].
[37]
XuH, MaW, ZhouT,et al.CKGFuzzer: LLM-based fuzz driver generation enhanced by code knowledge graph[C]//2025 IEEE/ACM 47th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion).Ottawa, Canada: IEEE, 2025: 243-254.
[38]
ZhangY H.Research on Large Language Model-guided fuzzing technology for DBMS[D].Guangzhou: Guangzhou University, 2025.
[39]
张宇恒.大语言模型指导的DBMS模糊测试技术研究[D].广州:广州大学,2025.
[40]
PengS, ZhangY, DaiJ,et al.Applying fuzz driver generation to native C/C++ libraries of OEM Android framework: Obstacles and solutions[C]//Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering.Sacramento:ACM,2024: 2035-2040.
[41]
LiuH, HouT D, ZhaoB,et al.Survey of fuzzing test case generation techniques[J].Comput Eng Sci,2025,47(7): 1244-1261.
MaX, LuoL, ZengQ.From one thousand pages of specification to unveiling hidden bugs: Large language model assisted fuzzing of matter {IoT} devices [C]//33rd USENIX Security Symposium (USENIX Security 24).Berkeley,CA,USA: USENIX Association, 2024: 4783-4800.
[44]
LiuR, YangP, JiaP,et al.LCFuzzer: Large language model assisted fuzzing approach forsmart contract vulnerability detection[J].J Sichuan Univ Nat Sci Ed,2025,62(3): 641-650.
JiangY, LiangJ, MaF,et al.When fuzzing meets LLMs: Challenges and opportunities[C]//Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering.Porto de Galinhas Brazil:ACM,2024: 492-496.
HazimehA, HerreraA, PayerM.Magma:A ground-truth fuzzing benchmark[C]//Abstract Proceedings of the 2021 ACM SIGMETRICS /International Conference on Measurement and Modeling of Computer Systems.Virtual Event China: ACM,2021: 81-82.
[59]
VillaO, StephensonM, NellansD,et al.NVBit: A dynamic binary instrumentation framework for NVIDIA GPUs[C]//Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture.Columbus:ACM,2019: 372-383.