arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1802.08660cs.CR
收藏

以太坊智能合约安全性分析的语义框架

A Semantic Framework for the Security Analysis of Ethereum smart contracts

Ilya Grishchenko, Matteo Maffei, Clara Schneidewind

摘要:

智能合约是在加密货币上运行的程序(例如,以太坊(Ethereum)区块链,其流行源于在分布式环境中执行金融交易(如支付和拍卖)的可能性,而不需要任何可信的第三方。鉴于其财务性质,这些程序中的漏洞或漏洞可能会导致灾难性的后果,最近的攻击就是明证。不幸的是,编程智能合约是一项微妙的任务,需要强大的专业知识:以太坊智能合约是用Solidity编写的,这是一种类似于JavaScript的专用语言,并以EVM字节码格式在区块链上发布。为了严格验证智能合约的安全性,最重要的是将其语义以及感兴趣的安全属性形式化,特别是在执行的字节码级别。在本文中,我们提出了EVM字节码的第一个完整的小步语义,我们在F* 证明助手中对其进行了形式化,获得了我们成功验证官方以太坊测试套件的可执行代码。此外,我们首次正式定义了智能合约的一些中央安全属性,例如调用完整性,原子性和独立于矿工控制参数。这种形式化依赖于hyper属性和safety属性的组合。在这项工作中,我们发现了以太坊智能合约现有语义和验证工具中的各种错误和不精确之处,从而再次证明了严格的语义基础对于安全验证技术设计的重要性。

英文摘要:

Smart contracts are programs running on cryptocurrency (e.g., Ethereum) blockchains, whose popularity stem from the possibility to perform financial transactions, such as payments and auctions, in a distributed environment without need for any trusted third party. Given their financial nature, bugs or vulnerabilities in these programs may lead to catastrophic consequences, as witnessed by recent attacks. Unfortunately, programming smart contracts is a delicate task that requires strong expertise: Ethereum smart contracts are written in Solidity, a dedicated language resembling JavaScript, and shipped over the blockchain in the EVM bytecode format. In order to rigorously verify the security of smart contracts, it is of paramount importance to formalize their semantics as well as the security properties of interest, in particular at the level of the bytecode being executed. In this paper, we present the first complete small-step semantics of EVM bytecode, which we formalize in the F* proof assistant, obtaining executable code that we successfully validate against the official Ethereum test suite. Furthermore, we formally define for the first time a number of central security properties for smart contracts, such as call integrity, atomicity, and independence from miner controlled parameters. This formalization relies on a combination of hyper- and safety properties. Along this work, we identified various mistakes and imprecisions in existing semantics and verification tools for Ethereum smart contracts, thereby demonstrating once more the importance of rigorous semantic foundations for the design of security verification techniques.

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

↑