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 条
  • [1] Running on Fumes Preventing Out-of-Gas Vulnerabilities in Ethereum Smart Contracts Using Static Resource Analysis
    Albert, Elvira
    Gordillo, Pablo
    Rubio, Albert
    Sergey, Ilya
    VERIFICATION AND EVALUATION OF COMPUTER AND COMMUNICATION SYSTEMS, VECOS 2019, 2019, 11847 : 63 - 78
  • [2] MadMax: Analyzing the Out-of-Gas World of Smart Contracts
    Grech, Neville
    Kong, Michael
    Jurisevic, Anton
    Brent, Lexi
    Scholz, Bernhard
    Smaragdakis, Yannis
    COMMUNICATIONS OF THE ACM, 2020, 63 (10) : 87 - 95
  • [3] MadMax: Surviving Out-of-Gas Conditions in Ethereum Smart Contracts
    Grech, Neville
    Kong, Michael
    Jurisevic, Anton
    Brent, Lexi
    Scholz, Bernhard
    Smaragdakis, Yannis
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2 (02):
  • [4] LedgerHedger: Gas Reservation for Smart Contract Security
    Tsabary, Itay
    Manuskin, Alex
    Bar-Zur, Roi
    Eyal, Ittay
    FINANCIAL CRYPTOGRAPHY AND DATA SECURITY, FC 2024, PT I, 2025, 14744 : 248 - 270
  • [5] Preventing Out-of-Gas Exceptions by Typing
    Aceto, Luca
    Gorla, Daniele
    Lybech, Stian
    Hamdaqa, Mohammad
    LEVERAGING APPLICATIONS OF FORMAL METHODS, VERIFICATION AND VALIDATION: REOCAS COLLOQUIUM IN HONOR OF ROCCO DE NICOLA, PT I, ISOLA 2024, 2025, 15219 : 409 - 426
  • [6] GasFuzzer: Fuzzing Ethereum Smart Contract Binaries to Expose Gas-Oriented Exception Security Vulnerabilities
    Ashraf, Imran
    Ma, Xiaoxue
    Jiang, Bo
    Chan, W. K.
    IEEE ACCESS, 2020, 8 (08): : 99552 - 99564
  • [7] V-Gas: Generating High Gas Consumption Inputs to Avoid Out-of-Gas Vulnerability
    Ma, Fuchen
    Ren, Meng
    Ying, Fu
    Sun, Wanting
    Song, Houbing
    Shi, Heyuan
    Jiang, Yu
    Li, Huizhong
    ACM TRANSACTIONS ON INTERNET TECHNOLOGY, 2023, 23 (03)
  • [8] Ethainter: A Smart Contract Security Analyzer for Composite Vulnerabilities
    Brent, Lexi
    Grech, Neville
    Lagouvardos, Sifis
    Scholz, Bernhard
    Smaragdakis, Yannis
    PROCEEDINGS OF THE 41ST ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '20), 2020, : 454 - 469
  • [9] Systematic Review of Security Vulnerabilities in Ethereum Blockchain Smart Contract
    Kushwaha, Satpal Singh
    Joshi, Sandeep
    Singh, Dilbag
    Kaur, Manjit
    Lee, Heung-No
    IEEE ACCESS, 2022, 10 : 6605 - 6621
  • [10] NeuCheck: A more practical Ethereum smart contract security analysis tool
    Lu, Ning
    Wang, Bin
    Zhang, Yongxin
    Shi, Wenbo
    Esposito, Christian
    SOFTWARE-PRACTICE & EXPERIENCE, 2021, 51 (10): : 2065 - 2084