arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.21373cs.CRcs.SE
收藏

评估与改进Rust的静态应用安全测试工具

Evaluating and Improving Static Application Security Testing Tools for Rust

University of Hong Kong(香港大学);Nanjing University(南京大学);Hong Kong Polytechnic University(香港理工大学);Concordia University(康考迪亚大学)

Huaien Zhang, Zhengjie Zhao, Yu Pei, Tian Dong, Minxue Pan, Shin Hwei Tan, Hao Chen

AI总结:

本文评估主流Rust SAST工具的有效性与弱点,提出LLM辅助的TRUST框架,发现6种SAST工具的46个故障,为改进Rust SAST工具提供指导。

摘要:

Rust近年来已成为流行的系统级编程语言,因其对内存安全和并发安全提供强保障,许多系统软件已用Rust重新实现。但Rust程序仍可能因不安全代码及对其复杂机制的误解,出现常见的内存与并发漏洞。为缓解此类漏洞,开发者常依赖静态应用安全测试(SAST)工具。然而,现有Rust SAST工具对真实漏洞的有效性仍未得到充分探索。本文首先利用真实Rust应用中发现的安全漏洞,对主流Rust SAST工具进行实证评估,系统评估其有效性,揭示常见弱点并分析其根本原因。受该研究启发,我们提出TRUST,一种大语言模型(LLM)辅助的自动化测试框架。TRUST自动分析Rust官方参考文档,推导并实现语义保留的转换,利用这些转换生成变异程序,用于评估Rust SAST工具并发现其中的潜在故障。总体而言,TRUST已在6种流行SAST工具中发现46个故障,其中17个已被确认。此外,本研究得出10项实证发现和4条实用经验,为开发更有效、健壮且可维护的Rust SAST工具提供可操作的指导。

英文摘要:

Rust has become a popular systems programming language in recent years because of its strong guarantees on memory and concurrency safety. Many types of system software have been re-implemented in Rust. However, Rust programs can still suffer from common memory and concurrency vulnerabilities due to unsafe code and misunderstandings of its complex mechanisms. To mitigate such vulnerabilities, developers often rely on static application security testing (SAST) tools. However, the effectiveness of existing Rust SAST tools on real-world vulnerabilities remains underexplored. In this paper, we first conduct an empirical evaluation of mainstream Rust SAST tools using security vulnerabilities identified in real-world Rust applications. We systematically assess their effectiveness, uncover common weaknesses, and analyze the root causes behind them. Motivated by the study, we propose TRUST, a large language model (LLM)-assisted automated testing framework. TRUST automatically analyzes the official Rust reference to derive and implement semantics-preserving transformations. It leverages these transformations to generate mutant programs for evaluating Rust SAST tools and uncovering potential faults within them. Overall, TRUST has revealed 46 faults across six popular SAST tools, 17 of which have been confirmed. In addition, our study yields ten empirical findings and four practical lessons that provide actionable guidance for developing more effective, robust, and maintainable Rust SAST tools.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑