Verifying that a compiler preserves concurrent value-dependent - - PowerPoint PPT Presentation

verifying that a compiler preserves concurrent value
SMART_READER_LITE
LIVE PREVIEW

Verifying that a compiler preserves concurrent value-dependent - - PowerPoint PPT Presentation

Verifying that a compiler preserves concurrent value-dependent information-flow security Robert Sison (UNSW Sydney, Data61) and Toby Murray (University of Melbourne) September 2019 THE UNIVERSITY OF NEW SOUTH WALES www.data61.csiro.au So


slide-1
SLIDE 1

www.data61.csiro.au

Verifying that a compiler preserves concurrent value-dependent information-flow security

Robert Sison (UNSW Sydney, Data61) and Toby Murray (University of Melbourne) September 2019

THE UNIVERSITY OF NEW SOUTH WALES

slide-2
SLIDE 2

2 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

So you’ve proved your program doesn’t leak secrets…

No leaks!

slide-3
SLIDE 3

2 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

So you’ve proved your program doesn’t leak secrets…

No leaks!

How do you know your compiler won’t introduce leaks?

slide-4
SLIDE 4

2 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

So you’ve proved your program doesn’t leak secrets…

No leaks!

How do you know your compiler won’t introduce leaks? What if your compiler could be proved to preserve it?

slide-5
SLIDE 5

3 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

So you’ve proved your program doesn’t leak secrets…

What if your compiler could be proved to preserve it?

slide-6
SLIDE 6

3 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Here's how!

So you’ve proved your program doesn’t leak secrets…

What if your compiler could be proved to preserve it?

slide-7
SLIDE 7

3 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Using confidentiality-preserving refinement

Here's how!

So you’ve proved your program doesn’t leak secrets…

What if your compiler could be proved to preserve it?

slide-8
SLIDE 8

3 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Using confidentiality-preserving refinement

  • 1. With a decomposition

principle

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Here's how!

So you’ve proved your program doesn’t leak secrets…

What if your compiler could be proved to preserve it?

slide-9
SLIDE 9

3 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

(in Isabelle/HOL)

  • 2. Applied to a compiler


Using confidentiality-preserving refinement

  • 1. With a decomposition

principle

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Here's how!

So you’ve proved your program doesn’t leak secrets…

What if your compiler could be proved to preserve it?

slide-10
SLIDE 10

3 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

(in Isabelle/HOL)

  • 2. Applied to a compiler


Using confidentiality-preserving refinement

  • 1. With a decomposition

principle

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Here's how!

So you’ve proved your program doesn’t leak secrets…

What if your compiler could be proved to preserve it?

Our contributions

slide-11
SLIDE 11

4 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

(Proof-of-concept
 for technique) (Technique)

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html)

Prove a compiler preserves proofs of
 confidentiality — in an interactive theorem prover!

slide-12
SLIDE 12

4 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

(Proof-of-concept
 for technique) (Technique)

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html) (Specifically…)

slide-13
SLIDE 13

4 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

(Proof-of-concept
 for technique) (Technique)

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html) (Specifically…)

slide-14
SLIDE 14

4 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

(Proof-of-concept
 for technique) (Technique)

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html)

Motivation + Background: Murray et al. (CSF’16)

(Why all this?)

slide-15
SLIDE 15

4 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

(Proof-of-concept
 for technique) (Technique)

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html)

Motivation + Background: Murray et al. (CSF’16)

(Why all this?)

(Why it’s hard!)

slide-16
SLIDE 16

4 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

(Proof-of-concept
 for technique) (Technique)

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html)

Motivation + Background: Murray et al. (CSF’16)

(Why still hard?)

slide-17
SLIDE 17

Motivation

Confidentiality for modern software (CSF’16)

5

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-18
SLIDE 18

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

Doesn't leak secrets

(storage channels)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-19
SLIDE 19

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

Doesn't leak secrets

(storage channels)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

__________________

slide-20
SLIDE 20

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

_________ __________________

slide-21
SLIDE 21

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

_____________ __________________

slide-22
SLIDE 22

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

__________________

  • 3. Compositionally!


(per-thread effort)

slide-23
SLIDE 23

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

__________________

  • 3. Compositionally!


(per-thread effort) Beaumont et al.
 (ACSAC’16)

Example

(DSTG + Data61 collaboration)

slide-24
SLIDE 24

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Unclassified

PROTECTED

slide-25
SLIDE 25

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Unclassified

PROTECTED

… 😒 , 💹

slide-26
SLIDE 26

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-27
SLIDE 27

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-28
SLIDE 28

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-29
SLIDE 29

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-30
SLIDE 30

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-31
SLIDE 31

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-32
SLIDE 32

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

SECRET,

PROTECTED,

  • r Unclassified?
slide-33
SLIDE 33

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

_____________

SECRET,

PROTECTED,

  • r Unclassified?
slide-34
SLIDE 34

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

_________

slide-35
SLIDE 35

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Cross Domain
 Desktop Compositor
 (CDDC)

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

_________

seL4-based software architecture

slide-36
SLIDE 36

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

_________

seL4-based software architecture

(Case study: simplified model)

slide-37
SLIDE 37

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

_________

seL4-based software architecture

(Case study: simplified model)

  • 3. Compositionally!


(per-thread effort)

slide-38
SLIDE 38

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

_________

seL4-based software architecture

(Case study: simplified model)

  • 3. Compositionally!


(per-thread effort)

slide-39
SLIDE 39

Motivation

Confidentiality for modern software (CSF’16)

Confidentiality

5

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

(storage channels)

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Confidentiality

  • 1. Multiple moving parts


(well-synchronised)

Doesn't leak secrets

  • 2. Mixed-sensitivity reuse


(of devices, space, etc.)

Concurrent value-dependent information-flow security

(storage channels)

  • 3. Compositionally!


(per-thread effort)

Can a compiler preserve it?

slide-40
SLIDE 40

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

slide-41
SLIDE 41

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

slide-42
SLIDE 42

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

This particularly
 makes it harder!

slide-43
SLIDE 43

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

This particularly
 makes it harder!

Interference-resilience (tricky)

slide-44
SLIDE 44

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11

This particularly
 makes it harder!

Interference-resilience (tricky)

slide-45
SLIDE 45

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11

This particularly
 makes it harder!

Interference-resilience (tricky)

+

slide-46
SLIDE 46

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11

This particularly
 makes it harder!

No storage leaks

Interference-resilience (tricky)

+

slide-47
SLIDE 47

6

Concurrent value-dependent information-flow security

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

Volpano & Smith, CSFW’98

No storage leaks

Interference-resilience (tricky)

+

slide-48
SLIDE 48

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

Volpano & Smith, CSFW’98

No storage leaks

Program A Program B

Minimal example:

Interference-resilience (tricky)

+

slide-49
SLIDE 49

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

h isn’t assigned to anything h isn’t even here! _ _

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Program A Program B

Minimal example:

Interference-resilience (tricky)

+

slide-50
SLIDE 50

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Minimal example:

Interference-resilience (tricky)

+

slide-51
SLIDE 51

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

____

Minimal example:

Interference-resilience (tricky)

+

slide-52
SLIDE 52

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 v = 0

Minimal example:

Interference-resilience (tricky)

+

slide-53
SLIDE 53

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 v = 0

/

Minimal example:

Interference-resilience (tricky)

+

slide-54
SLIDE 54

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 v = 0

/ /

Minimal example:

Interference-resilience (tricky)

+

slide-55
SLIDE 55

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 v = 0

/ / /

Minimal example:

Interference-resilience (tricky)

+

slide-56
SLIDE 56

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 l = 0 v = 0

/ / / /

Minimal example:

Interference-resilience (tricky)

+

slide-57
SLIDE 57

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 l = 0 v = 1

/ / / /

Minimal example:

Interference-resilience (tricky)

+

slide-58
SLIDE 58

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 h = 1 l = 0 v = 0

Minimal example:

Interference-resilience (tricky)

+

slide-59
SLIDE 59

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 h = 1 l = 0 v = 0

/

Minimal example:

Interference-resilience (tricky)

+

slide-60
SLIDE 60

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 h = 1 l = 0 v = 0

/ /

Minimal example:

Interference-resilience (tricky)

+

slide-61
SLIDE 61

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 h = 1 l = 0 v = 1

/ / /

Minimal example:

Interference-resilience (tricky)

+

slide-62
SLIDE 62

Timing leak


  • f h

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____

h = 0 h = 1 l = 0 l = 1 v = 1

/ / / /

Minimal example:

Interference-resilience (tricky)

+

slide-63
SLIDE 63

Timing leak


  • f h

Storage leak


  • f h!

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____ ____

h = 0 h = 1 l = 0 l = 1 v = 1

/ / / /

Minimal example:

Interference-resilience (tricky)

+

slide-64
SLIDE 64

Timing leak


  • f h

Storage leak


  • f h!

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks! Timing leak Storage leak

; skip Timing


fix

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____ ____ ____ ____

Minimal example:

Interference-resilience (tricky)

+

slide-65
SLIDE 65

Timing leak


  • f h

Storage leak


  • f h!

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

; skip Timing


fix

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____ ____

Timing
 fix

skip But: Compiler may eliminate it!

Minimal example:

Interference-resilience (tricky)

+

slide-66
SLIDE 66

Timing leak


  • f h

Storage leak


  • f h!

6

Concurrent value-dependent information-flow security

if (h) then skip else skip; skip fi v := 1 l := v

// Initially, v = 0

||

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Motivation

Why wouldn’t a compiler preserve it? (CSF’16)

Some extra stuff to preserve


(not that hard)

control variable contents
 (sensitivity-switching)

Murray et al. CSF’16

relies/guarantees
 (synchronisation)

Mantel et al. CSF’11


 Each thread must prevent (scheduler-relative) timing leaks!

; skip Timing


fix

(or, introduce new “if (h)”!)

This particularly
 makes it harder!

_

Volpano & Smith, CSFW’98

No storage leaks

Thread A Thread B

Schedule
 A, A, A, B, …

____ ____

Timing
 fix

skip But: Compiler may eliminate it!

Minimal example:

Interference-resilience (tricky)

+

slide-67
SLIDE 67
  • preserving refinement

Concurrent value-dependent information-flow security 1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-68
SLIDE 68

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-69
SLIDE 69

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-70
SLIDE 70

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

Program configurations

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-71
SLIDE 71

Relations
 (between)

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

Program configurations

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-72
SLIDE 72

Relations
 (between) Execution
 steps

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

Program configurations

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-73
SLIDE 73

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

“Usual” refinement:

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-74
SLIDE 74

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

“Usual” refinement: 


A simulates C ⇒ C refines A

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-75
SLIDE 75

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

“Usual” refinement: 


A simulates C ⇒ C refines A

For-all

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-76
SLIDE 76

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

“Usual” refinement: 


A simulates C ⇒ C refines A

Exists For-all

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-77
SLIDE 77

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

From compiler
 front-end

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-78
SLIDE 78

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

?

Confidentiality-preserving refinement

“BC” “BC”

“BC”

AFP entry:

Dependent_SIFUM_Refinement

From compiler
 front-end For free ?

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-79
SLIDE 79

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-80
SLIDE 80

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

(Two-sided!)

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-81
SLIDE 81

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

For-all

1

Exists

(Two-sided!)

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-82
SLIDE 82

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

For-all

1

Exists

(Two-sided!)

For-all

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-83
SLIDE 83

2

Exists

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

For-all

1

Exists

(Two-sided!)

For-all

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-84
SLIDE 84

2

Exists

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

For-all

1

Exists

(Two-sided!)

For-all

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

slide-85
SLIDE 85

2

Exists

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

7

Security proof
 (Bisimulation B) + ⇒ Security proof
 (Bisimulation BCof B R I) Compiler correctness proof (Refinement R)

Direction


  • f


compilation

Abstract Concrete

Confidentiality-preserving refinement

AFP entry:

Dependent_SIFUM_Refinement

For-all

1

Exists

(Two-sided!)

For-all

From compiler
 front-end “For free”*

*

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Background

Why is it hard to prove? (CSF’16)

(Compare: Barthe et al. CSF’18)

slide-86
SLIDE 86

8 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

Goal

Our contributions

Plan: Use confidentiality-preserving refinement

slide-87
SLIDE 87

8 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Technique)

Goal Results

Our contributions

slide-88
SLIDE 88

8 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

  • 2. Verified compiler

While-language to RISC-style assembly

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Technique)

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

(Proof-of-concept
 for technique)

slide-89
SLIDE 89

8 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

  • 2. Verified compiler

While-language to RISC-style assembly

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Technique)

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

(Proof-of-concept
 for technique)

slide-90
SLIDE 90

8 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security

  • 1. Decomposition principle

for confidentiality-preserving refinement

  • 2. Verified compiler

While-language to RISC-style assembly

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Technique)

Goal Results

Our contributions

1st such proofs carried to assembly-level model by compiler

Impact

Proof effort almost halved!

(Proof-of-concept
 for technique)

slide-91
SLIDE 91

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-92
SLIDE 92

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

A abs-steps A C A0

R R

C C0

1A 1A0 2A 2A0

B B I I R R R R

1C 1C0 2C 2C0

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

implies

( ⟹ )

slide-93
SLIDE 93

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement

A abs-steps A C A0

R R

C C0

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-94
SLIDE 94

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-95
SLIDE 95

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement

“Pacing function” abs-steps
 for (refinement) relation R _____

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-96
SLIDE 96

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-97
SLIDE 97

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-98
SLIDE 98

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-99
SLIDE 99

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-100
SLIDE 100

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-101
SLIDE 101

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-102
SLIDE 102

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness!

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-103
SLIDE 103

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-104
SLIDE 104

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-105
SLIDE 105

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-106
SLIDE 106

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-107
SLIDE 107

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-108
SLIDE 108

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-109
SLIDE 109

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing

  • 4. Closedness of


“Concrete coupling
 invariant” relation I


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-110
SLIDE 110

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing

  • 4. Closedness of


“Concrete coupling
 invariant” relation I


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-111
SLIDE 111

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing

  • 4. Closedness of


“Concrete coupling
 invariant” relation I


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

No new timing
 and termination leaks!

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-112
SLIDE 112

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C 1A 2A

B I I R R

1C 1 1C0 2C 2C0

The “cube”, decomposed

Simpler confidentiality-preserving refinement

9

  • 1. “Usual” proof
  • f refinement
  • 2. Consistent pacing

  • 4. Closedness of


“Concrete coupling
 invariant” relation I


“Pacing function” abs-steps
 for (refinement) relation R _____ _____ _____ Security witness
 (bisimulation) relation B

A abs-steps A C A0

R R

C C0

No new timing
 and termination leaks!

(+ “extra stuff” for conc, val-dep)

Standard compiler
 correctness! and


  • 3. Consistent stopping

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-113
SLIDE 113

Proof effort comparison

Refinement example (excerpt) from CSF’16

10

if h 6= 0 then x := y else x := y + z fi

reg3 := h; if reg3 6= 0 then skip; skip; reg0 := y; x := reg0 else reg1 := y; reg2 := z; reg0 := reg1 + reg2; x := reg0 fi

Abstract program Concrete program

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

formalisation artifact:

https://covern.org/itp19.html

slide-114
SLIDE 114

Proof effort comparison

Refinement example (excerpt) from CSF’16

10

if h 6= 0 then x := y else x := y + z fi

reg3 := h; if reg3 6= 0 then skip; skip; reg0 := y; x := reg0 else reg1 := y; reg2 := z; reg0 := reg1 + reg2; x := reg0 fi

Abstract program Concrete program

_

_

branch


  • n secret

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

formalisation artifact:

https://covern.org/itp19.html

slide-115
SLIDE 115

Proof effort comparison

Refinement example (excerpt) from CSF’16

10

if h 6= 0 then x := y else x := y + z fi

reg3 := h; if reg3 6= 0 then skip; skip; reg0 := y; x := reg0 else reg1 := y; reg2 := z; reg0 := reg1 + reg2; x := reg0 fi

Abstract program Concrete program

padding
 to prevent
 timing leak

_

_

branch


  • n secret

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

formalisation artifact:

https://covern.org/itp19.html

slide-116
SLIDE 116
  • 44% shorter proof of secure refinement


(~3.6K to ~2K lines of Isabelle/HOL proofs)

Proof effort comparison

Refinement example (excerpt) from CSF’16

10

if h 6= 0 then x := y else x := y + z fi

reg3 := h; if reg3 6= 0 then skip; skip; reg0 := y; x := reg0 else reg1 := y; reg2 := z; reg0 := reg1 + reg2; x := reg0 fi

Abstract program Concrete program

padding
 to prevent
 timing leak

_

_

branch


  • n secret

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

formalisation artifact:

https://covern.org/itp19.html

slide-117
SLIDE 117

(Proof-of-concept
 for technique)

11 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

Impact

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security 1st such proofs carried to assembly-level model by compiler

Impact

  • 2. Verified compiler

While-language to RISC-style assembly

Proof effort almost halved!

(Technique)

slide-118
SLIDE 118

(Proof-of-concept
 for technique)

11 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

Impact

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security 1st such proofs carried to assembly-level model by compiler

Impact

  • 2. Verified compiler

While-language to RISC-style assembly

Proof effort almost halved!

(Technique)

slide-119
SLIDE 119

Verified compiler

Overview

12 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

An Isabelle/HOL primrec function

(Formalisation: https://covern.org/itp19.html)

slide-120
SLIDE 120

Verified compiler

Overview

12 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

An Isabelle/HOL primrec function

(Based on:
 Tedesco et al. CSF’16)

(Formalisation: https://covern.org/itp19.html)

slide-121
SLIDE 121

Verified compiler

Overview

12 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

An Isabelle/HOL primrec function

  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

(Based on:
 Tedesco et al. CSF’16)

(Formalisation: https://covern.org/itp19.html)

slide-122
SLIDE 122

Verified compiler

Overview

12 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

An Isabelle/HOL primrec function

  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

(Based on:
 Tedesco et al. CSF’16)

(Formalisation: https://covern.org/itp19.html)

slide-123
SLIDE 123

Verified compiler

Overview

12 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

An Isabelle/HOL primrec function

  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

(Based on:
 Tedesco et al. CSF’16)

(Formalisation: https://covern.org/itp19.html)

slide-124
SLIDE 124

Verified compiler

Overview

12 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

An Isabelle/HOL primrec function

  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

(Based on:
 Tedesco et al. CSF’16)

(Formalisation: https://covern.org/itp19.html)

slide-125
SLIDE 125

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

(Formalisation: https://covern.org/itp19.html)

slide-126
SLIDE 126
  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

(Formalisation: https://covern.org/itp19.html)

slide-127
SLIDE 127
  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2

slide-128
SLIDE 128

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2

slide-129
SLIDE 129

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2

True

slide-130
SLIDE 130

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2

True

slide-131
SLIDE 131

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2

False

slide-132
SLIDE 132

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2

False

slide-133
SLIDE 133

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional
  • Theorem: R (for B, with I)


is a secure refinement

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC While RISC

(Formalisation: https://covern.org/itp19.html)

If e c1 c2 … …

slide-134
SLIDE 134

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional
  • Theorem: R (for B, with I)


is a secure refinement

(via decomposition principle)

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC While RISC

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Formalisation: https://covern.org/itp19.html)

If e c1 c2 … …

slide-135
SLIDE 135

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional
  • Theorem: R (for B, with I)


is a secure refinement

(via decomposition principle)

  • Theorem: Compiler input related to output by R

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC While RISC

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Formalisation: https://covern.org/itp19.html)

If e c1 c2 … …

slide-136
SLIDE 136

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional
  • Theorem: R (for B, with I)


is a secure refinement

(via decomposition principle)

  • Theorem: Compiler input related to output by R

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC While RISC

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Formalisation: https://covern.org/itp19.html)

If e c1 c2 … …

slide-137
SLIDE 137

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional
  • Theorem: R (for B, with I)


is a secure refinement

(via decomposition principle)

  • Theorem: Compiler input related to output by R

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC While RISC

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Formalisation: https://covern.org/itp19.html)

If e c1 c2 … …

slide-138
SLIDE 138

(Inductive)

  • Nominate R (and I) to characterise compilation


(for proofs B produced by our type system)

  • e.g. R cases for if-conditional
  • Theorem: R (for B, with I)


is a secure refinement

(via decomposition principle)

  • Theorem: Compiler input related to output by R

13 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

Verified compiler

Proof approach

While RISC While RISC

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

(Formalisation: https://covern.org/itp19.html)

If e c1 c2 … …

slide-139
SLIDE 139
  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

Verified compiler

Overview

14 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

An Isabelle/HOL primrec function

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

(Formalisation: https://covern.org/itp19.html)

(Based on:
 Tedesco et al. CSF’16)

slide-140
SLIDE 140
  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

Verified compiler

Overview

14 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

An Isabelle/HOL primrec function

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

(Formalisation: https://covern.org/itp19.html)

(Based on:
 Tedesco et al. CSF’16)

slide-141
SLIDE 141

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

(Formalisation: https://covern.org/itp19.html)

slide-142
SLIDE 142

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

(Formalisation: https://covern.org/itp19.html)

Concurrent input-handling architecture

(extremely simplified)

slide-143
SLIDE 143

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

(Formalisation: https://covern.org/itp19.html)

~150 lines While

slide-144
SLIDE 144

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

(Formalisation: https://covern.org/itp19.html)

~150 lines While

slide-145
SLIDE 145

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

~250 RISC instructions

(Formalisation: https://covern.org/itp19.html)

~150 lines While

slide-146
SLIDE 146

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

~250 RISC instructions

(Formalisation: https://covern.org/itp19.html)

~150 lines While

Proof effort preserved!

slide-147
SLIDE 147

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

~250 RISC instructions

(Formalisation: https://covern.org/itp19.html)

~150 lines While

Proof effort preserved!

slide-148
SLIDE 148

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

~250 RISC instructions

(Formalisation: https://covern.org/itp19.html)

~150 lines While

Proof effort preserved!

slide-149
SLIDE 149

Verified compiler

Application: CDDC input-handling model

15

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

~250 RISC instructions

(Formalisation: https://covern.org/itp19.html)

~150 lines While

Proof effort preserved!

slide-150
SLIDE 150
  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

Verified compiler

Overview

16 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

An Isabelle/HOL primrec function

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

(Formalisation: https://covern.org/itp19.html)

(Based on:
 Tedesco et al. CSF’16)

slide-151
SLIDE 151
  • Proof approach: ~7K lines of Isabelle/HOL script
  • Prevents data races on shared memory
  • Knows when safe to optimise reads

Verified compiler

Overview

16 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • Application: 2-thread input-handling model

  • f Cross Domain Desktop Compositor

An Isabelle/HOL primrec function

While RISC

Skip Seq (i.e. c1 ;; c2) Assign (i.e. v ← e) If e c1 c2 While e c (Imperative) (Assembly) Load r v Store v r Jmp l Jz l r Nop ... ...

(Formalisation: https://covern.org/itp19.html)

(Based on:
 Tedesco et al. CSF’16)

slide-152
SLIDE 152

(Technique)

17 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

Proof effort almost halved!

Impact

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security 1st such proofs carried to assembly-level model by compiler

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html) (Proof-of-concept
 for technique)

(Conclusion)

slide-153
SLIDE 153

(Technique)

17 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

Proof effort almost halved!

Impact

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security 1st such proofs carried to assembly-level model by compiler

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html) (Proof-of-concept
 for technique)

(Conclusion)

slide-154
SLIDE 154

(Technique)

17 Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

  • 1. Decomposition principle

for confidentiality-preserving refinement

1A abs-steps 1A 1C = 2A abs-steps 2A 2C

B I R R

1C stops 1C = 2C stops 2C

= =

Goal Results

Our contributions

Proof effort almost halved!

Impact

Prove a compiler preserves proofs of concurrent
 value-dependent information-flow security 1st such proofs carried to assembly-level model by compiler

  • 2. Verified compiler

While-language to RISC-style assembly

(Formalisation: https://covern.org/itp19.html) (Proof-of-concept
 for technique)

Thank you! Please see

(Conclusion) + Q & A

slide-155
SLIDE 155

18

Tedesco et al. CSF’16

Appendix

Differences from Tedesco et al. CSF'16 compilation scheme

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray

slide-156
SLIDE 156

18

Our While-to-RISC compiler

Appendix

Differences from Tedesco et al. CSF'16 compilation scheme

Verifying that a compiler preserves concurrent value-dependent infoflow security | Robert Sison and Toby Murray