Fully abstract compilation via universal embedding

A fully abstract compiler guarantees that two source components are observationally equivalent in the source language if and only if their translations are observationally equivalent in the target. Full abstraction implies the translation is secure: target-language attackers can make no more observations of a compiled component than a source-language attacker interacting with the original source component. Proving full abstraction for realistic compilers is challenging because realistic target languages contain features (such as control effects) unavailable in the source, while proofs of full abstraction require showing that every target context to which a compiled component may be linked can be back-translated to a behaviorally equivalent source context. We prove the first full abstraction result for a translation whose target language contains exceptions, but the source does not. Our translation---specifically, closure conversion of simply typed λ-calculus with recursive types---uses types at the target level to ensure that a compiled component is never linked with attackers that have more distinguishing power than source-level attackers. We present a new back-translation technique based on a shallow embedding of the target language into the source language at a dynamic type. Then boundaries are inserted that mediate terms between the untyped embedding and the strongly-typed source. This technique allows back-translating non-terminating programs, target features that are untypeable in the source, and well-bracketed effects.

[1]  Dawn Xiaodong Song,et al.  The Correctness-Security Gap in Compiler Optimization , 2015, 2015 IEEE Security and Privacy Workshops.

[2]  Jean-Louis Krivine,et al.  Classical Logic, Storage Operators and Second-Order lambda-Calculus , 1994, Ann. Pure Appl. Log..

[3]  Lars Birkedal,et al.  The impact of higher-order state and control effects on local relational reasoning , 2012, J. Funct. Program..

[4]  Neal Glew Object Closure Conversion , 1999, Electron. Notes Theor. Comput. Sci..

[5]  Robert Bruce Findler,et al.  Operational semantics for multi-language programs , 2007, POPL '07.

[6]  Amal Ahmed,et al.  Verifying an Open Compiler Using Multi-language Semantics , 2014, ESOP.

[7]  Alan Jeffrey,et al.  A fully abstract semantics for a concurrent functional language with monadic types , 1995, Proceedings of Tenth Annual IEEE Symposium on Logic in Computer Science.

[8]  Marco Patrignani,et al.  Secure Compilation of Object-Oriented Components to Protected Module Architectures , 2013, APLAS.

[9]  Nick Benton,et al.  Under Consideration for Publication in J. Functional Programming Embedded Interpreters , 2022 .

[10]  Marco Patrignani,et al.  Secure Compilation to Protected Module Architectures , 2015, TOPL.

[11]  Peng Wang,et al.  Compiler verification meets cross-language linking via data abstraction , 2014, OOPSLA.

[12]  Jon G. Riecke,et al.  Fully abstract translations between functional languages , 1991, POPL '91.

[13]  Matthias Blume,et al.  Typed closure conversion preserves observational equivalence , 2008, ICFP.

[14]  C.-H. Luke Ong,et al.  Fully abstract semantics of additive aspects by translation , 2007, AOSD.

[15]  Dana S. Scott,et al.  Data Types as Lattices , 1976, SIAM J. Comput..

[16]  Juan Chen,et al.  Fully abstract compilation to JavaScript , 2013, POPL.

[17]  Amal Ahmed Verified Compilers for a Multi-Language World , 2015, SNAPL.

[18]  Julian Rathke,et al.  Local Memory via Layout Randomization , 2011, 2011 IEEE 24th Computer Security Foundations Symposium.

[19]  Max S. New,et al.  Fully Abstract Compilation via Universal Embedding ( Technical Appendix ) , 2016 .

[20]  Andrew W. Appel,et al.  Compositional CompCert , 2015, POPL.

[21]  Robert Harper,et al.  Typed closure conversion , 1996, POPL '96.

[22]  Dominique Devriese,et al.  Fully-abstract compilation by approximate back-translation , 2016, POPL.

[23]  Albert R. Meyer,et al.  Continuations may be unreasonable , 1988, LISP and Functional Programming.

[24]  Atsushi Igarashi,et al.  Proving Noninterference by a Fully Complete Translation to the Simply Typed Lambda-Calculus , 2006, Log. Methods Comput. Sci..

[25]  Steve Zdancewic,et al.  Translating dependency into parametricity , 2004, ICFP '04.

[26]  Chung-Kil Hur,et al.  Pilsner: a compositionally verified compiler for a higher-order imperative language , 2015, ICFP.

[27]  Andrew Kennedy Securing the .NET programming model , 2006, Theor. Comput. Sci..

[28]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[29]  Amal Ahmed,et al.  Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types , 2006, ESOP.

[30]  Norman Ramsey,et al.  Embedding an interpreted language using higher-order functions and types , 2003, IVME '03.

[31]  Frank Piessens,et al.  Secure Compilation to Modern Processors , 2012, 2012 IEEE 25th Computer Security Foundations Symposium.

[32]  Matthias Blume,et al.  An equivalence-preserving CPS translation via multi-language semantics , 2011, ICFP '11.

[33]  Nick Benton,et al.  Compiling standard ML to Java bytecodes , 1998, ICFP '98.

[34]  Martín Abadi,et al.  Protection in Programming-Language Translations , 1998, ICALP.

[35]  Martín Abadi,et al.  On Protection by Layout Randomization , 2010, 2010 23rd IEEE Computer Security Foundations Symposium.

[36]  I. Stark,et al.  Operational reasoning for functions with local state , 1999 .

[37]  Amal Ahmed,et al.  Noninterference for free , 2015, ICFP.

[38]  John Longley,et al.  Universal Types and What They are Good For , 2003 .

[39]  Jeehoon Kang,et al.  Lightweight verification of separate compilation , 2016, POPL.