Synopsis Motivation Synchronous reactive model Syntax of CRL (Core - - PowerPoint PPT Presentation

synopsis
SMART_READER_LITE
LIVE PREVIEW

Synopsis Motivation Synchronous reactive model Syntax of CRL (Core - - PowerPoint PPT Presentation

Secure information flow for synchronous reactive programs Ilaria Castellani INRIA Sophia Antipolis OPCT Workshop Bertinoro, 18-21 June, 2014 [Based on TGC13 talk, joint work with Pejman Attar] 1 Synopsis Motivation


slide-1
SLIDE 1

Secure information flow

for synchronous reactive programs

Ilaria Castellani

OPCT Workshop Bertinoro, 18-21 June, 2014

INRIA Sophia Antipolis [Based on TGC’13 talk, joint work with Pejman Attar]

slide-2
SLIDE 2

Synopsis

  • Motivation
  • Synchronous reactive model
  • Syntax of CRL (Core Reactive Language)
  • Semantics of CRL and properties
  • Fine-grained and coarse-grained bisimilarity
  • Secure information flow: f-grained and c-grained

reactive noninterference (RNI)

  • Security type system
  • Related work and open questions

1

slide-3
SLIDE 3
  • > Goal: ensure secure information flow

(end-to-end protection of data confidentiality) in reactive systems

Current systems (e.g., web browsers) are often reactive: they listen and react to the environment by means of events

Problem and motivation

Mutually distrusting parties need confidentiality guarantees for their data

2

slide-4
SLIDE 4

Synchronous areas within a GALS architecture (GALS = Globally Asynchronous, Locally Synchronous).

Synchronous Reactive Model

clock1 clock2

synchronous area

clock3

GALS Model

  • async. migration

events

clock4

3

async. interaction

slide-5
SLIDE 5

Reactive variant of ESTEREL [Berry et al., mid 80’ s]:

Synchronous Languages

Cooperative parallelism + broadcast events instant = period of time during which all threads compute up to termination or suspension (suspension = control yield or waiting for an event)

4

  • > SL (Synchronous Language) [Boussinot, 1996]

Delayed reaction to absence of events => no causality cycles, monotonic computations

slide-6
SLIDE 6

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

Priority to the left

slide-7
SLIDE 7

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

E = ∅

Programs are executed in an event environment E

slide-8
SLIDE 8

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

suspension

E = {ev1}

s1 executes first, generating ev1

slide-9
SLIDE 9

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2 ev2

suspension

E = {ev1, ev2}

s1

gets the control suspends, s2 and generates ev2

slide-10
SLIDE 10

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2 ev2

suspension

E = {ev1, ev2}

s1

and gets back the control unblocks

slide-11
SLIDE 11

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2 ev2

suspension

E = {ev1, ev2}

s1

gets the control suspends again, s2

slide-12
SLIDE 12

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2 ev2

suspension

E = {ev1, ev2}

s1

gets the control are suspended,

s2

both and

s3

slide-13
SLIDE 13

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2 ev2

ev4

suspension termination

E = {ev1, ev2, ev4}

executes till termination, generating

s3

ev4

slide-14
SLIDE 14

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2 ev2

ev4

suspension termination

E = {ev1, ev2, ev4}

the control goes back to s2

slide-15
SLIDE 15

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2

ev3

ev2

ev4

suspension

s1

the control goes back to

E = {ev1, ev2, ev3, ev4}

slide-16
SLIDE 16

Synchronous parallelism

Asymmetric parallel operator s ∤ s′

5

s1 ∤ s2 ∤ s3

ev1

ev2

ev3

ev2

ev4

suspension termination

E = {ev1, ev2, ev3, ev4}

slide-17
SLIDE 17

Asymmetric parallel operator s ∤ s′

5

termination suspension

s1 ∤ s2 ∤ s3

ev1

ev2

ev3

ev2

ev4 Synchronisation barrier

End of instant

E = {ev1, ev2, ev3, ev4}

slide-18
SLIDE 18

6

Syntax of CRL

Expressions Programs

exp ::= v | x | f(−

→ exp)

s ::= nothing | (if exp then s else s) | s; s | (s ∤ s) | cooperate | generate ev | await ev | do s watching ev | (loop s) | (repeat exp do s)

slide-19
SLIDE 19

7

Syntax of CRL

Expressions Programs

exp ::= v | x | f(−

→ exp)

s ::= nothing | (if exp then s else s) | s; s | (s ∤ s) | cooperate | generate ev | await ev | do s watching ev | (loop s) | (repeat exp do s)

slide-20
SLIDE 20

8

Reactive constructs

s1 = generate ev1; await ev2; cooperate; generate ev3

s2 = await ev1; generate ev2; await ev3; E = ∅

slide-21
SLIDE 21

8

ev1 s2 = await ev1; generate ev2; await ev3; s1 = generate ev1; await ev2; cooperate; generate ev3 E = {ev1}

Reactive constructs

slide-22
SLIDE 22

8

ev1 s1 = generate ev1; await ev2; cooperate; generate ev3 E = {ev1} s2 = await ev1; generate ev2; await ev3;

Reactive constructs

slide-23
SLIDE 23

8

ev1 ev2 s1 = generate ev1; await ev2; cooperate; generate ev3 s2 = await ev1; generate ev2; await ev3; E = {ev1, ev2}

Reactive constructs

slide-24
SLIDE 24

8

ev1 ev2 s1 = generate ev1; await ev2; cooperate; generate ev3 s2 = await ev1; generate ev2; await ev3; E = {ev1, ev2}

Reactive constructs

slide-25
SLIDE 25

8

ev1 ev2 s1 = generate ev1; await ev2; cooperate; generate ev3 s2 = await ev1; generate ev2; await ev3;

Synchronisation barrier

E = {ev1, ev2}

End of instant

slide-26
SLIDE 26

8

ev1 ev2 s2 = await ev1; generate ev2; await ev3;

Synchronisation barrier

s1 = generate ev1; await ev2; cooperate; generate ev3

reconditioning

Reconditioning

slide-27
SLIDE 27

8

Instant passing

ev1 ev2 s2 = await ev1; generate ev2; await ev3;

next instant

E = ∅ s1 = generate ev1; await ev2; generate ev3

slide-28
SLIDE 28

9

ev1 ev2

ev3

s2 = await ev1; generate ev2; await ev3; E = {ev3} s1 = generate ev1; await ev2; generate ev3

next instant

Next instant

slide-29
SLIDE 29

9

ev1 ev2

ev3

s2 = await ev1; generate ev2; await ev3; E = {ev3} s1 = generate ev1; await ev2; generate ev3

next instant

Next instant

slide-30
SLIDE 30

9

Termination

ev1 ev2

ev3

s2 = await ev1; generate ev2; await ev3;

Synchronisation barrier

s1 = generate ev1; await ev2; generate ev3 E = {ev3}

next instant

slide-31
SLIDE 31

10

s3 = await ev2; generate ev4 s2 = await ev1; generate ev2 await ev3; ev1 ev2

ev3

ev2

ev4

Time out

s′

1

= do s1 watching ev4

slide-32
SLIDE 32

10

ev1 ev2

ev3

ev2

ev4 s′

3 = nothing

s′

2 = await ev3

Time out

s′′

1 = do ( cooperate;

generate ev3 ) watching ev4

E = {ev1, ev2, ev4}

slide-33
SLIDE 33

11

ev1 ev2

ev2

ev4 s′

3 = nothing

s′

2 = await ev3

s′′′

1

= nothing

E = ∅

next instant

Reconditioning

slide-34
SLIDE 34

12

Syntax of CRL

Expressions Programs

s ::= nothing | (if exp then s else s) | s; s | (s ∤ s) | cooperate | generate ev | await ev | do s watching ev | (loop s) | (repeat exp do s)

exp ::= v | x | f(−

→ exp)

slide-35
SLIDE 35

13

Semantics of CRL

E ⊆ Events Event environment s, E → s′, E′ Small-step transition relation: s, E ֒ → [s]E, ∅ Tick transition relation:

slide-36
SLIDE 36

14

Semantics: suspension

s1, E‡ s1; s2, E‡ (seqs) s1, E ‡ s2, E‡ s1 ∤ s2, E‡ (pars) s, E‡ do s watching ev, E‡ (watchs) cooperate, E‡ (coop) ev / ∈ E await ev, E‡ (waits) s, E‡ Suspension predicate s is suspended in E. :

slide-37
SLIDE 37

Program reconditioning

[cooperate]E = nothing [await ev]E = await ev [s1; s2]E = [s1]E ; s2 [s1 ∤ s2]E = [s1]E ∤ [s2]E

[do s watching ev]E =

  • nothing

if ev ∈ E do [s]E watching ev

  • therwise

Function :

[s]E

erases guarding cooperate, kills “timed-out” watching.

15

slide-38
SLIDE 38

Program reconditioning

[cooperate]E = nothing [await ev]E = await ev [s1; s2]E = [s1]E ; s2 [s1 ∤ s2]E = [s1]E ∤ [s2]E

[do s watching ev]E =

  • nothing

if ev ∈ E do [s]E watching ev

  • therwise

Function :

[s]E

erases guarding cooperate, kills “timed-out” watching.

Tick transition relation:

s, E‡ s, E ֒ → [s]E, ∅ (tick)

15

slide-39
SLIDE 39

16

Semantics: reactive operators

s, E → s′, E′ do s watching ev, E → do s′ watching ev, E′ (watch1) do nothing watching ev, E → nothing, E (watch2)

generate ev, E → nothing, E ∪ {ev} (gen) ev ∈ E await ev, E → nothing, E (wait)

slide-40
SLIDE 40

17

Semantics: sequence & parallel

s1, E → s′

1, E′

s1; s2, E → s′

1; s2, E′

(seq1) nothing ; s, E → s, E (seq2)

s1, E → s′

1, E′

s1 ∤ s2, E → s′

1 ∤ s2, E′

(par1) nothing ∤ s, E → s, E (par2) s1, E‡ s2, E → s′

2, E′

s1 ∤ s2, E → s1 ∤ s′

2, E′

(par3) s, E‡ s ∤ nothing, E → s, E (par4)

slide-41
SLIDE 41

18

Semantics: loop/repeat

exp n repeat exp do s, E → s; . . . ; s

n times

, E (repeat) loop s, E → (s ∤ cooperate); loop s, E (loop)

slide-42
SLIDE 42

19

Semantics: conditional

exp tt if exp then s1 else s2, E → s1, E (if1) exp ff if exp then s1 else s2, E → s2, E (if2)

slide-43
SLIDE 43

Semantics: first properties

Event persistence

s, E → s′, E′ ⇒ E ⊆ E′

Determinism

s = nothing ⇒ either s, E ‡ or ∃ ! s′, E′ . s, E → s′, E′

20

slide-44
SLIDE 44

Semantics: first properties

Event persistence

s, E → s′, E′ ⇒ E ⊆ E′

Determinism

s = nothing ⇒ either s, E ‡ or ∃ ! s′, E′ . s, E → s′, E′

20

( because ∤ is deterministic )

( because E is only changed by generate ev )

slide-45
SLIDE 45

21

Convergence relations

Immediate convergence Instantaneous convergence Instantaneous termination

s, E ‡

  • ⇔ s, E ‡ ∨ s = nothing

s, E ⇓ s′, E′ if s, E ⇒ s′, E′ ∧ s′, E′ ‡

  • s, E ⇓

if ∃s′, E′ . s, E ⇓ s′, E′ s, E − ⇓ E′ if s, E ⇓ nothing, E′ s, E − ⇓ if ∃ E′ . s, E − ⇓ E′

⇒ =def →∗ ( )

slide-46
SLIDE 46

21

Convergence relations/predicates

Immediate convergence Instantaneous convergence Instantaneous termination

s, E ‡

  • ⇔ s, E ‡ ∨ s = nothing

s, E ⇓ s′, E′ if s, E ⇒ s′, E′ ∧ s′, E′ ‡

  • s, E ⇓

if ∃s′, E′ . s, E ⇓ s′, E′ s, E − ⇓ E′ if s, E ⇓ nothing, E′ s, E − ⇓ if ∃ E′ . s, E − ⇓ E′

slide-47
SLIDE 47

22

Semantics: more properties

Reactivity (bounded by the size)

Size reduction within an instant

( s, E → s′, E′ ⇒ size(s′) < size(s) )

Instantaneous size: size(s)

∀s, ∀E ( ∃ n ≤ size(s) . s, E ⇓n )

instantaneous convergence in n steps

slide-48
SLIDE 48

23

Semantics: more properties

Monotonicity Monotonicity of terminating computations

s, E − ⇓n E′ ⇒ ∀ ˆ E ⊃ E ∃ ˆ E′ ⊇ E′ s, ˆ E − ⇓n ˆ E′ s, E ⇓ E′ ⇒ ∀ ˆ E ⊃ E ∃ ˆ E′ ⊇ E′ . s, ˆ E ⇓ ˆ E′

slide-49
SLIDE 49

24

Bisimilarities

Two bisimulation equivalences of different granularity:

Fine-grained bisimulation: based on s, E → s′, E′ Coarse-grained bisimulation: based on s, E ⇓ s′, E′

  • > The observer is a thread
  • > The observer is the environment
slide-50
SLIDE 50

25

Fine-grained bisimilarity

A symmetric R is a fg-bisimulation if s1 R s2 implies, for any E ∈ Events: 1) s1, E → s′

1, E′

⇒ s2, E ⇒ s′

2, E′ ∧ s′ 1 R s′ 2

2) s1, E ‡ ⇒ s2, E ⇓ s′

2, E ∧

s1E R s′

2E

fg-bisimilarity : s1≈ fgs2 if s1 R s2 for some fg-bisimulation R.

sE

def

=

  • [s]E

if s, E‡ s

  • therwise

Notation

reconditioning extended to non-suspended programs

slide-51
SLIDE 51

25

Fine-grained bisimilarity

Fine-grained bisimilarity is time-insensitive (weak) and termination insensitive:

(nothing ; generate ev) ≈ fg generate ev nothing ≈ fg cooperate ≈ fg loop nothing

A symmetric R is a fg-bisimulation if s1 R s2 implies, for any E ∈ Events: 1) s1, E → s′

1, E′

⇒ s2, E ⇒ s′

2, E′ ∧ s′ 1 R s′ 2

2) s1, E ‡ ⇒ s2, E ⇓ s′

2, E ∧

s1E R s′

2E

fg-bisimilarity : s1≈ fgs2 if s1 R s2 for some fg-bisimulation R.

slide-52
SLIDE 52

25

Fine-grained bisimilarity

Fine-grained bisimilarity does not preserve tick transitions:

nothing ≈ fg cooperate ≈ fg loop nothing

A symmetric R is a fg-bisimulation if s1 R s2 implies, for any E ∈ Events: 1) s1, E → s′

1, E′

⇒ s2, E ⇒ s′

2, E′ ∧ s′ 1 R s′ 2

2) s1, E ‡ ⇒ s2, E ⇓ s′

2, E ∧

s1E R s′

2E

fg-bisimilarity : s1≈ fgs2 if s1 R s2 for some fg-bisimulation R. but it preserves the clock-stamp of events:

cooperate ; generate ev nothing ; generate ev

≈ fg

slide-53
SLIDE 53

26

Coarse-grained bisimilarity

A symmetric R is a cg-bisimulation if s1 R s2 implies, for any E ∈ Events: s1, E ⇓ s′

1, E′

⇒ s2, E ⇓ s′

2, E′ ∧ s′ 1E′ R s′ 2E′

cg-bisimilarity : s1≈ cgs2 if s1 R s2 for some cg-bisimulation R.

Coarse-grained bisimilarity preserves the overall effect of instant computations

slide-54
SLIDE 54

26

Coarse-grained bisimilarity

A symmetric R is a cg-bisimulation if s1 R s2 implies, for any E ∈ Events: s1, E ⇓ s′

1, E′

⇒ s2, E ⇓ s′

2, E′ ∧ s′ 1E′ R s′ 2E′

cg-bisimilarity : s1≈ cgs2 if s1 R s2 for some cg-bisimulation R.

Coarse-grained bisimilarity preserves the overall effect of instant computations

  • > makes sense in combination with reactivity
slide-55
SLIDE 55

27

Coarse-grained bisimilarity

A symmetric R is a cg-bisimulation if s1 R s2 implies, for any E ∈ Events: s1, E ⇓ s′

1, E′

⇒ s2, E ⇓ s′

2, E′ ∧ s′ 1E′ R s′ 2E′

cg-bisimilarity : s1≈ cgs2 if s1 R s2 for some cg-bisimulation R.

Coarse-grained bisimilarity is strictly larger than fine-grained bisimilarity:

≈ fg ⊂ ≈ cg

slide-56
SLIDE 56

28

Examples

(generate ev1 ∤ generate ev2) ≈ fg (generate ev2 ∤ generate ev1) (generate ev1 ∤ generate ev2) ≈ cg (generate ev2 ∤ generate ev1) generate ev ≈ cg (generate ev ; generate ev) generate ev ≈ fg (generate ev ; generate ev)

is stuttering-insensitive:

≈ cg

is more abstract than because:

≈ fg ≈ cg

is generation-order-insensitive:

≈ cg

slide-57
SLIDE 57

29

Properties

s1 ∤ s2 ≈ cg s2 ∤ s1

Commutativity of with respect to :

≈ cg ∤

Compositionality of both and with respect to

≈ cg ∤ ≈ fg

slide-58
SLIDE 58

Goal: information flow control in CRL enriched with security levels for variables and events

A finite lattice of security levels :

T

l l’

... ... levels assigned to variables and events

Secure information flow

Secure information flow : generated events of level only

l

depend on tested variables or tested events of level

l with ≤ l l

30

slide-59
SLIDE 59

Goal: information flow control in CRL enriched with security levels for variables and events

A finite lattice of security levels : levels assigned to variables and events

Secure information flow

Secure information flow : generated events of level only

l

depend on tested variables or tested events of level

l with ≤ l l

T

l l’

... ...

information leaks

30

slide-60
SLIDE 60
  • observation

ΓL

  • observer :

L

sees only objects of level in L Lattice of security levels : (S, ≤)

L ⊆ S

downward-closed Type environment :

Γ : V ar ∪ Events → S

Valuation :

V : V ar → V al

ΓL-equality of valuations and event environments V1 =Γ

L V2

if Γ(x) ∈ L ⇒ V1(x) = V2(x) E1 =Γ

L E2

if Γ(ev) ∈ L ⇒ ( ev ∈ E1 ⇔ ev ∈ E2 )

31

slide-61
SLIDE 61

32

Fine-grained -bisimilarity

ΓL

R is a fg-ΓL-V1V2-bisimulation if s1 R s2 implies, for any E1 =Γ

L E2:

1) s1, E1 →V1s′

1, E′ 1 ⇒ ( s2, E2 ⇒V2 s′ 2, E′ 2 ∧ E′ 1 =Γ L E′ 2 ∧ s′ 1 R s′ 2 )

2) s1, E1 ‡ ⇒ ( s2, E2 ⇓V2 s′

2, E′ 2 ∧ E1 =Γ L E′ 2 ∧ s1E1 R s′ 2E′

2 )

3) and 4) : Symmetric clauses for s2, E2 under valuation V2. fg-ΓL-bisimilarity: s1 ≈ fg

ΓL s2 if for any V1 =Γ L V2, s1 R s2 for some. . .

slide-62
SLIDE 62

32

Fine-grained -bisimilarity

ΓL

R is a fg-ΓL-V1V2-bisimulation if s1 R s2 implies, for any E1 =Γ

L E2:

1) s1, E1 →V1s′

1, E′ 1 ⇒ ( s2, E2 ⇒V2 s′ 2, E′ 2 ∧ E′ 1 =Γ L E′ 2 ∧ s′ 1 R s′ 2 )

2) s1, E1 ‡ ⇒ ( s2, E2 ⇓V2 s′

2, E′ 2 ∧ E1 =Γ L E′ 2 ∧ s1E1 R s′ 2E′

2 )

3) and 4) : Symmetric clauses for s2, E2 under valuation V2. fg-ΓL-bisimilarity: s1 ≈ fg

ΓL s2 if for any V1 =Γ L V2, s1 R s2 for some. . .

s is fg-secure in Γ if s ≈ fg

ΓL s for every L.

Fine-grained RNI

slide-63
SLIDE 63

33

R is a cg-ΓL-V1V2-bisimulation if s1 R s2 implies, for any E1 =Γ

L E2:

1) s1, E1 ⇓V1 s′

1, E′ 1 ⇒

( s2, E2 ⇓V2 s′

2, E′ 2 ∧ E′ 1 =Γ L E′ 2 ∧

s′

1E′

1 R s′

2E′

2 )

2) Symmetric clauses for s2, E2 under valuation V2. cg-ΓL-bisimilarity: s1 ≈ cg

ΓL s2 if for any V1 =Γ L V2, s1 R s2 for some. . .

Coarse-grained -bisimilarity

ΓL

slide-64
SLIDE 64

33

R is a cg-ΓL-V1V2-bisimulation if s1 R s2 implies, for any E1 =Γ

L E2:

1) s1, E1 ⇓V1 s′

1, E′ 1 ⇒

( s2, E2 ⇓V2 s′

2, E′ 2 ∧ E′ 1 =Γ L E′ 2 ∧

s′

1E′

1 R s′

2E′

2 )

2) Symmetric clauses for s2, E2 under valuation V2. cg-ΓL-bisimilarity: s1 ≈ cg

ΓL s2 if for any V1 =Γ L V2, s1 R s2 for some. . .

Coarse-grained -bisimilarity

ΓL

Coarse-grained RNI s is cg-secure in Γ if s ≈ cg

ΓL s for every L.

slide-65
SLIDE 65

34

Relation between the RNI’ s

If s is fg-secure then s is cg-secure.

cg-secure but not fg-secure: s = if x⊤ = 0 then generate ev ⊥

1 ∤ generate ev ⊥ 2

else generate ev ⊥

2 ∤ generate ev ⊥ 1

slide-66
SLIDE 66

34

Relation between the RNI’ s

If s is fg-secure then s is cg-secure.

Both fg-secure and cg-secure: if x⊤ = 0 then generate ev ⊥

1 ∤ generate ev ⊥ 2

else generate ev ⊥

1 ; generate ev ⊥ 2 end

cg-secure but not fg-secure: s = if x⊤ = 0 then generate ev ⊥

1 ∤ generate ev ⊥ 2

else generate ev ⊥

2 ∤ generate ev ⊥ 1

slide-67
SLIDE 67

35

Prevent level drop from a tested variable/ event to a generated event

Security type system

if x⊤ = 0 then nothing else generate ev⊥

do ( cooperate ; generate ev⊥

2 ) watching ev⊤ 1

NB: in these cases the level drop happens within the same command.

slide-68
SLIDE 68

36

Ex: low output after high conditional with a finite and an infinite branch

Termination leaks

if x⊤ = 0 then nothing else loop nothing ; generate ev⊥

Prevent level drop after a high fork towards ≠ termination behaviours Leaks due to different termination behaviours depending on a high test

slide-69
SLIDE 69

36

Prevent level drop after high conditionals

Termination leaks

if x⊤ = 0 then nothing else loop nothing ; generate ev⊥

await ev⊤

1 ; generate ev⊥ 2

... and more generally after high tests leading to ≠ termination behaviours NB: in these cases the level drop spans over two subsequent commands.

slide-70
SLIDE 70

36

Prevent level drop after high conditionals

Termination leaks

if x⊤ = 0 then nothing else loop nothing ; generate ev⊥

First solution [Volpano & Smith 1998]: reject high conditionals. Later solution: forbid loops in branches of high conditionals. Too drastic! What matters is the absence of low outputs afterwards.

slide-71
SLIDE 71

36

Prevent level drop after high conditionals

Termination leaks

if x⊤ = 0 then nothing else loop nothing ; generate ev⊥

Γ ⊢ s : (τ, σ)

More permissive solution [Boudol and C., Smith 2001]: use double types lower bound for writes upper bound for reads

slide-72
SLIDE 72

36

Prevent level drop after high conditionals

Termination leaks

(Cond1) Γ ⊢ exp : ϑ, Γ ⊢ si : (τ, σ), i = 1, 2, ϑ ≤ τ Γ ⊢ if exp then s1 else s2 : (τ, ϑ ⊔ σ) (Seq) Γ ⊢ s1 : (τ1, σ1), Γ ⊢ s2 : (τ2, σ2), σ1 ≤ τ2 Γ ⊢ s1 ; s2 : (τ1 ⊓ τ2, σ1 ⊔ σ2) if x⊤ = 0 then nothing else loop nothing ; generate ev⊥

slide-73
SLIDE 73

36

Termination leaks

if x⊤ = 0 then generate ev ⊤

1

else nothing ; generate ev ⊥

2

However this solution still rules out secure programs: Prevent level drop after high conditionals : Γ ⊢ s : (τ, σ) FIN = terminating programs, built without await ev, cooperate and loop. INF = nonterminating programs, always entering a loop. Further refined solution:

slide-74
SLIDE 74

37

Prevent level drop after non uniform high conditionals

Termination leaks

(Cond3) Γ ⊢ exp : ϑ, (Γ ⊢ si : (τ, σ) ∧ si ∈ INF, i = 1, 2 ), ϑ ≤ τ Γ ⊢ if exp then s1 else s2 : (τ, σ) (Cond2) Γ ⊢ exp : ϑ, (Γ ⊢ si : (τ, σ) ∧ si ∈ FIN, i = 1, 2 ), ϑ ≤ τ Γ ⊢ if exp then s1 else s2 : (τ, σ)

(Cond1) Γ ⊢ exp : ϑ, Γ ⊢ si : (τ, σ), i = 1, 2, ϑ ≤ τ Γ ⊢ if exp then s1 else s2 : (τ, ϑ ⊔ σ)

slide-75
SLIDE 75

38

Security type system

If s is typable in Γ then s is fg-secure in Γ.

Soundness of type system for fg-security

slide-76
SLIDE 76

38

Security type system

Soundness of type system for fg-security Soundness of type system for cg-security

If s is typable in Γ then s is fg-secure in Γ. If s is typable in Γ then s is cg-secure in Γ.

slide-77
SLIDE 77

39

Related work

  • Builds on [Almeida Matos, Boudol and Castellani, 2007]

and previous work on synchronous languages [Boussinot, Susini, Amadio, Dabrowski, ...]. Main improvements with respect to [AMBC07]: ``better’’ left-parallel operator (associative, no scheduling leaks), reactivity, bisimilarities, coarse-grained security notion, more refined type system with precise treatment of termination leaks.

  • [Sabelfeld, Russo 2007]: cooperative scheduling.
  • [Bohannon et al. 2009]: ID-security.
slide-78
SLIDE 78

41

References

slide-79
SLIDE 79

40

Future work

  • Extension to fully-fledged distributed reactive

language, with memory, sites and migration (GALS) => mix of distribution, synchrony and asynchrony.

  • More “practical” notions of security, allowing for

declassification, e.g. using time-out (watching) to trigger declassification.

  • Determinism: alternative trace-based definitions for

behavioural equivalence and security.

slide-80
SLIDE 80

40

Open questions

  • Generality. How general is such a model of concurrent

computation proceeding in successive phases, where programs interact in a constrained/disciplined way, recovering advantages of sequential computation? Analogy with membrane systems and session calculi.

  • Expressiveness. Identify witness problems, naturally

expressible in one model/language but not in others. [Witness in our model: hot-plug service replacement]. Then define a natural encoding from L1 to L2 as one that preserves both witness problems and some representative native operators (like ||).

slide-81
SLIDE 81

Thank you!