Jason Franklin with Sagar Chaki, Anupam Datta, Jonathan M. McCune, Arvind Seshadri, and Amit Vasudevan 1 Parametric Verification of Address Space Separation.

Slides:



Advertisements
Similar presentations
Functional Decompositions for Hardware Verification With a few speculations on formal methods for embedded systems Ken McMillan.
Advertisements

Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
1 Verification of Infinite State Systems by Compositional Model Checking Ken McMillan Cadence Berkeley Labs.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Translation-Based Compositional Reasoning for Software Systems Fei Xie and James C. Browne Robert P. Kurshan Cadence Design Systems.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by SRC Contract.
1 Specifying and Verifying Hardware Support for Copy and Tamper-Resistant Software David Lie, John Mitchell, Chandramohan Thekkath and Mark Horowitz Computer.
Model Checking : Making Automatic Formal Verification Scale Shaz Qadeer EECS Department University of California at Berkeley.
Dancing with Giants: Wimpy Kernels for On-demand Isolated I/O Presenter: Probir Roy Computer Science Department College of William & Mary.
A Logic of Secure Systems and its Application to Trusted Computing Anupam Datta, Jason Franklin, Deepak Garg, and Dilsun Kaynar Carnegie Mellon University.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
Symmetry-Aware Predicate Abstraction for Shared-Variable Concurrent Programs Alastair Donaldson, Alexander Kaiser, Daniel Kroening, and Thomas Wahl Computer.
May 11, ACL2 Panel: What is the Future of Theorem Proving? Arvind Computer Science & Artificial Intelligence Laboratory.
Scalable Parametric Verification of Secure Systems: How to Verify Reference Monitors without Worrying about Data Structure Size Jason Franklin, Sagar Chaki,
A Proof of Correctness of a Processor Implementing Tomasulo’s Algorithm without a Reorder Buffer Ravi Hosabettu (Univ. of Utah) Ganesh Gopalakrishnan (Univ.
Verification of Hierarchical Cache Coherence Protocols for Future Processors Student: Xiaofang Chen Advisor: Ganesh Gopalakrishnan.
Systems with small trusted computing bases (TCBs) open possibility for automated security verification of systems Example: SecVisor - a 3kLOC security.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
A Type System for Expressive Security Policies David Walker Cornell University.
1 Modeling and Analysis of Networked Secure Systems with Application to Trusted Computing Jason Franklin Joint work with Deepak Garg, Dilsun Kaynar, and.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by SRC Contract.
Towards High-Assurance Hypervisors Jason Franklin Joint with Anupam Datta, Sagar Chaki, Ning Qu, Arvind Seshadri.
Model Checking for Embedded Systems Edmund Clarke, CMU High-Confidence Embedded Systems Workshop, May 1 st.
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 20 October 28, 2004.
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
Programming Models & Runtime Systems Breakout Report MICS PI Meeting, June 27, 2002.
CS6133 Software Specification and Verification
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
G53SEC 1 Reference Monitors Enforcement of Access Control.
C O R P O R A T E T E C H N O L O G Y Information & Communications Security A Formal Security Model of the Infineon SLE88 Smart Card Memory Management.
Page 1 Advanced Technology Center HCSS 03 – April 2003 vFaat: von Neumann Formal Analysis and Annotation Tool David Greve Dr. Matthew Wilding Rockwell.
Writing Systems Software in a Functional Language An Experience Report Iavor Diatchki, Thomas Hallgren, Mark Jones, Rebekah Leslie, Andrew Tolmach.
Page 1 5/2/2007  Kestrel Technology LLC A Tutorial on Abstract Interpretation as the Theoretical Foundation of CodeHawk  Arnaud Venet Kestrel Technology.
Operating Systems Security
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 19 October 26, 2004.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Processes and Virtual Memory
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Finding Security Vulnerabilities in a Network Protocol Using Formal Verification Methods Orna Grumberg Technion, Israel Joint work with Adi Sosnovich and.
IS 2620: Developing Secure Systems Formal Verification/Methods Lecture 9 March 15, 2012.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Presentation Title 2/4/2018 Software Verification using Predicate Abstraction and Iterative Refinement: Part Bug Catching: Automated Program Verification.
SDN Network Updates Minimum updates within a single switch
Formal methods: Lecture
Formal Methods: Model Checkers and Theorem Provers
Opeoluwa Matthews, Jesse Bingham, Daniel Sorin
Types for Programs and Proofs
A Verified DSL for MPC in
IS 2935: Developing Secure Systems
Over-Approximating Boolean Programs with Unbounded Thread Creation
Towards End-to-End Security Analysis of Networked Systems
Verification with Small and Short Worlds Rohit Sinha, Cynthia Sturton, Petros Maniatis, Sanjit A. Seshia, David Wagner Introduction Verification of large.
Carmine Abate Rob Blanco Deepak Garg Cătălin Hrițcu Jérémy Thibault
Presentation transcript:

Jason Franklin with Sagar Chaki, Anupam Datta, Jonathan M. McCune, Arvind Seshadri, and Amit Vasudevan 1 Parametric Verification of Address Space Separation

Outline Definition & Importance Security Kernels How we model adversaries Interfaces Data structure reduction Parametricity Verification of source code Refinement 2

Security Kernels Security kernels utilize protection mechanisms to prevent actions that violate a security policy – OSes, hypervisors and web browsers Uses: cloud computing, online banking, DRM (PS3), malware testing, national security?, etc. Critically important to verify absence of security bugs APP Security Kernel Adversary Security Policy 3

State of the Art in Security Kernel Verification Manual/semi-automated verification – Similar goals, costly and time consuming (requires patience) SRI HDM, InaJo, Gypsy, UCLA, PSOS, [Heitmeyer et al.], seL4 Model checking work for security kernels – Study non-parametric verification [Guttman et al.], [Lie et al.], [Mitchell et al.] Bug finding with adversaries – Unsound or incomplete methods [Kidd et al.], [Emmi et al.], [Bugrara and Aiken] 4

State of the Art in High-Assurance Systems Security-critical components extracted and moved to hypervisor – Reduces system code size and interface < 10k L.O.C. and < 10 system calls – Promising initial step to reduce complexity of verification TRANGO Virtual Processor, Open Kernel Labs OKL4, VirtualLogix’s VLX, SecVisor (CMU), TrustVisor (CMU), and many others Hardware OS App Hypervisor (TCB) App Hardware App OS + TCB App  5

Limitations of State of the Art 6 Limitations Manual verification effort for theorem proving is high Small TCBs alone don’t enable automated formal verification Major source of complexity for model checking is size of data structures Our Goal Overcome limitations by exploiting structure of protection mechanisms

Approach Automatic source-level verification of OS protection mechanisms can be realized by: Parametrically reasoning about protection data structures and Using refinement to carry verification down to source code level 7

Verification Process Verification Model system & property Apply Parametricity to reduce data structure size Source-level Verification Relate abstract models and C code Prove refinement & build refinement checker 8

Scope Protection mechanisms of Xen, TrustVisor, SecVisor Manages protection data structures, performs permission and bounds checks Systems Address separation, W xor X, access control Properties Adversary constrained to system interface Adversary model 9

Outline Security Kernels How we model adversaries InterfacesParametricityRefinement 10

Interface-Constrained Adversary Adversary model = arbitrary number of calls to system call interface with non-deterministic inputs – Reduces complexity of adversary models, eases model checking Kernel A(*) C(*) B(*,*) 11 Kernel Adversary A(w) C(z) B(x,y) Without Interface Abstraction Interface-constrained Adversary

Example * * * Adversary-Controlled eXe Write Authoritative Sync ≡ foreach row do if (Secure) then copy ReadWrite 12 Sys Call Interface Sync(*) Delete(*) Add(*,*) Key Insights: Kernel page table is adversary- controlled data structure Sync copies adversary-controlled data into memory Adversary is constrained to interface I = {Sync(*), Add(*,*), Delete(*)}

Common Examples Remote Adversary Constrained to network interface Malicious Process Constrained to OS system call interface Malicious Web Gadget Constrained to browser interface Malicious Peripheral Constrained to IOMMU interface 13 Adversary

Outline Security KernelsInterfaces Data structure reduction ParametricityRefinement 14

Protection Data Structures RUM W WXKC KD Kernel Page Table UM X WKD KC Shadow Page Table SecVisor Sync ≡ foreach row do if (W XOR X) then Sync RW UM=User Memory KD=Kernel Data KC=Kernel Code 15

Data Structure Size and Verification Complexity Security kernels operate on large data structures – Page tables, memory protection structures, etc. Complexity of automated verification increases exponentially with increase in data structure size Page Table EntriesStatesSpaceTime 355,000 8MB2 sec 41,700,000<256MB360 sec 5--Out of Memory Murphi model checking SecVisor security hypervisor with increasing page table size Goal: automated verification techniques that scale gracefully with increase in data structure size 16

Hierarchical Nesting Registers cr3 PDT pde0 pde1 pde2 PT pte0 pte1 Memory PT pte0 pde3 Multi-level Page Tables Single-level Page Tables PT pte0 pte1 pte2 17

Parametricity of System Data Structures  n 1 shadow_paging_sync ≡ foreach row do if (Row_Check) then modify row; Row independent Row uniform 18

Apps Security Kernel Adversary Small Model Analysis: Modeling Systems and Properties Model kernel and adversaries – Parametric Guarded Command Language (PGCL) Express security properties – Parametric Temporal Specification Logic (PTSL) Policy SYS(n) ADV(n) SK(n) P(n) 19

Language Design Challenges Balancing expressiveness with small model analysis – Conditionals – Whole array ops – Assignment – Parallel and sequential composition – Non-deterministic update Distinctive features – Modeling systems and adversaries: whole array operations – Adversary: Non-deterministic updates foreach row do if (Condition) then Set row = x; Adversary ≡ foreach row do row[0] = *; 20

Parametric Programming Language Language for modeling system & adversary – Finite number of Boolean variables – System parameter: n – Single parametric array: P of size n x q – Parametric loop for i : P[n,q] do E ? C Kernel Entry ≡ ¬ kernelmode ? kernelmode := ⊤ ; for i : Pn,q do Pn,q[i][Write] = T ? Pn,q[i][eXe] := ⊥ ; 21

SecVisor Model Kernel Entry ≡ ¬ kernelmode ? kernelmode := ⊤ ; for i : Pn,q do Pn,q[i][SPTPA] = KC ? Pn,q[i][SPTRW] := ⊥ ; Pn,q[i][SPTX] := ⊤ ; … Sync ≡ ⊤ ? for i : Pn,q do ⊤ ? Pn,q[i][SPTPA] := Pn,q[i][KPTPA] Attacker ≡ ⊤ ? for i : Pn,q do Pn,q[i][KPTPA] := ∗ ; Pn,q[i][KPTRW] := ∗ ; Pn,q[i][KPTX] := ∗ RUM R X WXKC KD Kernel Page Table RUM RW XKC KD Shadow Page Table 22 Sync

Expressive Specification Logic Reachability properties State formulas Universal, existential, and generic 23 Temporal logic specifications Path formulas Subset of ACTL* with USF as atomic propositions Propositions Basic range over Booleans Parametric range over rows of parameterized array Execution Integrity: In kernel mode, only kernel code should be executable. It is stated as follows: Pexec == MODE=KERNEL ⇒ ( ∀ i P[i][eXe] ⇒ (P[i][CodeType] = KC))

Small Model Theorems Relate properties of System(1) to System(n), for all finite n – Sound: If small model is secure then large model is secure – Complete: If small model is insecure then large model is insecure SMT System(n)System(1) Verify Secure! Insecure 24

Small Model Safety Theorem System model – Let gc(k) be any instantiated guarded command (i.e., any well-formed program) Security property – Let  in GSF be any generic state formula Forall i. P(i), Exists i. P(i), or conjunctions of Initial state – Let Init in USF be any universal state formula (For all i. P(i)) Definition: model exhibits  if contains reachable state that satisfies  Theorem: M(gc(k), Init) exhibits  iff M(gc(1), Init) exhibits  Thms with different initial conditions & properties in [Oakland2010] 25

Small Model Analysis Execution Integrity: In kernel mode, only kernel code should be executable. In PTSL: Pexec == MODE=KERNEL ⇒ ( ∀ i. P[i][SPTX] ⇒ (P[i][SPTPA] = KC)) System SecVisor(n) Adversary W xor X SYS(n)ADV(n) RM(n) Initial condition: SecVisor starts in kernel mode and only kernel code is executable In PTSL: Init == MODE=KERNEL ^ ( ∀ i. P[i][SPTX] ⇒ (P[i][SPTPA] = KC)) SMT SecVisor(1) Verify mode = kernel AND FOREACH page in SPT, if eXe then page maps kernel code If mode = kernel then FOREACH page in SPT, if eXe then page maps kernel code 26

Verification Results SecVisor (Shadowvisor, sHype, Xen), adversary, and properties expressible – Small Model Theorems apply Translate to Murphi, verify – Two vulnerabilities, repaired, verified Two more in ShadowVisor Secure Sync ≡ ⊤ ? for i : Pn,q do ( ¬ Pn,q[i][SPTX] ∧ ¬ (Pn,q[i][KPTPA] = KC)) ? Pn,q[i][SPTPA] := Pn,q[i][KPTPA] Sync ≡ ⊤ ? for i : Pn,q do ⊤ ? Pn,q[i][SPTPA] :=Pn,q[i][KPTPA] 27

Extending Parametricity Results page_fault (u32 addr) { pdt = get_pdt(addr); if (pdt is ADDR) { if (pdt < MAX) copy; } else { if (getpde(addr) < MAX) copy; } Complexities and Solutions Multiple, linked, parametric arrays Extended PGCL to handle multiple parametric arrays Added nested quantifiers to PTSL New small model theorems 28

Related Work Parametric verification for correctness – Missing whole array operators (adversary) or less efficient [Lazic et al.] and [Emerson and Kahlon] – Incomplete methods (environment abstraction) [Clarke et al.] and [Talupur et al.] Parametric verification for security – Focus on security protocols [Lowe et al.], [Roscoe and Broadfoot], [Durgin et al.], [Millen] 29

Outline Security KernelsInterfacesParametricity Verification of source code Refinement 30

Towards Source Level Verification C code page_fault (u32 addr) { pdt = get_pdt(addr); if (pdt.ADDR) { if (pdt < MAX) copy; } else { if (getpde(addr) < MAX) copy; } Guarded Command Representation page_fault ≡ pdt.ADDR && pdt < MAX ? Pn,k[i][ADDR] := Pn,k[i][ADDR]; !pdf.ADDR && pde(pdt) < MAX ? Pn,k[i][ADDR] := Pn,k[i][ADDR]; 1. Convert Language containment  refinement Convert C code to guarded commands (GC) Check language containment to prove GC is in PGCL Yes, results apply. No, modify or results do not apply Check language containment Refinement Theorem

Verification 1. Model system & property Apply Parametricity to reduce data structure size 2. Source-level Verification Relate abstract models and C code Prove refinement & build refinement checker Adversary abstraction to identify security- relevant code Prove soundness & build abstractor 32 Complete In Progress

Expressiveness and Limitations PGCL/PTSL can model: – Protection mechanisms that are row independent and row uniform – Policies that are expressible as FSA over rows (safety properties) Developed compilation to convert FSA policy to PGCL reference monitor 33

Assumptions and/or Limitations Verification – Applies to row-uniform, hierarchical-row independent systems (expressible in PGCL) – Properties expressible in large subset of ACTL*/X – Currently at model level and some source-level guarantees – Assumptions about semantics of C, correctness of model checker, translation tools, and of proofs Validation – Security properties might not be right properties or strong enough – Adversary model may not match reality 34

Related Work Model checking for security – Study non-parametric verification of secure systems [Guttman et al.], [Lie et al.], [Mitchell et al.] Bug finding with adversaries – Unsound or incomplete methods [Kidd et al.], [Emmi et al.] Operating system verification – Manual/semi-automated verification [Walker et al.], [Heitmeyer et al.], [Klein et al.] 35

Conclusions Towards scalable automated source-level verification of protection mechanisms – Adversary abstraction reduces model complexity – Parametric reasoning reduces data complexity Small model theorems relate small/large models Application to SecVisor, sHype, Shadowvisor, & Xen – Refinement theorem pushes guarantees to source Outlined path to source level verification – Building models is time-consuming, costly, and error- prone – In progress, proof of refinement theorem 36 Questions? More