arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2508.06192cs.SE
收藏

理解智能合约中不一致状态更新漏洞

Understanding Inconsistent State Update Vulnerabilities in Smart Contracts

Shandong University(山东大学)

Lantian Li, Yuyu Chen, Jingwen Wu, Yue Pan, Zhongxing Yu

AI总结:

本文首次系统研究智能合约中的不一致状态更新漏洞,揭示其根本原因及修复方法,并开发检查器验证发现。

摘要:

智能合约使合同条款能够自动在区块链上执行和验证,近年来已在金融机构和供应链等领域得到了广泛应用。智能合约的执行逻辑与合同状态密切相关,因此合同的正确和安全执行严重依赖于对合同状态的精确控制和更新。然而,合同状态更新过程可能会出现问题。特别是,由于同步修改不一致等原因,可能会出现不一致的状态更新问题。不一致的状态更新漏洞已被攻击者多次利用,但现有的检测工具仍然难以有效识别它们。本文进行了首次大规模的实证研究,探讨智能合约中的不一致状态更新漏洞(即可利用的不一致状态更新漏洞),旨在为开发者、研究人员、工具构建者以及语言或库设计者提供启示,以避免不一致的状态更新漏洞。我们系统地调查了116个不一致的状态更新漏洞,涉及352个现实世界的智能合约项目,总结了其根本原因、修复策略和利用方法。我们的研究提供了11项原创且重要的发现,并给出了发现的含义。为了说明我们研究的潜在好处,我们还基于其中一个发现开发了一个概念验证检查器。该检查器能够有效检测64个流行的GitHub项目中的问题,19个项目的所有者在撰写时确认了检测到的问题。结果证明了我们的发现对于避免智能合约中的不一致状态更新漏洞的重要性和价值。

英文摘要:

Smart contracts enable contract terms to be automatically executed and verified on the blockchain, and recent years have witnessed numerous applications of them in areas such as financial institutions and supply chains. The execution logic of a smart contract is closely related to the contract state, and thus the correct and safe execution of the contract depends heavily on the precise control and update of the contract state. However, the contract state update process can have issues. In particular, inconsistent state update issues can arise for reasons such as unsynchronized modifications. Inconsistent state update bugs have been exploited by attackers many times, but existing detection tools still have difficulty in effectively identifying them. This paper conducts the first large-scale empirical study about inconsistent state update vulnerabilities (that is, inconsistent state update bugs that are exploitable) in smart contracts, aiming to shed light for developers, researchers, tool builders, and language or library designers in order to avoid inconsistent state update vulnerabilities. We systematically investigate 116 inconsistent state update vulnerabilities in 352 real-world smart contract projects, summarizing their root causes, fix strategies, and exploitation methods. Our study provides 11 original and important findings, and we also give the implications of our findings. To illustrate the potential benefits of our research, we also develop a proof-of-concept checker based on one of our findings. The checker effectively detects issues in 64 popular GitHub projects, and 19 project owners have confirmed the detected issues at the time of writing. The result demonstrates the usefulness and importance of our findings for avoiding inconsistent state update vulnerabilities in smart contracts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑