Cross-Contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts

被引:55
|
作者
Xue, Yinxing [1 ]
Ma, Mingliang [1 ]
Lin, Yun [2 ]
Sui, Yulei [3 ]
Ye, Jiaming [1 ]
Peng, Tianyong [1 ]
机构
[1] Univ Sci & Technol China, Hefei, Peoples R China
[2] Natl Univ Singapore, Singapore, Singapore
[3] Univ Technol Sydney, Sydney, NSW, Australia
基金
澳大利亚研究理事会; 中国国家自然科学基金;
关键词
reentrancy vulnerabilities; static taint analysis; cross-contract analysis; smart contracts;
D O I
10.1145/3324884.3416553
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Reentrancy bugs, one of the most severe vulnerabilities in smart contracts, have caused huge financial loss in recent years. Researchers have proposed many approaches to detecting them. However, empirical studies have shown that these approaches suffer from undesirable false positives and false negatives, when the code under detection involves the interaction between multiple smart contracts. In this paper, we propose an accurate and efficient cross-contract reentrancy detection approach in practice. Rather than design rule-of-thumb heuristics, we conduct a large empirical study of 11714 real-world contracts from Etherscan against three well-known general-purpose security tools for reentrancy detection. We manually summarized the reentrancy scenarios where the state-of-the-art approaches cannot address. Based on the empirical evidence, we present CLAIRVOYANCE, a cross-function and cross-contract static analysis to detect reentrancy vulnerabilities in real world with significantly higher accuracy. To reduce false negatives, we enable, for the first time, a cross-contract call chain analysis by tracking possibly tainted paths. To reduce false positives, we systematically summarized five major path protective techniques (PPTs) to support fast yet precise path feasibility checking. We implemented our approach and compared CLAIRVOYANCE with five state-of-the-art tools on 17770 real-worlds contracts. The results show that CLAIRVOYANCE yields the best detection accuracy among all the five tools and also finds 101 unknown reentrancy vulnerabilities.
引用
收藏
页码:1029 / 1040
页数:12
相关论文
共 50 条
  • [41] EXGEN: Cross-platform, Automated Exploit Generation for Smart Contract Vulnerabilities
    Jin, Ling
    Cao, Yinzhi
    Chen, Yan
    Zhang, Di
    Campanoni, Simone
    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING, 2023, 20 (01) : 650 - 664
  • [42] MLFuzzer: a fuzzing approach based on generative adversarial networks and BiLSTM for detecting vulnerabilities in smart contracts
    Ghazi Mergani Ahmead Ali
    Hongsong Chen
    Cluster Computing, 2025, 28 (5)
  • [43] SmartGraph: Static Analysis Tool for Solidity Smart Contracts
    Zhukov, Andrei
    Korkhov, Vladimir
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS-ICCSA 2023 WORKSHOPS, PT I, 2023, 14104 : 584 - 598
  • [44] Foundations and Tools for the Static Analysis of Ethereum Smart Contracts
    Grishchenko, Ilya
    Maffei, Matteo
    Schneidewind, Clara
    COMPUTER AIDED VERIFICATION (CAV 2018), PT I, 2018, 10981 : 51 - 78
  • [45] CSAFuzzer: Fuzzing smart contracts combining with static analysis
    Yang, Jiahui
    Zhao, Xiangfu
    Zhang, Hanfeng
    He, Long
    Wang, Shiji
    Gou, Naixiang
    EMPIRICAL SOFTWARE ENGINEERING, 2025, 30 (03)
  • [46] Static Analysis of Integer Overflow of Smart Contracts in Ethereum
    Lai, Enmei
    Luo, Wenjun
    2020 4TH INTERNATIONAL CONFERENCE ON CRYPTOGRAPHY, SECURITY AND PRIVACY (ICCSP 2020), 2020, : 110 - 115
  • [47] Foundations and Techniques for the Static Analysis of Ethereum Smart Contracts
    Maffei, Matteo
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (296): : 1 - 1
  • [48] Blockchain Smart Contracts Static Analysis for Software Assurance
    Schmeelk, Suzanna
    Rosado, Bryan
    Black, Paul E.
    INTELLIGENT COMPUTING, VOL 2, 2021, 284 : 881 - 890
  • [49] SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis
    Liao, Zeqin
    Hao, Sicheng
    Nan, Yuhong
    Zheng, Zibin
    PROCEEDINGS OF THE 32ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2023, 2023, : 980 - 991
  • [50] Practical Smart Contract Sharding with Ownership and Commutativity Analysis
    Pirlea, George
    Kumar, Amrit
    Sergey, Ilya
    PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 1327 - 1341