MadMax: surviving out-of-gas conditions in Ethereum smart contracts

Author:

Grech Neville1,Kong Michael2,Jurisevic Anton2,Brent Lexi2,Scholz Bernhard2,Smaragdakis Yannis3

Affiliation:

1. University of Athens, Greece / University of Malta, Malta

2. University of Sydney, Australia

3. University of Athens, Greece

Abstract

Ethereum is a distributed blockchain platform, serving as an ecosystem for smart contracts: full-fledged inter-communicating programs that capture the transaction logic of an account. Unlike programs in mainstream languages, a gas limit restricts the execution of an Ethereum smart contract: execution proceeds as long as gas is available. Thus, gas is a valuable resource that can be manipulated by an attacker to provoke unwanted behavior in a victim's smart contract (e.g., wasting or blocking funds of said victim). Gas-focused vulnerabilities exploit undesired behavior when a contract (directly or through other interacting contracts) runs out of gas. Such vulnerabilities are among the hardest for programmers to protect against, as out-of-gas behavior may be uncommon in non-attack scenarios and reasoning about it is far from trivial. In this paper, we classify and identify gas-focused vulnerabilities, and present MadMax: a static program analysis technique to automatically detect gas-focused vulnerabilities with very high confidence. Our approach combines a control-flow-analysis-based decompiler and declarative program-structure queries. The combined analysis captures high-level domain-specific concepts (such as "dynamic data structure storage" and "safely resumable loops") and achieves high precision and scalability. MadMax analyzes the entirety of smart contracts in the Ethereum blockchain in just 10 hours (with decompilation timeouts in 8% of the cases) and flags contracts with a (highly volatile) monetary value of over $2.8B as vulnerable. Manual inspection of a sample of flagged contracts shows that 81% of the sampled warnings do indeed lead to vulnerabilities, which we report on in our experiment.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference49 articles.

1. Towards verifying ethereum smart contract bytecode in Isabelle/HOL

2. Massimo Bartoletti Salvatore Carta Tiziana Cimoli and Roberto Saia. 2017. Dissecting Ponzi schemes on Ethereum: identification analysis and impact. (2017). Massimo Bartoletti Salvatore Carta Tiziana Cimoli and Roberto Saia. 2017. Dissecting Ponzi schemes on Ethereum: identification analysis and impact. (2017).

3. Formal Verification of Smart Contracts

4. Strictly declarative specification of sophisticated points-to analyses

Cited by 210 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Survey on Quality Assurance of Smart Contracts;ACM Computing Surveys;2024-09-14

2. Adoption of blockchain to develop a deployable secure healthcare solution: An analysis;Cyber Security and Applications;2024-08

3. SoK: A Unified Data Model for Smart Contract Vulnerability Taxonomies;Proceedings of the 19th International Conference on Availability, Reliability and Security;2024-07-30

4. Consolidating Smart Contracts with Behavioral Contracts;Proceedings of the ACM on Programming Languages;2024-06-20

5. A comprehensive survey of smart contract security: State of the art and research directions;Journal of Network and Computer Applications;2024-06

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3