A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems

Compiler optimization is a critical component for improving program performance. However, the Rustc optimization process may introduce vulnerabilities due to algorithmic flaws or issues arising from component interactions. Existing testing methods face several challenges, including high randomness i...

Full description

Saved in:
Bibliographic Details
Main Authors: Kaifeng Xie, Jinjing Wan, Lifeng Chen, Yi Wang
Format: Article
Language:English
Published: MDPI AG 2025-07-01
Series:Mathematics
Subjects:
Online Access:https://www.mdpi.com/2227-7390/13/15/2459
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849239613977133056
author Kaifeng Xie
Jinjing Wan
Lifeng Chen
Yi Wang
author_facet Kaifeng Xie
Jinjing Wan
Lifeng Chen
Yi Wang
author_sort Kaifeng Xie
collection DOAJ
description Compiler optimization is a critical component for improving program performance. However, the Rustc optimization process may introduce vulnerabilities due to algorithmic flaws or issues arising from component interactions. Existing testing methods face several challenges, including high randomness in test cases, inadequate targeting of vulnerability-prone regions, and low-quality initial fuzzing seeds. This paper proposes a test case generation method based on large language models (LLMs), which utilizes prompt templates and optimization algorithms to generate a code relevant to specific optimization passes, especially for real-time control logic and safety-critical modules unique to the industrial control field. A vulnerability screening approach based on static analysis and rule matching is designed to locate potential risk points in the optimization regions of both the MIR and LLVM IR layers, as well as in unsafe code sections. Furthermore, the targeted fuzzing strategy is enhanced by designing seed queues and selection algorithms that consider the correlation between optimization areas. The implemented system, RustOptFuzz, has been evaluated on both custom datasets and real-world programs. Compared with state-of-the-art tools, RustOptFuzz improves vulnerability discovery capabilities by 16%–50% and significantly reduces vulnerability reproduction time, thereby enhancing the overall efficiency of detecting optimization-related vulnerabilities in Rustc, providing key technical support for the reliability of industrial control systems.
format Article
id doaj-art-cc45f0ffc198488abca38628ecc1bd4c
institution Kabale University
issn 2227-7390
language English
publishDate 2025-07-01
publisher MDPI AG
record_format Article
series Mathematics
spelling doaj-art-cc45f0ffc198488abca38628ecc1bd4c2025-08-20T04:00:54ZengMDPI AGMathematics2227-73902025-07-011315245910.3390/math13152459A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control SystemsKaifeng Xie0Jinjing Wan1Lifeng Chen2Yi Wang3Department of Anthropology and Human Genetics, Fudan University, Shanghai 200433, ChinaDepartment of Anthropology and Human Genetics, Fudan University, Shanghai 200433, ChinaDepartment of Anthropology and Human Genetics, Fudan University, Shanghai 200433, ChinaDepartment of Anthropology and Human Genetics, Fudan University, Shanghai 200433, ChinaCompiler optimization is a critical component for improving program performance. However, the Rustc optimization process may introduce vulnerabilities due to algorithmic flaws or issues arising from component interactions. Existing testing methods face several challenges, including high randomness in test cases, inadequate targeting of vulnerability-prone regions, and low-quality initial fuzzing seeds. This paper proposes a test case generation method based on large language models (LLMs), which utilizes prompt templates and optimization algorithms to generate a code relevant to specific optimization passes, especially for real-time control logic and safety-critical modules unique to the industrial control field. A vulnerability screening approach based on static analysis and rule matching is designed to locate potential risk points in the optimization regions of both the MIR and LLVM IR layers, as well as in unsafe code sections. Furthermore, the targeted fuzzing strategy is enhanced by designing seed queues and selection algorithms that consider the correlation between optimization areas. The implemented system, RustOptFuzz, has been evaluated on both custom datasets and real-world programs. Compared with state-of-the-art tools, RustOptFuzz improves vulnerability discovery capabilities by 16%–50% and significantly reduces vulnerability reproduction time, thereby enhancing the overall efficiency of detecting optimization-related vulnerabilities in Rustc, providing key technical support for the reliability of industrial control systems.https://www.mdpi.com/2227-7390/13/15/2459compiler optimization vulnerabilitiestest case generationstatic analysisdirected fuzz testingRustc
spellingShingle Kaifeng Xie
Jinjing Wan
Lifeng Chen
Yi Wang
A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems
Mathematics
compiler optimization vulnerabilities
test case generation
static analysis
directed fuzz testing
Rustc
title A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems
title_full A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems
title_fullStr A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems
title_full_unstemmed A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems
title_short A Comprehensive Approach to Rustc Optimization Vulnerability Detection in Industrial Control Systems
title_sort comprehensive approach to rustc optimization vulnerability detection in industrial control systems
topic compiler optimization vulnerabilities
test case generation
static analysis
directed fuzz testing
Rustc
url https://www.mdpi.com/2227-7390/13/15/2459
work_keys_str_mv AT kaifengxie acomprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT jinjingwan acomprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT lifengchen acomprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT yiwang acomprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT kaifengxie comprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT jinjingwan comprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT lifengchen comprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems
AT yiwang comprehensiveapproachtorustcoptimizationvulnerabilitydetectioninindustrialcontrolsystems