FOUNDATIONS of ACCESS CONTROL for SECURE STORAGE a Dissertation Submitted in Partial Satisfaction of the Requirements for the Degree Of
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITY OF CALIFORNIA SANTA CRUZ FOUNDATIONS OF ACCESS CONTROL FOR SECURE STORAGE A dissertation submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in COMPUTER SCIENCE by Avik Chaudhuri December 2008 The Dissertation of Avik Chaudhuri is approved: Professor Mart´ın Abadi, Chair Professor Scott Brandt Professor Cormac Flanagan Professor Luca de Alfaro Dean Lisa Sloan Vice Provost and Dean of Graduate Studies Copyright c by Avik Chaudhuri 2008 Table of Contents Abstract vii Dedication viii Acknowledgments ix 1 Introduction 1 1.1 Access control and secure storage . .3 1.2 A research program . .4 1.3 Some highlights . .4 1.3.1 Security enforcement on operating systems . .5 1.3.2 Automatic analysis of security models . .6 1.3.3 Automated security analysis of storage protocols . .6 1.3.4 Secure distributed sharing of services . .8 1.3.5 Correctness of distributed access-control implementations . .8 1.4 Ideas and techniques . .9 1.4.1 Programming languages . .9 1.4.2 Logic . 11 1.5 Organization . 12 1.5.1 Dependencies . 13 1.5.2 Common themes . 13 I Correctness of Access Control 16 2 Cryptographic access control 18 2.1 Plutus . 20 2.2 Formal model of Plutus . 23 2.2.1 Background on ProVerif . 23 2.2.2 Plutus in ProVerif . 24 iii 2.3 Security results on Plutus . 31 2.3.1 Background on correspondences . 31 2.3.2 Security properties of Plutus . 35 2.3.3 Analysis of some design details . 41 2.3.4 Additional remarks . 44 3 Access control with labels 47 3.1 EON ........................................ 50 3.1.1 Syntax . 51 3.1.2 Semantics . 52 3.1.3 Queries . 53 3.2 Query evaluation . 54 3.2.1 Basic queries, unguarded transitions . 55 3.2.2 Basic queries, guarded transitions . 58 3.2.3 Queries with sequencing . 58 3.2.4 Efficient query evaluation under further assumptions . 59 3.2.5 Tool support and experiments . 61 3.3 Windows Vista in EON ............................. 62 3.3.1 Attacks on integrity . 63 3.3.2 A usage discipline to recover integrity . 64 3.4 Asbestos in EON ................................. 66 3.4.1 Conditional secrecy . 67 3.4.2 Data isolation in a webserver running on Asbestos . 70 II Security via Access Control 76 4 Access control and types for secrecy 78 4.1 A file-system environment . 79 4.1.1 The file system and its clients . 80 4.1.2 Groups . 80 4.2 A typed pi calculus with file-system constructs . 81 4.2.1 Terms and processes . 81 4.2.2 Some examples (preview) . 83 4.2.3 Types . 85 4.2.4 Preliminaries on typechecking . 86 4.2.5 Typing judgments and rules . 86 4.2.6 Type constraints on the file system . 90 4.2.7 The examples, revisited . 91 4.3 Properties of well-typed systems . 93 iv 4.3.1 Type preservation . 93 4.3.2 Secrecy by typing and access control . 94 4.3.3 Integrity consequences . 95 4.3.4 Reasoning under client collusions . 95 5 Dynamic access control and polymorphism 97 5.1 The untyped conc ı{ calculus . 100 5.1.1 Syntax . 100 5.1.2 Semantics . 103 5.2 A type system for enforcing dynamic specifications . 105 5.2.1 Polymorphic types, constraints, and subtyping . 107 5.2.2 Static invariants . 112 5.2.3 Core typing rules . 114 5.3 Properties of well-typed code . 116 6 Access control and types for integrity 118 6.1 Windows Vista’s integrity model . 121 6.1.1 Windows Vista’s security environment . 121 6.1.2 Some attacks . 122 6.2 A calculus for analyzing DFI on Windows Vista . 123 6.2.1 Syntax and informal semantics . 124 6.2.2 Programming examples . 126 6.2.3 An overview of DFI . 128 6.2.4 An operational semantics that tracks explicit flows . 130 6.3 A type system to enforce DFI . 134 6.3.1 Types and effects . 134 6.3.2 Core typing rules . 135 6.3.3 Typing rules for stuck code . 139 6.3.4 Typing rules for untrusted code . 140 6.3.5 Compromise . 141 6.3.6 Typechecking examples . 142 6.4 Properties of typing . 144 III Preserving Security by Correctness 149 7 Distributed access control 151 7.1 Implementing static access policies . 152 7.2 Implementing dynamic access policies . 156 7.2.1 Safety in a special case . 158 v 7.2.2 Safety in the general case . 159 7.2.3 Obstacles to security . 160 7.2.4 Security in a special case . 162 7.2.5 Security in the general case . 163 7.2.6 Some alternatives . 165 7.3 Definitions and proof techniques . 166 7.4 Formal analysis . 169 7.4.1 Models . 169 7.4.2 Proofs . 172 7.4.3 Some examples of security . 175 8 Discussion 177 A Extended models of Plutus 191 B Supplementary material on EON 196 B.1 Satisfiability in Datalog . 196 B.1.1 Computing extensions . 197 B.1.2 Satisfiability of generalized tuples . 198 B.2 Undecidable query evaluation in an extension of EON ........... 199 C Implementing a typed file system in conc ı{ 202 C.1 Type-directed compilation . 202 C.2 Theorems . 212 D Proofs 213 D.1 Correctness of query evaluation in EON ................... 213 D.2 Soundness of the type system for conc ı{ ................... 214 D.3 Soundness of the type system for DFI on Windows Vista . 220 D.4 Correctness of distributed access control implementations . 234 vi Abstract Foundations of Access Control for Secure Storage by Avik Chaudhuri Over the years, formal techniques have played a significant role in the study of secure communication. Unfortunately, secure storage has received far less attention. In partic- ular, the uses and consequences of dynamic access control for security in file systems, operating systems, and other distributed systems are seldom well-understood. In this dissertation, we develop and apply formal techniques to understand the foundations of access control for security in such systems. Our case studies include the security de- signs of some state-of-the-art storage systems and operating systems. Our techniques are derived from ideas in programming languages and logic. To Pops & Mumma. viii Acknowledgments I am very fortunate to have been advised by Mart´ın Abadi in the course of this degree. Mart´ın has been not only a never-ending source of inspiration, but also a remarkably astute coach. I can only hope that his technique, taste, and attitude in research continue to influence my future work. Moreover, I am very grateful to Sriram Rajamani for making possible an intern- ship at Microsoft Research India, around half-way through my degree; and to Bruno Blanchet for making possible a collaboration almost entirely over email, towards the end. Their enthusiasm and persistence in these ventures have been extraordinary. Most of the material in this dissertation is based on collaborative papers; I thank my co-authors, including Mart´ın, Sriram, Bruno, as well as Ganesan Ramalingam, Prasad Naldurg, and Lakshmisubrahmanyam Velaga, for their contributions. Moreover, vari- ous discussions have influenced the presentation of this material; I thank my disserta- tion committee members, including Mart´ın, as well as Scott Brandt, Cormac Flanagan, and Luca de Alfaro, for their suggestions. This work has been supported in part by the National Science Foundation under Grants CCR-0204162, CCR-0208800, and CCF- 0524078, and by Livermore National Laboratory, Los Alamos National Laboratory, and Sandia National Laboratory under Contract B554869. Several others have been part of this endeavor in their own ways. My friends— especially those of the unparalleled “baskin-?” groups—have refreshed me with coffee, parties, and random debates whenever I needed them. My lovely wife, Reema, has taken care of pretty much everything else. Finally, I cannot even begin to describe what I owe to my parents. With all my love, I therefore dedicate this dissertation to them. ix Chapter 1 Introduction Formal techniques have played a significant role in the study of secure communica- tion in recent years. Specifically, there has been much research in developing process calculi, type systems, logics, and other foundations for the rigorous design and analy- sis of secure communication protocols [Abadi and Fournet, 2001; Abadi and Blanchet, 2003; Gordon and Jeffrey, 2003b; Fournet et al., 2005; Burrows et al., 1989; Blanchet, 2001a]. In comparison, the study of secure storage has received far less formal atten- tion. Yet, over the years storage has assumed a pervasive role in modern computing. Now storage is a fundamental part of most computer systems that we rely on—and un- derstanding secure storage is as important as understanding secure communication. One might wonder whether the foundations of secure communication already pro- vide those of secure storage—after all, storage is a form of communication. Indeed, one can think of a file f with content M as a channel f that is ready to send message M; then f may be read and written by receiving and sending messages on f ..