a sound type system for secure flow analysis
play

A Sound Type System for Secure Flow Analysis Dennis Volpano, - PowerPoint PPT Presentation

A Sound Type System for Secure Flow Analysis Dennis Volpano, Geoffrey Smith, Cynthia Irvine Presenter: Lantian Zheng CS 711 September 29, 2003 Soundness of Denings Program Certification Mechanism Define the soundness property: S ( P )


  1. A Sound Type System for Secure Flow Analysis Dennis Volpano, Geoffrey Smith, Cynthia Irvine Presenter: Lantian Zheng CS 711 September 29, 2003

  2. Soundness of Dening’s Program Certification Mechanism • Define the soundness property: S ( P ) . – Noninterference • Prove: certified ( P ) ⇒ S ( P ) . CS 711: Language-Based Security and Information Flow 1

  3. Program Certification as Type Checking v := e is certified if e → v . v := e is welltyped if type ( e ) ≤ type ( v ) . CS 711: Language-Based Security and Information Flow 2

  4. Program Certification as Type Checking v := e is certified if e → v . v := e is welltyped if type ( e ) ≤ type ( v ) . • Security levels ≈ Types • Lattice order on security levels ≈ Subtyping • Program certification ≈ Type checking CS 711: Language-Based Security and Information Flow 2

  5. Program Certification as Type Checking v := e is certified if e → v . v := e is welltyped if type ( e ) ≤ type ( v ) . • Security levels ≈ Types • Lattice order on security levels ≈ Subtyping • Program certification ≈ Type checking welltyped ( P ) ⇒ noninterference ( P ) CS 711: Language-Based Security and Information Flow 2

  6. Background • Greece and Rome – Program certification (76, Denings) – Noninterference (82, Goguen & Meseguer) • Middle ages – The orange book (85) – More on security models ∗ Nondeducibility (86 Sutherland) ∗ Composibility of noninterference (87-88 McCullough) – Soundness of dynamic information-flow control ∗ Proving noninterference using traces (92 McLean) CS 711: Language-Based Security and Information Flow 3

  7. – Connect static and dynamic information-flow mechanisms ∗ The operational semantics with labels is consistent with the abstract semantics on labels. (92 Mizuno&Schmidt, 95 Ørbæk) • Renaissance – Soundness of compile-time analysis w.r.t. noninterference (94 Ban ˆ a tre&M ´ e tayer&Beaulieu) “ ∀ S, P. if ⊢ 1 { Init } S { P } then C ( P, S ) ” CS 711: Language-Based Security and Information Flow 4

  8. The Core Language Phrases ::= e | c p x | l | n | e + e ′ | e − e ′ | Expressions ::= e e = e ′ | e < e ′ e := e ′ | c ; c ′ | if e then c else c ′ | Commands ::= c while e do c | letvar x := e in c Security classes ∈ (partially ordered by ≤ ) s SC Types ::= τ s Phrase types ::= τ | τ var | τ cmd ρ CS 711: Language-Based Security and Information Flow 5

  9. Typing Assertion λ ; γ ⊢ p : ρ � ❅ � ❅ � ❅ � ❅ � ❅ ✠ � ❅ ❘ Heap: map l to ρ l Stack: map x to ρ x • τ cmd : if λ ; γ ⊢ c : τ cmd , then for any l assigned to in c , τ ≤ λ ( l ) . (Lemma 6.4) • τ var : a variable that can store values with type τ . CS 711: Language-Based Security and Information Flow 6

  10. Noninterference Theorem Theorem 6.8 ( Type Soundness ) Suppose (a) λ ⊢ c : ρ c is well-typed CS 711: Language-Based Security and Information Flow 7

  11. Noninterference Theorem Theorem 6.8 ( Type Soundness ) Suppose (a) λ ⊢ c : ρ c is well-typed (b) µ ⊢ c ⇒ µ ′ execution one CS 711: Language-Based Security and Information Flow 7

  12. Noninterference Theorem Theorem 6.8 ( Type Soundness ) Suppose (a) λ ⊢ c : ρ c is well-typed (b) µ ⊢ c ⇒ µ ′ execution one (c) υ ⊢ c ⇒ υ ′ execution two CS 711: Language-Based Security and Information Flow 7

  13. Noninterference Theorem Theorem 6.8 ( Type Soundness ) Suppose (a) λ ⊢ c : ρ c is well-typed (b) µ ⊢ c ⇒ µ ′ execution one (c) υ ⊢ c ⇒ υ ′ execution two (d) dom ( µ ) = dom ( υ ) = dom ( λ ) (e) υ ( l ) = µ ( l ) for all l such that λ ( l ) ≤ τ the same low inputs CS 711: Language-Based Security and Information Flow 7

  14. Noninterference Theorem Theorem 6.8 ( Type Soundness ) Suppose (a) λ ⊢ c : ρ c is well-typed (b) µ ⊢ c ⇒ µ ′ execution one (c) υ ⊢ c ⇒ υ ′ execution two (d) dom ( µ ) = dom ( υ ) = dom ( λ ) (e) υ ( l ) = µ ( l ) for all l such that λ ( l ) ≤ τ the same low inputs Then υ ′ ( l ) = µ ′ ( l ) for all l such that λ ( l ) ≤ τ . the same low outputs CS 711: Language-Based Security and Information Flow 7

  15. Typing Arithmetic Operations λ ; γ ⊢ e ′ : τ λ ; γ ⊢ e : τ λ ; γ ⊢ e + e ′ : τ • Example: x : L, y : H ⊢ x : H x : L, y : H ⊢ y : H x : L, y : H ⊢ x + y : H • Subsumption rule: λ ; γ ⊢ e : τ ⊢ τ ⊆ τ ′ λ ; γ ⊢ e : τ ′ • Lemma 6.3: if λ ⊢ e : τ , then for every l in e , λ ( l ) ≤ τ . CS 711: Language-Based Security and Information Flow 8

  16. Subtyping Rules τ ≤ τ ′ ⊢ τ ⊆ τ ′ ⊢ τ ′ cmd ⊆ τ cmd ⊢ τ ⊆ τ ′ ⊢ ρ ′ ⊆ ρ ′′ ⊢ ρ ⊆ ρ ′ ⊢ ρ ′ ⊆ ρ ′′ ⊢ ρ ⊆ ρ Corollary: τ var is invariant with respect to τ . τ = τ ′ ⊢ τ var ⊆ τ ′ var CS 711: Language-Based Security and Information Flow 9

  17. Typing Assignments λ ; γ ⊢ e ′ : τ λ ; γ ⊢ e : τ var λ ; γ ⊢ e := e ′ : τ cmd • The result of e ′ can be stored in e . • The assignment command updates a location with type τ . • Lemma 6.4: If λ ; γ ⊢ c : τ cmd , then for every l assigned to in c , v ( l ) ≤ τ . CS 711: Language-Based Security and Information Flow 10

  18. Typing Compositions λ ; γ ⊢ c ′ : τ cmd λ ; γ ⊢ c : τ cmd λ ; γ ⊢ c ; c ′ : τ cmd • The subsumption rule masks the combination of two command types: λ ; γ ⊢ c ′ : τ ′ cmd λ ; γ ⊢ c : τ cmd λ ; γ ⊢ c ; c ′ : τ ⊓ τ ′ cmd CS 711: Language-Based Security and Information Flow 11

  19. Typing IF and WHILE λ ; γ ⊢ c ′ : τ λ ; γ ⊢ e : τ λ ; γ ⊢ c : τ cmd λ ; γ ⊢ if e then c else c ′ : τ cmd λ ; γ ⊢ e : τ λ ; γ ⊢ c : τ cmd λ ; γ ⊢ while e do c : τ cmd • To prevent implicit flows: c and c ′ can any update location l that satisfies type ( e ) ≤ λ ( l ) . CS 711: Language-Based Security and Information Flow 12

  20. Typing LETVAR λ ; γ [ x : τ var ] ⊢ c : τ ′ cmd λ ; γ ⊢ e : τ λ ; γ ⊢ letvar x := e in c : τ ′ cmd • The local variable x is not observable outside the command. • Similar to the function application: ( λx.c ) e . CS 711: Language-Based Security and Information Flow 13

  21. Proving the Noninterference Theorem • By induction on one of the two evaluations µ ⊢ c ⇒ µ ′ . • The core language is pleasantly simple. – No first-class functions: the two executions run the same code. • Syntax-directed typing rules CS 711: Language-Based Security and Information Flow 14

  22. After 1996 SLam Heintze&Riecke (98) Induction on typing derivation, denotational semantics The secure CPS Zdancewic&Myers Induction on evaluation, small- calculus (01) step semantics MLIF Pottier&Simonet (02) Induction on evalution, small- step semantics for pairing two executions Java-light Banerjee&Naumann Induction on typing derivation, (02) dentational semantics CS 711: Language-Based Security and Information Flow 15

  23. Discussion • “How should secrets be introduced?” – Safety Versus Secrecy , Dennis Volpano, 99 “Instead, we associate secrecy with the origin of a value which in our case will be the free variables of a program. ... This origin- view of secrecy differs from the view held by others working with assorted lambda calculi and type system for secrecy [1,3]. There secrecy is associated with values like boolean constants. It does not seem sensible to attribute any level of security to such constants. After all, what exacly is high-security boolean?” CS 711: Language-Based Security and Information Flow 16

  24. • Is information-flow policy EM-enforceable? – Suppose the operational semantics manipulates security labels and does run-time label checking. CS 711: Language-Based Security and Information Flow 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend