Gas Gauge: A Security Analysis Tool for Smart Contract Out-of-Gas Vulnerabilities

被引:0
|
作者
Nassirzadeh, Behkish [1 ]
Sun, Huaiying [2 ]
Banescu, Sebastian [3 ]
Ganesh, Vijay [1 ]
机构
[1] Univ Waterloo, Waterloo, ON, Canada
[2] East China Univ Sci & Technol, Shanghai, Peoples R China
[3] Quantstamp, Munich, Germany
关键词
Smart contract security; Blockchain; Ethereum; Static analysis; Dynamic analysis;
D O I
10.1007/978-3-031-18679-0_9
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
In recent years, we have witnessed a dramatic increase in the adoption and application of smart contracts in a variety of contexts. However, security vulnerabilities pose a significant challenge to the continued adoption of smart contracts. An important and pervasive class of security vulnerabilities that afflicts Ethereum smart contracts is the gas limit DoS on a contract via unbounded operations. These vulnerabilities result in a failed transaction with an "out-of-gas" error and are often present in contracts containing loops whose bounds are affected by end-user input. To address this issue, we present Gas Gauge, a tool aimed at detecting Out-of-Gas DoS vulnerabilities in Ethereum smart contracts. TheGas Gauge tool has threemajor components: The Detection Phase, Identification Phase, and Correction Phase. The Detection Phase component consists of an accurate static analysis approach that finds and summarizes all the loops in a smart contract. The Identification Phase component uses a white-box fuzzing approach to generate a set of inputs that causes the contract to run out of gas. Lastly, the Correction Phase component uses static analysis and run-time verification to predict the maximum loop bounds consistent with allowable gas usage and suggest appropriate repairs to the tool's users. Each part of Gas Gauge can be used separately or all together to detect, identify and help repair contracts vulnerable to Out-of-Gas DoS vulnerabilities. Gas Gauge was tested on 1,000 real-world solidity smart contracts. When compared to seven state-of-the-art tools, we show that Gas Gauge is the most effective (i.e., has no false positives and false negatives) while being competitive in terms of efficiency.
引用
收藏
页码:143 / 167
页数:25
相关论文
共 50 条
  • [21] GOV: A Verification Method for Smart Contract Gas-Optimization
    Huang, Yuan
    Wang, Rong
    Chen, Xiangping
    Zhou, Xiaocong
    Wang, Ziyan
    2022 IEEE 22ND INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY, QRS, 2022, : 473 - 479
  • [22] Towards Effective Static Analysis Approaches for Security Vulnerabilities in Smart Contracts
    Ghaleb, Asem
    PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [23] Vulnerabilities and Excess Gas Consumption Analysis Within Ethereum-Based Smart Contracts for Electricity Market
    Danielius, Paulius
    Stolarski, Piotr
    Masteika, Saulius
    BUSINESS INFORMATION SYSTEMS WORKSHOPS (BIS 2020), 2020, 394 : 99 - 110
  • [24] Cross-Contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts
    Xue, Yinxing
    Ma, Mingliang
    Lin, Yun
    Sui, Yulei
    Ye, Jiaming
    Peng, Tianyong
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 1029 - 1040
  • [25] How Developers Diagnose Potential Security Vulnerabilities with a Static Analysis Tool
    Smith, Justin
    Johnson, Brittany
    Murphy-Hill, Emerson
    Chu, Bill
    Lipford, Heather Richter
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2019, 45 (09) : 877 - 897
  • [26] Contractsentry: a static analysis tool for smart contract vulnerability detection
    Wang, Shiji
    Zhao, Xiangfu
    AUTOMATED SOFTWARE ENGINEERING, 2025, 32 (01)
  • [27] Clairvoyance: Cross-contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts
    Ye, Jiaming
    Ma, Mingliang
    Lin, Yun
    Sui, Yulei
    Xue, Yinxing
    2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2020), 2020, : 274 - 275
  • [28] Blockchain-based System Towards Data Security Against Smart Contract Vulnerabilities: Electronic Toll Collection Context
    Ben Rhaiem, Olfa
    Amara, Marwa
    Zaghdoud, Radhia
    Chaari, Lamia
    Alshammari, Maha Metab
    INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2024, 15 (06) : 1524 - 1538
  • [29] Code optimization strategies for reducing gas costs in a smart contract Student paper
    Staka, Marko
    2024 23RD INTERNATIONAL SYMPOSIUM INFOTEH-JAHORINA, INFOTEH, 2024,
  • [30] FUNREDISP: Reordering Function Dispatch in Smart Contract to Reduce Invocation Gas Fees
    Liu, Yunqi
    Song, Wei
    PROCEEDINGS OF THE 33RD ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2024, 2024, : 516 - 527