DKFuzz: An Automated Approach for Testing the Underlying Kernels of Deep Learning Frameworks
Fuzz testing has emerged as an important technique for security testing in deep learning frameworks. However, existing fuzz testing methods primarily focus on model-level testing and API-level testing, while overlooking the core components of high-level APIs (kernels). Notably, vulnerabilities in kernels often involve high-priority memory safety issues, which can directly cause system crashes, thereby posing significant threats to the security and stability of deep learning system.In this paper, we propose DKFuzz, a novel method designed to discover vulnerabilities in the underlying kernels of deep learning frameworks. DKFuzz builds upon and improves the state-of-the-art fuzz testing engine, IvySyn. Specifically, DKFuzz introduces two key innovations:First, to target the underlying kernels, DKFuzz designs a set of diverse mutation strategies to expand the kernel test input data pool. Upon detecting a kernel crash, DKFuzz parses the core configuration files of the deep learning framework to construct a bidirectional mapping relationship between the kernel and high-level APIs. Based on this mapping relationship, DKFuzz can automatically synthesize high-level API code snippets. By executing these snippets, DKFuzz can accurately reproduce the original kernel crash.Second, for uncovered kernels, DKFuzz adopts a directed kernel coverage approach. By leveraging the bidirectional mapping relationship obtained through configuration file parsing, DKFuzz identifies the corresponding high-level APIs and combines them with prompt engineering techniques powered by large language models to generate high-level unit test cases for these APIs. By executing these test cases, DKFuzz further enhances kernel coverage. To evaluate the effectiveness of DKFuzz, we conducted experiments on two widely used deep learning frameworks, PyTorch and TensorFlow, and compared the results with IvySyn. The experimental results demonstrate that DKFuzz achieves significant improvements in both kernel coverage and vulnerability discovery capabilities. These findings highlight the potential of DKFuzz as a robust and effective tool for security testing in deep learning frameworks.
Authors
- Sichun Du (ORCID: https://orcid.org/0000-0002-4718-8042)
- Yuanping Nie (ORCID: https://orcid.org/0000-0002-8351-4108)
- Xiang Li (ORCID: https://orcid.org/0009-0002-4325-2876)
- Qiong Wu (ORCID: https://orcid.org/0000-0001-5747-1899)
- Hanqing Li (ORCID: https://orcid.org/0009-0003-5354-7675)
Institutions
- Academy of Military Medical Sciences (CN)
Publication Details
- Published
- 2025-03-21
- DOI
- https://doi.org/10.1109/asens64990.2025.11011223
- Primary Topic
- Anomaly Detection Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00