Reentrancy remains one of the most critical classes of vulnerabilities in Ethereum smart contracts, yet widely used detection tools and datasets continue to reflect outdated patterns and obsolete Solidity versions. This paper adopts a dependability-oriented perspective on reentrancy detection in Solidity 0.8+, assessing how reliably state-of-the-art static analyzers and AI-based techniques operate on modern code by putting them to the test on two fronts. We construct two manually verified benchmarks: an Aggregated Benchmark of 432 real-world contracts, consolidated and relabeled from prior datasets, and a Reentrancy Scenarios Dataset (RSD) of \chadded{143} handcrafted minimal working examples designed to isolate and stress-test individual reentrancy patterns. We then evaluate 12 formal-methods-based tools, 10 machine-learning models, and 9 large language models. On the Aggregated Benchmark, traditional tools and ML models achieve up to 0.87 F1, while the best LLMs reach 0.96 in a zero-shot setting. On the RSD, most tools fail on multiple scenarios, the top performer achieving an F1 of 0.76, whereas the strongest model attains 0.82. Overall, our results indicate that leading LLMs outperform the majority of existing detectors, highlighting concerning gaps in the robustness and maintainability of current reentrancy-analysis tools.
翻译:重入漏洞仍是以太坊智能合约中最严重的安全漏洞类别之一,但当前广泛使用的检测工具和数据集仍反映着过时的模式和陈旧的Solidity版本。本文从可信性视角研究Solidity 0.8+版本中的重入漏洞检测,通过双维度测试评估最先进的静态分析工具与基于AI的技术在现代代码中的可靠性。我们构建了两个人工验证基准:包含432个真实世界合约的综合基准(对先前数据集进行整合与重新标注),以及包含143个人工构造的最小工作示例的重入场景数据集(RSD),旨在隔离并压力测试各类重入模式。随后我们评估了12种基于形式化方法的工具、10种机器学习模型和9种大语言模型。在综合基准测试中,传统工具与机器学习模型的最佳F1值为0.87,而最优LLM在零样本设置下达到0.96。在RSD测试中,多数工具在多个场景中失效,最佳表现者F1值为0.76,而最强模型达到0.82。总体而言,我们的研究结果表明领先的LLM超越了大多数现有检测器,凸显了当前重入分析工具在鲁棒性与可维护性方面存在值得关注的缺陷。