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

a sound type system for secure flow analysis
SMART_READER_LITE
LIVE PREVIEW

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 )


slide-1
SLIDE 1

A Sound Type System for Secure Flow Analysis

Dennis Volpano, Geoffrey Smith, Cynthia Irvine Presenter: Lantian Zheng CS 711 September 29, 2003

slide-2
SLIDE 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

slide-3
SLIDE 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

slide-4
SLIDE 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

slide-5
SLIDE 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

slide-6
SLIDE 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

slide-7
SLIDE 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ˆ atre&M´ etayer&Beaulieu) “ ∀S, P. if ⊢1 {Init}S{P} then C(P, S) ”

CS 711: Language-Based Security and Information Flow 4

slide-8
SLIDE 8

The Core Language

Phrases p ::= e | c Expressions e ::= x | l | n | e + e′ | e − e′ | e = e′ | e < e′ Commands c ::= e := e′ | c; c′ | if e then c else c′ | while e do c | letvar x := e in c Security classes s ∈ SC (partially ordered by ≤) Types τ ::= s Phrase types ρ ::= τ | τ var | τ cmd

CS 711: Language-Based Security and Information Flow 5

slide-9
SLIDE 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

slide-10
SLIDE 10

Noninterference Theorem

Theorem 6.8 (Type Soundness) Suppose (a) λ ⊢ c : ρ c is well-typed

CS 711: Language-Based Security and Information Flow 7

slide-11
SLIDE 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

slide-12
SLIDE 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

slide-13
SLIDE 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

slide-14
SLIDE 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

slide-15
SLIDE 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

slide-16
SLIDE 16

Subtyping Rules

τ ≤ τ ′ ⊢ τ ⊆ τ ′ ⊢ τ ⊆ τ ′ ⊢ τ ′ cmd ⊆ τ cmd ⊢ ρ ⊆ ρ ⊢ ρ ⊆ ρ′ ⊢ ρ′ ⊆ ρ′′ ⊢ ρ′ ⊆ ρ′′ Corollary: τ var is invariant with respect to τ. τ = τ ′ ⊢ τ var ⊆ τ ′ var

CS 711: Language-Based Security and Information Flow 9

slide-17
SLIDE 17

Typing Assignments

λ ; γ ⊢ e : τ var λ ; γ ⊢ e′ : τ λ ; γ ⊢ 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

slide-18
SLIDE 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

slide-19
SLIDE 19

Typing IF and WHILE

λ ; γ ⊢ e : τ λ ; γ ⊢ c : τ cmd λ ; γ ⊢ c′ : τ λ ; γ ⊢ 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

slide-20
SLIDE 20

Typing LETVAR

λ ; γ ⊢ e : τ λ ; γ[x:τ var] ⊢ c : τ ′ cmd λ ; γ ⊢ 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

slide-21
SLIDE 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

slide-22
SLIDE 22

After 1996

SLam Heintze&Riecke (98) Induction on typing derivation, denotational semantics The secure CPS calculus Zdancewic&Myers (01) Induction on evaluation, small- step semantics MLIF Pottier&Simonet (02) Induction on evalution, small- step semantics for pairing two executions Java-light Banerjee&Naumann (02) Induction on typing derivation, dentational semantics

CS 711: Language-Based Security and Information Flow 15

slide-23
SLIDE 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

  • ur 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

slide-24
SLIDE 24
  • Is information-flow policy EM-enforceable?

– Suppose the

  • perational

semantics manipulates security labels and does run-time label checking.

CS 711: Language-Based Security and Information Flow 17