Speculative Taint Tracking (STT TT): A Comprehensive Protection for - - PowerPoint PPT Presentation

speculative taint tracking stt tt
SMART_READER_LITE
LIVE PREVIEW

Speculative Taint Tracking (STT TT): A Comprehensive Protection for - - PowerPoint PPT Presentation

Speculative Taint Tracking (STT TT): A Comprehensive Protection for Speculatively Accessed Data JIYONG YU, , MENGJIA YAN, ARTEM KHYZHA*, ADAM MORRISON*, JOSEP TORRELLAS, CHRISTOPHER W. FLETCHER UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN


slide-1
SLIDE 1

Speculative Taint Tracking (STT TT): A Comprehensive Protection for Speculatively Accessed Data

JIYONG YU, , MENGJIA YAN, ARTEM KHYZHA*, ADAM MORRISON*, JOSEP TORRELLAS, CHRISTOPHER W. FLETCHER

UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN ∗TEL AVIV UNIVERSITY

1

slide-2
SLIDE 2

Processors are Insecure

Introduction Speculative Taint Tracking Evaluation Conclusion

2

slide-3
SLIDE 3

Processors are Insecure

2

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-4
SLIDE 4

Speculative Execution Attacks

// Spectre Variant 1 if (addr < N) { // speculation // access instruction spec_val = load [addr]; // covert channel load [spec_val]; }

Speculation starts

3

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-5
SLIDE 5

Speculative Execution Attacks

// Spectre Variant 1 if (addr < N) { // speculation // access instruction spec_val = load [addr]; // covert channel load [spec_val]; }

3

*: Kiriansky, Vladimir, et al. "DAWG: A defense against cache timing attacks in speculative execution processors." MICRO-51, 2018.

Speculation starts Speculative access instruction* accesses secret

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-6
SLIDE 6

Speculative Execution Attacks

// Spectre Variant 1 if (addr < N) { // speculation // access instruction spec_val = load [addr]; // covert channel load [spec_val]; }

3

*: Kiriansky, Vladimir, et al. "DAWG: A defense against cache timing attacks in speculative execution processors." MICRO-51, 2018.

Speculation starts Creates a covert channel to leak secret

Introduction Speculative Taint Tracking Evaluation Conclusion

Speculative access instruction* accesses secret

slide-7
SLIDE 7

Speculative Execution Attacks

// Spectre Variant 1 if (addr < N) { // speculation // access instruction spec_val = load [addr]; // covert channel load [spec_val]; }

addr = N+1

3

*: Kiriansky, Vladimir, et al. "DAWG: A defense against cache timing attacks in speculative execution processors." MICRO-51, 2018.

Speculation starts Speculation ends - misspeculation! Creates a covert channel to leak secret

Introduction Speculative Taint Tracking Evaluation Conclusion

Speculative access instruction* accesses secret

slide-8
SLIDE 8

Speculative Execution Attacks

// Spectre Variant 1 if (addr < N) { // speculation // access instruction spec_val = load [addr]; // covert channel load [spec_val]; }

Speculation starts Speculation ends - misspeculation! Creates a covert channel to leak secret

3

*: Kiriansky, Vladimir, et al. "DAWG: A defense against cache timing attacks in speculative execution processors." MICRO-51, 2018.

Introduction Speculative Taint Tracking Evaluation Conclusion

Speculative access instruction* accesses secret

slide-9
SLIDE 9

Main Insight of STT

4

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-10
SLIDE 10

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

4

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-11
SLIDE 11

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

4

Creates a covert channel? Input

  • perand is

a secret? Requires protection? Introduction Speculative Taint Tracking Evaluation Conclusion

slide-12
SLIDE 12

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

prediction

Speculation starts

4

Creates a covert channel? Input

  • perand is

a secret? Requires protection? Introduction Speculative Taint Tracking Evaluation Conclusion

slide-13
SLIDE 13

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

Speculation starts

4

Creates a covert channel? Input

  • perand is

a secret? Requires protection? Yes No No Introduction Speculative Taint Tracking Evaluation Conclusion

slide-14
SLIDE 14

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

Speculation starts

4

Creates a covert channel? Input

  • perand is

a secret? Requires protection? Yes No No No Yes No Introduction Speculative Taint Tracking Evaluation Conclusion

slide-15
SLIDE 15

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

Speculation starts

4

Creates a covert channel? Input

  • perand is

a secret? Requires protection? Yes No No No Yes No Yes Yes Yes Introduction Speculative Taint Tracking Evaluation Conclusion

slide-16
SLIDE 16

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

Speculation starts

Non-speculative

4

Correct Prediction! Creates a covert channel? Input

  • perand is

a secret? Requires protection? Yes No No No No No Yes No No Introduction Speculative Taint Tracking Evaluation Conclusion

slide-17
SLIDE 17

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

Speculation starts

Non-speculative

Correct Prediction!

4

Creates a covert channel? Input

  • perand is

a secret? Requires protection? Yes No No No No No Yes No No Introduction Speculative Taint Tracking Evaluation Conclusion

slide-18
SLIDE 18

Main Insight of STT

“Sufficient for security: prevent secrets from reaching covert channels”

if (addr < N) { // access instruction spec_val = load [addr]; // simple arithmetic spec_val = spec_val + 4; // cache/mem covert channel load [spec_val]; } ……

Speculation starts

Squashed!

4

Incorrect Prediction! Creates a covert channel? Input

  • perand is

a secret? Requires protection? Yes No No No Yes No Yes Yes Yes Introduction Speculative Taint Tracking Evaluation Conclusion

slide-19
SLIDE 19

Speculative Taint Tracking

5

Secret

(speculatively accessed data)

Covert channels

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-20
SLIDE 20

Speculative Taint Tracking

5

Secret

(speculatively accessed data)

Covert channels

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-21
SLIDE 21

Speculative Taint Tracking

5

Secret

(speculatively accessed data)

Covert channels

What are the covert channels?

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-22
SLIDE 22

Speculative Taint Tracking

5

Secret

(speculatively accessed data)

Covert channels

What are the covert channels? A new classification to understand covert channels in speculative machines

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-23
SLIDE 23

Speculative Taint Tracking

5

Secret

(speculatively accessed data)

Covert channels

What are the covert channels? How to identify all the secrets? A new classification to understand covert channels in speculative machines

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-24
SLIDE 24

Speculative Taint Tracking

What are the covert channels? How to identify all the secrets? A new classification to understand covert channels in speculative machines A new taint/untaint mechanism to track secrets in hardware

5

Secret

(speculatively accessed data)

Covert channels

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-25
SLIDE 25

A Classification of Covert Channels in HW

6

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-26
SLIDE 26

Classification of Covert Channels

Covert channels Explicit channels Implicit channels

7

Introduction Speculative Taint Tracking Evaluation Conclusion

Explicit branches Implicit branches Leak on prediction Leak on resolution Leak on prediction Leak on resolution

slide-27
SLIDE 27

Classification of Covert Channels

Covert channels Explicit channels Implicit channels Explicit branches Implicit branches Leak on prediction Leak on resolution

New!

Leak on prediction Leak on resolution

7

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-28
SLIDE 28

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage

load [secret];

8

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-29
SLIDE 29

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

8

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-30
SLIDE 30

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute

secret = load [addr]; if (secret == 1) load [0x00];

8

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-31
SLIDE 31

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute Examples: branch/jump instructions

8

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-32
SLIDE 32

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute

8

Explicit branches

Examples: Branch/jump instructions

New!

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-33
SLIDE 33

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute

8

Explicit branches

Examples: Branch/jump instructions

Leak on prediction Leak on resolution

New!

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-34
SLIDE 34

Explicit Branches @ Prediction

Cause: The predictor state becomes a function of secret

// Visibility point … … … … if ( secret ) … … … … if ( public ) load [0x00]; else load [0x10];

9

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-35
SLIDE 35

Explicit Branches @ Prediction

Cause: The predictor state becomes a function of secret

Resolve and update branch predictor // Visibility point … … … … if ( secret ) … … … … if ( public ) load [0x00]; else load [0x10]; idx | taken Branch Predictor Unit (BPU)

9

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-36
SLIDE 36

Explicit Branches @ Prediction

Cause: The predictor state becomes a function of secret

idx | taken Branch Predictor Unit (BPU) // Visibility point … … … … if ( secret ) … … … … if ( public ) load [0x00]; else load [0x10];

9

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-37
SLIDE 37

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute

10

Explicit branches

Examples: Branch/jump instructions

Leak on prediction Leak on resolution

New!

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-38
SLIDE 38

Explicit Branches @ Resolution

Cause: The resolution of a mis-speculation triggers a pipeline squash and alternation of control flow

if (secret) { y++; } z = load [0x00]

11

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-39
SLIDE 39

Explicit Branches @ Resolution

Cause: The resolution of a mis-speculation triggers a pipeline squash and alternation of control flow

if (secret) { y++; } z = load [0x00]

secret != prediction → squash → load executes twice!

11

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-40
SLIDE 40

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute

12

Explicit branches

Examples: Branch/jump instructions

Implicit branches

Example: Store-load pairs

Leak on prediction Leak on resolution

New!

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-41
SLIDE 41

Classification of Covert Channels

Covert channels Explicit channels:

Secret inputs are directly leaked by operand-dependent hardware resource usage Examples: memory loads data-dependent arithmetic

Implicit channels:

Secret inputs are indirectly leaked by how (or that) one or several instructions execute

Explicit branches

Examples: Branch/jump instructions

Implicit branches

Example: Store-load pairs

Leak on prediction Leak on resolution Leak on prediction Leak on resolution

12

New!

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-42
SLIDE 42

Implicit Branches

store [secret] = foo; bar = load [0x00];

13

Introduction Speculative Taint Tracking Evaluation Conclusion

Cause: Non-control flow instructions create branch-like behaviors.

slide-43
SLIDE 43

Implicit Branches

Cause: Non-control flow instructions create branch-like behaviors.

if (secret == 0x00) { forward from store queue } else { cache_load [0x00] }

Can be thought as:

store [secret] = foo; bar = load [0x00];

13

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-44
SLIDE 44

Identifying Secrets using Tainting/Untainting

14

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-45
SLIDE 45

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-46
SLIDE 46

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

if (addr < N) { // access instruction a = load [addr]; // simple arithmetic b = a + 4; // cache/mem covert channel load [b]; } …… …… ……

speculative

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-47
SLIDE 47

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

STT taints:

1) Output of speculative access instructions (a)

if (addr < N) { // access instruction a = load [addr]; // simple arithmetic b = a + 4; // cache/mem covert channel load [b]; } …… …… ……

speculative

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-48
SLIDE 48

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

STT taints:

1) Output of speculative access instructions (a) 2) Output of instructions with tainted inputs (b)

if (addr < N) { // access instruction a = load [addr]; // simple arithmetic b = a + 4; // cache/mem covert channel load [b]; } …… …… ……

speculative

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-49
SLIDE 49

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

STT taints:

1) Output of speculative access instructions (a) 2) Output of instructions with tainted inputs (b)

if (addr < N) { // access instruction a = load [addr]; // simple arithmetic b = a + 4; // cache/mem covert channel load [b]; } …… …… ……

Resolved! speculative

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-50
SLIDE 50

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

STT taints:

1) Output of speculative access instructions (a) 2) Output of instructions with tainted inputs (b)

STT untaints when:

1) A speculative access instruction becomes non- speculative (a)

if (addr < N) { // access instruction a = load [addr]; // simple arithmetic b = a + 4; // cache/mem covert channel load [b]; } …… …… ……

Resolved! speculative

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-51
SLIDE 51

Identifying Secrets using Tainting/Untainting

Basic idea: taint all the secrets

  • Speculatively accessed data (secrets by definition)
  • And their dependents

STT taints:

1) Output of speculative access instructions (a) 2) Output of instructions with tainted inputs (b)

STT untaints when:

1) A speculative access instruction becomes non- speculative (a) 2) An instruction has all its input untainted (b)

if (addr < N) { // access instruction a = load [addr]; // simple arithmetic b = a + 4; // cache/mem covert channel load [b]; } …… …… ……

Resolved! speculative

15

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-52
SLIDE 52

Microarchitect Identifies …

Instructions forming explicit channels

  • E.g. load, data-dependent arithmetic

Instructions forming implicit channels

  • E.g. control-flow instructions, store-load pairs

16

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-53
SLIDE 53

Blocking Covert Channels

Explicit channels:

  • Delay execution until operands untainted (e.g., load address)

17

Introduction Speculative Taint Tracking Evaluation Conclusion

Covert channels Explicit channels Implicit channels Leak on prediction Leak on resolution

slide-54
SLIDE 54

Blocking Covert Channels

Explicit channels:

  • Delay execution until operands untainted (e.g., load address)

Implicit channels:

  • Delay predictor update until branch predicate untainted

17

Introduction Speculative Taint Tracking Evaluation Conclusion

Covert channels Explicit channels Implicit channels Leak on prediction Leak on resolution

slide-55
SLIDE 55

Blocking Covert Channels

Explicit channels:

  • Delay execution until operands untainted (e.g., load address)

Implicit channels:

  • Delay predictor update until branch predicate untainted
  • Delay resolution until branch predicate untainted

17

Introduction Speculative Taint Tracking Evaluation Conclusion

Covert channels Explicit channels Implicit channels Leak on prediction Leak on resolution

slide-56
SLIDE 56

Blocking Covert Channels

Explicit channels:

  • Delay execution until operands untainted (e.g., load address)

Implicit channels:

  • Delay predictor update until branch predicate untainted
  • Delay resolution until branch predicate untainted

17

Introduction Speculative Taint Tracking Evaluation Conclusion

Covert channels Explicit channels Implicit channels Leak on prediction Leak on resolution

slide-57
SLIDE 57

Hardware Implementation of STT

18

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-58
SLIDE 58

Efficient Implementation of Tainting/Untainting Logic

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative

19

Introduction Speculative Taint Tracking Evaluation Conclusion Delay execution!

slide-59
SLIDE 59

Efficient Implementation of Tainting/Untainting Logic

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative

19

Introduction Speculative Taint Tracking Evaluation Conclusion Delay execution!

slide-60
SLIDE 60

Efficient Implementation of Tainting/Untainting Logic

Observation: All instructions turn non- speculative in-order

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative

19

Introduction Speculative Taint Tracking Evaluation Conclusion Delay execution!

slide-61
SLIDE 61

Efficient Implementation of Tainting/Untainting Logic

Observation: All instructions turn non- speculative in-order

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative

19

→ resolved!

Introduction Speculative Taint Tracking Evaluation Conclusion Delay execution!

slide-62
SLIDE 62

Efficient Implementation of Tainting/Untainting Logic

Observation: All instructions turn non- speculative in-order

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative

19

→ resolved!

Introduction Speculative Taint Tracking Evaluation Conclusion Execute!

slide-63
SLIDE 63

Efficient Implementation of Tainting/Untainting Logic

Observation: All instructions turn non- speculative in-order Each instruction tracks the “youngest access instruction” it depends on -- “Youngest Root

  • f Taint” (YRoT)

YRoT of 7 is 4

19

Introduction Speculative Taint Tracking Evaluation Conclusion

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative Execute!

slide-64
SLIDE 64

Efficient Implementation of Tainting/Untainting Logic

20

Introduction Speculative Taint Tracking Evaluation Conclusion

No change to the memory subsystem!

slide-65
SLIDE 65

Security Evaluation

Security definition:

Arbitrary speculative execution can only leak retired register file state (not arbitrary program memory)

To prove it: STT enforces a non-interference property w.r.t speculatively accessed data The link to the detailed formal analysis and security proof is in the paper

21

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-66
SLIDE 66

Performance Evaluation on SPEC2006

Consider control-flow speculation Consider all types of speculation

22

Introduction Speculative Taint Tracking Evaluation Conclusion

40.2% 8.5% 182.0% 14.5%

0.0% 20.0% 40.0% 60.0% 80.0% 100.0% 120.0% 140.0% 160.0% 180.0% 200.0%

DelayExecute STT DelayExecute STT

Perf Overhead over Insecure Baseline

slide-67
SLIDE 67

Conclusion

STT Blocks leakage of speculatively accessed data over any uarch covert channels with: 1) High performance 2) Provable security protection 3) No software change; No memory subsystem change

23

Introduction Speculative Taint Tracking Evaluation Conclusion

slide-68
SLIDE 68

Conclusion

STT Blocks leakage of speculatively accessed data over any uarch covert channels with: 1) High performance 2) Provable security protection 3) No software change; No memory subsystem change

23

Introduction Speculative Taint Tracking Evaluation Conclusion

Questions?

slide-69
SLIDE 69

Backup slides

69

slide-70
SLIDE 70

Threat Model

A powerful attacker who:

  • Monitors covert channels
  • Cache, SIMD units, or any shared hardware resources
  • From everywhere
  • Within same thread
  • Adjacent SMT context
  • Cross core
  • At cycle granularity

Introduction Threat model Speculative Taint Tracking Evaluation Conclusion

70

slide-71
SLIDE 71

TODO: compare with NDA and SpecShield

71

slide-72
SLIDE 72

TODO: STT threat model vs. STT+ threat model

72

slide-73
SLIDE 73

Outline

Introduction Threat Model Speculative Taint Tracking Evaluation Conclusion

Introduction Threat model Speculative Taint Tracking Evaluation Conclusion

73

slide-74
SLIDE 74

Implementation of STT

A new classification of covert channels in HW ➔ Specify instructions with explicit or implicit channels

74

slide-75
SLIDE 75

Putting it together

Executes all instructions w/ untainted inputs Executes non-transmit instructions w/ tainted inputs Predicts explicit/implicit branches w/ tainted predicates

Introduction Speculative Taint Tracking Security Definition Evaluation Conclusion

81

slide-76
SLIDE 76

Putting it together

Executes all instructions w/ untainted inputs Executes non-transmit instructions w/ tainted inputs Predicts explicit/implicit branches w/ tainted predicates Delay executing transmit instructions w/ tainted inputs Delay resolution/predictor updates of explicit/implicit branches w/ tainted predicates

Block explicit channel Introduction Speculative Taint Tracking Security Definition Evaluation Conclusion

82

slide-77
SLIDE 77

Putting it together

Executes all instructions w/ untainted inputs Executes non-transmit instructions w/ tainted inputs Predicts explicit/implicit branches w/ tainted predicates Delay executing transmit instructions w/ tainted inputs Delay resolution/predictor updates of explicit/implicit branches w/ tainted predicates

Block explicit channel Block implicit channel TODO: spend a little bit more time on this slide? TODO: what is transmit instruction? Introduction Speculative Taint Tracking Security Definition Evaluation Conclusion

83

slide-78
SLIDE 78

Microarchitecture Design of STT

  • Each instruction has its “Youngest Root of Taint”

(YRoT)

For each (transmit) instruction: Input is secret  YRoT is still speculative  Visibility point is ahead of YRoT

1) branch 2) a = load [0x00] // YRoT = -1 3) branch_1 4) b = load [0x04] // YRoT = -1 5) branch 6) c = a + b // YRoT = max(2, 4) = 4 > 1 7) d = load [c] // YRoT = 4 > 1

program order

89

slide-79
SLIDE 79

Microarchitecture Design of STT

  • Each instruction has its “Youngest Root of Taint”

(YRoT)

For each (transmit) instruction: Input is secret  YRoT is still speculative  Visibility point is ahead of YRoT

1) branch_0 2) a = load [0x00] // YRoT = -1 3) branch_1 4) b = load [0x04] // YRoT = -1 5) branch_2 6) c = a + b // YRoT = max(2, 4) = 4 > 3 7) d = load [c] // YRoT = 4 > 3

program order

90

slide-80
SLIDE 80

Microarchitecture Design of STT

  • Each instruction has its “Youngest Root of Taint”

(YRoT)

For each (transmit) instruction: Input is secret  YRoT is still speculative  Visibility point is ahead of YRoT

1) branch_0 2) a = load [0x00] // YRoT = -1 3) branch_1 4) b = load [0x04] // YRoT = -1 5) branch_2 6) c = a + b // YRoT = max(2, 4) = 4 < 5 7) d = load [c] // YRoT = 4 < 5

program order

VP

91

slide-81
SLIDE 81

Efficient Implementation of Tainting/Untainting Logic

Observation: All instructions turn non-speculative in-order Each instruction tracks the “youngest access instruction” it depends on -- “Youngest Root of Taint” (YRoT) For each instruction: Input is tainted  Input depends on some speculative access instruction  YRoT is still speculative  Visibility point is ahead of YRoT

19

Introduction Speculative Taint Tracking Evaluation Conclusion YRoT of 7 is 4

1) branch 2) a = load [0x00] 3) branch 4) b = load [0x04] 5) branch 6) c = a + b 7) load [c] program order

speculative Visibility point (VP) Execute! TODO: remove this

slide-82
SLIDE 82

Security Evaluation

Arbitrary speculative execution can

  • nly leak retired register file state

(not arbitrary program memory)

93

slide-83
SLIDE 83

Security Evaluation

Arbitrary speculative execution can

  • nly leak retired register file state

(not arbitrary program memory)

The Universal Read Gadget == many Spectre variants (1, 3, 4, ..), MDS attacks, Meltdown, etc.

94

slide-84
SLIDE 84

Security Evaluation

STT enforces a non-interference property w.r.t speculatively accessed data:

time Retired Will eventually retire Will eventually squash time = t Processor state @ t

95

slide-85
SLIDE 85

Security Evaluation

STT enforces a non-interference property w.r.t speculatively accessed data:

time Retired Will eventually retire time = t Processor state @ t Will eventually squash

96