Compositional Security for Reentrant Applications

The disastrous vulnerabilities in smart contracts sharply remind us of our ignorance: we do not know how to write code that is secure in composition with malicious code. Information flow control has long been proposed as a way to achieve compositional security, offering strong guarantees even when combining software from different trust domains. Unfortunately, this appealing story breaks down in the presence of reentrancy attacks. We formalize a general definition of reentrancy and introduce a security condition that allows software modules like smart contracts to protect their key invariants while retaining the expressive power of safe forms of reentrancy. We present a security type system that provably enforces secure information flow; in conjunction with run-time mechanisms, it enforces secure reentrancy even in the presence of unknown code; and it helps locate and correct recent high-profile vulnerabilities.

[1]  Albert Rubio,et al.  Taming callbacks for smart contract modularity , 2020, Proc. ACM Program. Lang..

[2]  Fan Long,et al.  Securing smart contract with runtime validation , 2020, PLDI.

[3]  Yannis Smaragdakis,et al.  Ethainter: a smart contract security analyzer for composite vulnerabilities , 2020, PLDI.

[4]  Ilya Sergey,et al.  Safer smart contract programming with Scilla , 2019, Proc. ACM Program. Lang..

[5]  Brad A. Myers,et al.  Obsidian: Typestate and Assets for Safer Blockchain Programming , 2019, ACM Trans. Program. Lang. Syst..

[6]  G. Edward Suh,et al.  Using Information Flow to Design an ISA that Controls Timing Channels , 2019, 2019 IEEE 32nd Computer Security Foundations Symposium (CSF).

[7]  Frank Pfenning,et al.  Resource-Aware Session Types for Digital Contracts , 2019, 2021 IEEE 34th Computer Security Foundations Symposium (CSF).

[8]  Christian Rossow,et al.  teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts , 2018, USENIX Security Symposium.

[9]  Matteo Maffei,et al.  Foundations and Tools for the Static Analysis of Ethereum Smart Contracts , 2018, CAV.

[10]  Sophia Drossopoulou,et al.  Writing safe smart contracts in Flint , 2018, Programming.

[11]  Matteo Maffei,et al.  A Semantic Framework for the Security Analysis of Ethereum smart contracts , 2018, POST.

[12]  Prateek Saxena,et al.  Finding The Greedy, Prodigal, and Suicidal Contracts at Scale , 2018, ACSAC.

[13]  Ittai Abraham,et al.  Online detection of effectively callback free objects with applications to smart contracts , 2017, Proc. ACM Program. Lang..

[14]  Simon L. Peyton Jones,et al.  SHErrLoc: A Static Holistic Error Locator , 2017, ACM Trans. Program. Lang. Syst..

[15]  Prateek Saxena,et al.  Making Smart Contracts Smarter , 2016, IACR Cryptol. ePrint Arch..

[16]  Fan Zhang,et al.  Town Crier: An Authenticated Data Feed for Smart Contracts , 2016, CCS.

[17]  Nikhil Swamy,et al.  Formal Verification of Smart Contracts: Short Paper , 2016, PLAS@CCS.

[18]  Alberto Lluch-Lafuente,et al.  Microservices: Yesterday, Today, and Tomorrow , 2016, Present and Ulterior Software Engineering.

[19]  Andrew C. Myers,et al.  Flow-Limited Authorization , 2015, 2015 IEEE 28th Computer Security Foundations Symposium.

[20]  Michael D. Ernst,et al.  Collaborative Verification of Information Flow for a High-Assurance App Store , 2014, Software Engineering & Management.

[21]  Deian Stefan,et al.  Hails: Protecting Data Privacy in Untrusted Web Applications , 2012, OSDI.

[22]  Andrei Sabelfeld,et al.  Information-Flow Security for a Core of JavaScript , 2012, 2012 IEEE 25th Computer Security Foundations Symposium.

[23]  Andrew C. Myers,et al.  Sharing Mobile Code Securely with Information Flow Control , 2012, 2012 IEEE Symposium on Security and Privacy.

[24]  Hovav Shacham,et al.  Return-Oriented Programming: Systems, Languages, and Applications , 2012, TSEC.

[25]  Armando Solar-Lezama,et al.  A language for automatically enforcing privacy policies , 2012, POPL '12.

[26]  Benjamin Livshits,et al.  ConScript: Specifying and Enforcing Fine-Grained Security Policies for JavaScript in the Browser , 2010, 2010 IEEE Symposium on Security and Privacy.

[27]  Sorin Lerner,et al.  Staged information flow for javascript , 2009, PLDI '09.

[28]  Silas Boyd-Wickizer,et al.  Securing Distributed Systems with Information Flow Control , 2008, NSDI.

[29]  Hovav Shacham,et al.  The geometry of innocent flesh on the bone: return-into-libc without function calls (on the x86) , 2007, CCS '07.

[30]  Eddie Kohler,et al.  Information flow control for standard OS abstractions , 2007, SOSP.

[31]  Walid Taha,et al.  Gradual Typing for Objects , 2007, ECOOP.

[32]  Eddie Kohler,et al.  Making information flow explicit in HiStar , 2006, OSDI '06.

[33]  Steve Vandebogart,et al.  Labels and event processes in the Asbestos operating system , 2005, TOCS.

[34]  Andrew C. Myers,et al.  End-to-end availability policies and noninterference , 2005, 18th IEEE Computer Security Foundations Workshop (CSFW'05).

[35]  Andrew C. Myers,et al.  Using replication and partitioning to build secure distributed systems , 2003, 2003 Symposium on Security and Privacy, 2003..

[36]  Andrew C. Myers,et al.  Language-based information-flow security , 2003, IEEE J. Sel. Areas Commun..

[37]  Andrew C. Myers,et al.  Secure program partitioning , 2002, TOCS.

[38]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[39]  Andrew C. Myers,et al.  Protecting privacy using the decentralized label model , 2000, Foundations of Intrusion Tolerant Systems, 2003 [Organically Assured and Survivable Information Systems].

[40]  Andrew C. Myers,et al.  Complete, safe information flow with decentralized labels , 1998, Proceedings. 1998 IEEE Symposium on Security and Privacy (Cat. No.98CB36186).

[41]  J. Meseguer,et al.  Security Policies and Security Models , 1982, 1982 IEEE Symposium on Security and Privacy.

[42]  C. A. R. Hoare,et al.  Proof of correctness of data representations , 1972, Acta Informatica.

[43]  Andrew C. Myers,et al.  Securing Smart Contracts with Information Flow , 2020 .

[44]  Thorsten Holz,et al.  ETHBMC: A Bounded Model Checker for Smart Contracts , 2020, USENIX Security Symposium.

[45]  Andrew C. Myers,et al.  Fabric: Building open distributed systems securely by construction , 2017, J. Comput. Secur..

[46]  Daniel Davis Wood,et al.  ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER , 2014 .

[47]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[48]  K. J. Bma Integrity considerations for secure computer systems , 1977 .