SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis

被引:6
|
作者
Liao, Zeqin [1 ]
Hao, Sicheng [1 ]
Nan, Yuhong [1 ]
Zheng, Zibin [1 ]
机构
[1] Sun Yat Sen Univ, Guangzhou, Peoples R China
基金
中国国家自然科学基金;
关键词
bug finding; smart contract; static analysis; state dependency;
D O I
10.1145/3597926.3598111
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Smart contracts written in Solidity are widely used in different blockchain platforms such as Ethereum, TRON and BNB Chain. One of the unique designs in Solidity smart contracts is its state-reverting mechanism for error handling and access control. Unfortunately, a number of recent security incidents showed that adversaries also utilize this mechanism to manipulate critical states of smart contracts, and hence, bring security consequences such as illegal profit-gain and Deny-of-Service (DoS). In this paper, we call such vulnerabilities as the State-reverting Vulnerability (SRV). Automatically identifying SRVs poses unique challenges, as it requires an in-depth analysis and understanding of the state-dependency relations in smart contracts. This paper presents SmartState, a new framework for detecting state-reverting vulnerability in Solidity smart contracts via fine-grained state-dependency analysis. SmartState integrates a set of novel mechanisms to ensure its effectiveness. Particularly, SmartState extracts state dependencies from both contract bytecode and historical transactions. Both of them are critical for inferring dependencies related to SRVs. Further, SmartState models the generic patterns of SRVs (i.e., profit-gain and DoS) as SRV indicators, and hence effectively identify SRVs based on the constructed state-dependency graph. To evaluate SmartState, we manually annotated a ground-truth dataset which contains 91 SRVs in the real world. Evaluation results showed that SmartState achieves a precision of 87.23% and a recall of 89.13%. In addition, SmartState successfully identifies 406 new SRVs from 47,351 real-world smart contracts. 11 of these SRVs are from popular smart contracts with high transaction amounts (i.e., top 2000). In total, our reported SRVs affect a total amount of digital assets worth 428,600 USD.
引用
收藏
页码:980 / 991
页数:12
相关论文
共 5 条
  • [1] Smart Contract Parallel Execution with Fine-Grained State Accesses
    Qi, Xiaodong
    Jiao, Jiao
    Li, Yi
    2023 IEEE 43RD INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS, ICDCS, 2023, : 841 - 852
  • [2] Hidden Figures: Comparative Latency Analysis of Cellular Networks with Fine-grained State Machine Models
    Bae, Sangwook
    Son, Mincheol
    Son, Sooel
    Kim, Yongdae
    HOTMOBILE '19 - PROCEEDINGS OF THE 20TH INTERNATIONAL WORKSHOP ON MOBILE COMPUTING SYSTEMS AND APPLICATIONS, 2019, : 75 - 80
  • [3] America Tweets China: A Fine-Grained Analysis of the State and Individual Characteristics Regarding Attitudes towards China
    Wang, Yu
    Yuan, Jianbo
    Luo, Jiebo
    PROCEEDINGS 2015 IEEE INTERNATIONAL CONFERENCE ON BIG DATA, 2015, : 936 - 943
  • [4] Critical State Analysis for Iron Ore Tailings with a Fine-Grained Interlayer: Effects of Layering Thickness and Dip Angle
    Ji, Xu
    Xu, Qiang
    Ren, Kaiyi
    Wei, Lanting
    Wang, Wensong
    WATER, 2024, 16 (20)
  • [5] Achieving fine-grained equiaxed alpha via thermo-mechanical loading under off-equilibrium state in two-phase Ti-alloys
    Meng, M.
    Fan, X. G.
    Guo, L. G.
    Zhan, M.
    JOURNAL OF MATERIALS PROCESSING TECHNOLOGY, 2018, 259 : 397 - 408