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 条
  • [31] Optimization of the gas production rate by marginal cost analysis: Influence of the sales gas pressure, gas price and duration of gas sales contract
    Soemardan, Suprapto
    Purwanto, Widodo Wahyu
    Arsegianto
    JOURNAL OF NATURAL GAS SCIENCE AND ENGINEERING, 2014, 18 : 396 - 404
  • [32] Gas concentration analysis with a quartz friction vacuum gauge
    Kobayashi, T
    Hojo, H
    Ono, M
    VACUUM, 1996, 47 (6-8) : 479 - 483
  • [33] Empirical Study of Move Smart Contract Security: Introducing MoveScan for Enhanced Analysis
    Song, Shuwei
    Chen, Jiachi
    Chen, Ting
    Luo, Xiapu
    Li, Teng
    Yang, Wenwu
    Wang, Leqing
    Zhang, Weijie
    Luo, Feng
    He, Zheyuan
    Lu, Yi
    Li, Pan
    PROCEEDINGS OF THE 33RD ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2024, 2024, : 1682 - 1694
  • [34] An Empirical Investigation on the Trade-off between Smart Contract Readability and Gas Consumption
    Vacca, Anna
    Fredella, Michele
    Di Sorbo, Andrea
    Visaggio, Corrado A.
    Canfora, Gerardo
    30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 214 - 224
  • [35] An Empirical Investigation on the Trade-off between Smart Contract Readability and Gas Consumption
    Vacca, Anna
    Fredella, Michele
    Di Sorbo, Andrea
    Visaggio, Corrado A.
    Canfora, Gerardo
    IEEE International Conference on Program Comprehension, 2022, 2022-March : 214 - 224
  • [36] Smart engine - A gas turbine fault diagnostics and life management tool
    Sampath, Suresh
    Marinai, Luca
    Singh, Riti
    Gulati, Ankush
    Proceedings of the ASME Turbo Expo 2006, Vol 5, Pts A and B, 2006, : 639 - 648
  • [37] FTIR: A Flexible Tool for Industrial Gas Analysis
    Nordstrom, Nenne
    Cornish, Jim
    CHEMICAL ENGINEERING PROGRESS, 2018, 114 (06) : 50 - 54
  • [38] Experience with GSP as a gas path analysis tool
    Visser, W. P. J.
    Oostveen, M.
    Pieters, H.
    van Dorp, E.
    Proceedings of the ASME Turbo Expo 2006, Vol 2, 2006, : 175 - 182
  • [39] GAS CHROMATOGRAPHY - A NEW TOOL FOR THE ANALYSIS OF PLASTICS
    COBLER, JG
    SAMSEL, EP
    SPE TRANSACTIONS, 1962, 2 (02): : 145 - 151
  • [40] GaSaver: A Static Analysis Tool for Saving Gas
    Zhao, Ziyi
    Li, Jiliang
    Su, Zhou
    Wang, Yuyi
    IEEE TRANSACTIONS ON SUSTAINABLE COMPUTING, 2023, 8 (02): : 257 - 267