Tainting in Smart Contracts: Combining Static and Runtime Verification

被引:1
|
作者
Azzopardi, Shaun [2 ]
Ellul, Joshua [1 ]
Falzon, Ryan [3 ]
Pace, Gordon J. [1 ]
机构
[1] Univ Malta, Msida, Malta
[2] Univ Gothenburg, Gothenburg, Sweden
[3] Hash Data, George Town, Cayman Islands
来源
基金
欧洲研究理事会;
关键词
Taint analysis; Runtime verification; Static analysis;
D O I
10.1007/978-3-031-17196-3_8
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Smart contracts exist immutably on blockchains, making their pre-deployment correctness essential. Moreover, they exist openly on blockchains-open for interaction with any other smart contract and off-chain entity. Interaction, for instance with off-chain oracles, can affect the state of the smart contract, and correctness of these smart contracts may depend on the trustworthiness of the data they manipulate or events they generate which, in turn, would depend on which parties or what information contributed to them. In this paper, we develop and present dynamic taint analysis techniques to enable data tainting in smart contracts. We propose an extension of Solidity that enables labelling inputs of interaction endpoints with dynamic data-carrying labels that capture actionable information about the sender. These labels can then be propagated dynamically across transactions to transitively dependent data. Specifications can then refer to such taints, for instance for ensuring that certain data could not have been influenced through interaction by a certain party. We further allow the use of taints as part of the language, affecting the control flow of the smart contract. To manage the overheads of such runtime tainting we develop sound static analysis-based techniques to prune away unnecessary instrumentation. We give a case study as a proof-of-concept, and measure the overheads associated with our additions before and after optimisation.
引用
收藏
页码:143 / 161
页数:19
相关论文
共 50 条
  • [1] Runtime Verification of Ethereum Smart Contracts
    Ellul, Joshua
    Pace, Gordon
    [J]. 2018 14TH EUROPEAN DEPENDABLE COMPUTING CONFERENCE (EDCC 2018), 2018, : 158 - 163
  • [2] Runtime verification of .NET contracts
    Barnett, M
    Schulte, W
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2003, 65 (03) : 199 - 208
  • [3] Runtime Verification of Contracts with Themulus
    Aranda Garcia, Alberto
    Cambronero, Maria-Emilia
    Colombo, Christian
    Llana, Luis
    Pace, Gordon J.
    [J]. SOFTWARE ENGINEERING AND FORMAL METHODS, SEFM 2020, 2020, 12310 : 231 - 246
  • [4] Smart Markers in Smart Contracts: Enabling Multiway Branching and Merging in Blockchain for Decentralized Runtime Verification
    Geng, Tieming
    Njilla, Laurent
    Huang, Chin-Tser
    [J]. 2021 IEEE CONFERENCE ON DEPENDABLE AND SECURE COMPUTING (DSC), 2021,
  • [5] Runtime Verification of Web Service Interface Contracts
    Halle, Sylvain
    Bultan, Tevfik
    Hughes, Graham
    Alkhalaf, Muath
    Villemaire, Roger
    [J]. COMPUTER, 2010, 43 (03) : 59 - 66
  • [6] Static Verification for Code Contracts
    Faehndrich, Manuel
    [J]. STATIC ANALYSIS, 2010, 6337 : 2 - 5
  • [7] Testing Meets Static and Runtime Verification
    Chimento, Jesus Mauricio
    Ahrendt, Wolfgang
    Schneider, Gerardo
    [J]. 2018 ACM/IEEE CONFERENCE ON FORMAL METHODS IN SOFTWARE ENGINEERING (FORMALISE 2018), 2018, : 30 - 39
  • [8] On the Formal Verification of Smart Contracts
    Davila, Rene
    Aldeco-Perez, Rocio
    Barcenas, Everardo
    [J]. 2023 11TH INTERNATIONAL CONFERENCE IN SOFTWARE ENGINEERING RESEARCH AND INNOVATION, CONISOFT 2023, 2023, : 18 - 24
  • [9] Verification of smart contracts: A survey
    Almakhour, Mouhamad
    Sliman, Layth
    Samhat, Abed Ellatif
    Mellouk, Abdelhamid
    [J]. PERVASIVE AND MOBILE COMPUTING, 2020, 67
  • [10] Combining test case generation and runtime verification
    Artho, C
    Barringer, H
    Goldberg, A
    Havelund, K
    Khurshid, S
    Lowry, M
    Pasareanu, C
    Rosu, G
    Sen, K
    Visser, W
    Washington, R
    [J]. THEORETICAL COMPUTER SCIENCE, 2005, 336 (2-3) : 209 - 234