Safecracker: Leaking Secrets through Compressed Caches Po-An Tsai, - - PowerPoint PPT Presentation

safecracker leaking secrets through compressed caches
SMART_READER_LITE
LIVE PREVIEW

Safecracker: Leaking Secrets through Compressed Caches Po-An Tsai, - - PowerPoint PPT Presentation

Safecracker: Leaking Secrets through Compressed Caches Po-An Tsai, Andres Sanchez, Christopher Fletcher, and Daniel Sanchez ASPLOS 2020 Executive Summary 2 First security analysis of cache compression Executive Summary 2 First security


slide-1
SLIDE 1

Po-An Tsai, Andres Sanchez, Christopher Fletcher, and Daniel Sanchez ASPLOS 2020

Safecracker: Leaking Secrets through Compressed Caches

slide-2
SLIDE 2

Executive Summary

2

 First security analysis of cache compression

slide-3
SLIDE 3

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data

slide-4
SLIDE 4

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

slide-5
SLIDE 5

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

slide-6
SLIDE 6

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim

slide-7
SLIDE 7

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim Secret key Attacker-controlled input

0x01020304050607 0x01 2 Victim stores input next to key

slide-8
SLIDE 8

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim Secret key Attacker-controlled input

0x01020304050607 0x01 2 Victim stores input next to key 7B cache line

Cache compresses line

slide-9
SLIDE 9

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim Secret key Attacker-controlled input

0x01020304050607 0x01 2 Victim stores input next to key 7B cache line

Cache compresses line

3 Attacker measures line’s

compressed size, infers 0x01 is in the secret data

slide-10
SLIDE 10

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim Secret key Attacker-controlled input

0x01020304050607 0x01 2 Victim stores input next to key 7B cache line

Cache compresses line

3 Attacker measures line’s

compressed size, infers 0x01 is in the secret data

Compromises secret key in ~10ms

slide-11
SLIDE 11

Executive Summary

2

 First security analysis of cache compression  Compressibility of a cache line reveals info about its data  Attacker can exploit data colocation to leak secrets

Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim Secret key Attacker-controlled input

0x01020304050607 0x01 2 Victim stores input next to key 7B cache line

Cache compresses line

3 Attacker measures line’s

compressed size, infers 0x01 is in the secret data

Compromises secret key in ~10ms Leaks large fraction of victim memory when combined latent memory safety vulnerabilities

slide-12
SLIDE 12

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Kiriansky et. al, MICRO’18

slide-13
SLIDE 13

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Speculation-based cache side channel attacks (e.g., Spectre)

Kiriansky et. al, MICRO’18

slide-14
SLIDE 14

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Speculation-based cache side channel attacks (e.g., Spectre) Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-15
SLIDE 15

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-16
SLIDE 16

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Timing difference to infer a line’s presence Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-17
SLIDE 17

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Compressed cache attacks Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Timing difference to infer a line’s presence Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-18
SLIDE 18

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Compressed cache attacks Compressibility of secret (and data in same line) Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Timing difference to infer a line’s presence Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-19
SLIDE 19

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Compressed cache attacks Writing secret data (or data in same line) Compressibility of secret (and data in same line) Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Timing difference to infer a line’s presence Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-20
SLIDE 20

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Compressed cache attacks Writing secret data (or data in same line) Timing difference to infer a line’s compressibility Compressibility of secret (and data in same line) Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Timing difference to infer a line’s presence Presence of a line and its address (location in cache)

Kiriansky et. al, MICRO’18

slide-21
SLIDE 21

Speculation-Based vs. Compressed Cache Side-Channel Attacks

3 Victim’s protection domain Secret Transmitter Attacker’s protection domain Secret Receiver Side channel

Compressed cache attacks Writing secret data (or data in same line) Timing difference to infer a line’s compressibility Compressibility of secret (and data in same line) Speculation-based cache side channel attacks (e.g., Spectre) Speculatively executed instructions Timing difference to infer a line’s presence Presence of a line and its address (location in cache)

Compressed cache attacks leak data without relying on speculation

Kiriansky et. al, MICRO’18

slide-22
SLIDE 22

Outline

4

 Background on cache compression  Pack+Probe: Measuring cache line compressibility  Safecracker: Exploiting data colocation to leak secrets  Potential defenses

slide-23
SLIDE 23

Cache Compression Tradeoffs

5

 Higher effective capacity  Higher hit rate  Somewhat higher hit latency

slide-24
SLIDE 24

Cache Compression Tradeoffs

5

 Higher effective capacity  Higher hit rate  Somewhat higher hit latency  Highly beneficial for large caches (e.g., LLC)

L3 Cache

slide-25
SLIDE 25

Cache Compression Tradeoffs

5

 Higher effective capacity  Higher hit rate  Somewhat higher hit latency  Highly beneficial for large caches (e.g., LLC)  Intense research activity over past 15 years

L3 Cache

slide-26
SLIDE 26

Cache Compression Tradeoffs

5

 Higher effective capacity  Higher hit rate  Somewhat higher hit latency  Highly beneficial for large caches (e.g., LLC)  Intense research activity over past 15 years

L3 Cache

slide-27
SLIDE 27

Cache Compression Tradeoffs

5

 Higher effective capacity  Higher hit rate  Somewhat higher hit latency  Highly beneficial for large caches (e.g., LLC)  Intense research activity over past 15 years

L3 Cache

All focus on performance, not security

slide-28
SLIDE 28

Cache Compression Ingredients

6

slide-29
SLIDE 29

Cache Compression Ingredients

6

 Architecture: How to locate and manage variable-

sized compressed blocks?

slide-30
SLIDE 30

Cache Compression Ingredients

6

 Architecture: How to locate and manage variable-

sized compressed blocks?

 Algorithm: How to compress each cache block?

slide-31
SLIDE 31

Cache Compression Ingredients

6

 Architecture: How to locate and manage variable-

sized compressed blocks?

 Algorithm: How to compress each cache block?  We focus attacks on a commonly used baseline:

 VSC compressed cache architecture  BDI compression algorithm

slide-32
SLIDE 32

Cache Compression Ingredients

6

 Architecture: How to locate and manage variable-

sized compressed blocks?

 Algorithm: How to compress each cache block?  We focus attacks on a commonly used baseline:

 VSC compressed cache architecture  BDI compression algorithm

 Attacks apply to other architectures & algorithms

 Leads to different characteristics about leaked data

slide-33
SLIDE 33

VSC [Alameldeen and Wood ISCA‘04]

7

 Conventional caches can only manage

fixed-size blocks

Tag0 Tag1 Data0 Data1 2-way set-associative cache 64 bytes

slide-34
SLIDE 34

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

Tag0 Tag1 Data array 128 bytes 8 bytes

slide-35
SLIDE 35

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

Tag0 Tag1 Data array 128 bytes 8 bytes

slide-36
SLIDE 36

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

Tag0 Tag1 Data array 128 bytes 8 bytes

slide-37
SLIDE 37

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

 VSC increases tags relative to uncompressed caches

to track more compressed lines per set

Tag0 Tag1 Data array 128 bytes 8 bytes

slide-38
SLIDE 38

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

 VSC increases tags relative to uncompressed caches

to track more compressed lines per set

Tag0 Tag1 Data array 128 bytes 8 bytes Tag2 Tag3

slide-39
SLIDE 39

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

 VSC increases tags relative to uncompressed caches

to track more compressed lines per set

Tag0 Tag1 Data array 128 bytes 8 bytes Tag2 Tag3

slide-40
SLIDE 40

VSC [Alameldeen and Wood ISCA‘04]

8

 VSC divides data array into small segments and lets

compressed lines take a variable number of segments

 VSC increases tags relative to uncompressed caches

to track more compressed lines per set

Tag0 Tag1 Data array 128 bytes 8 bytes Tag2 Tag3

slide-41
SLIDE 41

BDI [Pekhimenko et al. PACT‘12]

9

 Base-Delta-Immediate (BDI) compresses lines with similar values by using a

common base + small deltas

slide-42
SLIDE 42

BDI [Pekhimenko et al. PACT‘12]

9

 Base-Delta-Immediate (BDI) compresses lines with similar values by using a

common base + small deltas

 BDI supports multiple formats with different base sizes

(2, 4, 8 bytes) and delta sizes (1, 2, 4 bytes)

slide-43
SLIDE 43

BDI [Pekhimenko et al. PACT‘12]

9

 Base-Delta-Immediate (BDI) compresses lines with similar values by using a

common base + small deltas

 BDI supports multiple formats with different base sizes

(2, 4, 8 bytes) and delta sizes (1, 2, 4 bytes)

 Reasonable compression ratio, simple implementation

slide-44
SLIDE 44

Pack+Probe: Measuring Compressibility

10

 Threat model:

 Attacker and victim run in different protection domains

(processes, VMs, etc.)

 Attacker and victim share compressed cache  Attacker knows compressed cache architecture &

algorithm used

 Attacker knows set of victim’s target line

(can use standard techniques to find it)

Core Core L2 L2 Compressed LLC Main Memory

slide-45
SLIDE 45

Pack+Probe: Measuring Compressibility

10

 Threat model:

 Attacker and victim run in different protection domains

(processes, VMs, etc.)

 Attacker and victim share compressed cache  Attacker knows compressed cache architecture &

algorithm used

 Attacker knows set of victim’s target line

(can use standard techniques to find it)

 Goal: Find compressed size of target line

Core Core L2 L2 Compressed LLC Main Memory

slide-46
SLIDE 46

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least one free tag

slide-47
SLIDE 47

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least one free tag

Tag0 Tag1 Data array Tag2 Tag3

slide-48
SLIDE 48

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least one free tag

Tag0 Tag1 Data array Tag2 Tag3

S=4

slide-49
SLIDE 49

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least one free tag After victim accesses target set, attacker probes all lines used to pack target set

  • All hits  Victim line ≤ S segments
  • Any miss  Victim line > S segments

Tag0 Tag1 Data array Tag2 Tag3

S=4

slide-50
SLIDE 50

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least one free tag After victim accesses target set, attacker probes all lines used to pack target set

  • All hits  Victim line ≤ S segments
  • Any miss  Victim line > S segments

Tag0 Tag1 Data array Tag2 Tag3 Tag0 Tag1 Data array Tag2 Tag3

S=4

slide-51
SLIDE 51

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least one free tag After victim accesses target set, attacker probes all lines used to pack target set

  • All hits  Victim line ≤ S segments
  • Any miss  Victim line > S segments

Tag0 Tag1 Data array Tag2 Tag3 Tag0 Tag1 Data array Tag2 Tag3

S=4 Miss  Victim > 4 segments

slide-52
SLIDE 52

Pack+Probe: Measuring Compressibility

11

Attacker packs target set with lines of known sizes, leaving S free segments and at least

  • ne free tag

After victim accesses target set, attacker probes all lines used to pack target set

  • All hits  Victim line ≤ S segments
  • Any miss  Victim line > S segments

By doing a binary search over S, one can find exact size in log2(MaxSegmentsPerCacheLine) measurements

Tag0 Tag1 Data array Tag2 Tag3 Tag0 Tag1 Data array Tag2 Tag3

S=4 Miss  Victim > 4 segments

slide-53
SLIDE 53

Safecracker: Exploiting Data Colocation to Leak Secrets

12

 Threat model:

 Attacker and victim run in different domains,

share compressed cache (as in Pack+Probe)

 Attacker can get victim to collocate attacker-controlled data

near victim’s own secret data

 Goal: Leak victim’s data

Core Core L2 L2 Compressed LLC Main Memory

encrypt 0x01…

Pack+Probe

slide-54
SLIDE 54

Safecracker: Exploiting Data Colocation to Leak Secrets

12

 Threat model:

 Attacker and victim run in different domains,

share compressed cache (as in Pack+Probe)

 Attacker can get victim to collocate attacker-controlled data

near victim’s own secret data

 Goal: Leak victim’s data  Multiple colocation vectors:

 Victim itself colocates (contiguous allocation, stack spills, etc.)  Memory safety violations (buffer overflows, heap spraying, etc.)

Core Core L2 L2 Compressed LLC Main Memory

encrypt 0x01…

Pack+Probe

slide-55
SLIDE 55

Safecracker: Exploiting Data Colocation to Leak Secrets

12

 Threat model:

 Attacker and victim run in different domains,

share compressed cache (as in Pack+Probe)

 Attacker can get victim to collocate attacker-controlled data

near victim’s own secret data

 Goal: Leak victim’s data  Multiple colocation vectors:

 Victim itself colocates (contiguous allocation, stack spills, etc.)  Memory safety violations (buffer overflows, heap spraying, etc.)

 Safecracker changes attacker-controlled data to reveal

nearby secret data through changes in compressibility

 Search strategy depends on compression algorithm

Core Core L2 L2 Compressed LLC Main Memory

encrypt 0x01…

Pack+Probe

slide-56
SLIDE 56

Safecracker on BDI

13

 Starting from largest delta, sweep high-order bytes until target line

decreases in size

slide-57
SLIDE 57

Safecracker on BDI

13

 Starting from largest delta, sweep high-order bytes until target line

decreases in size

0x00000000 0x00000000 0x0F00BA20

32B Compressed size

Secret data Attacker-controlled input

slide-58
SLIDE 58

Safecracker on BDI

13

 Starting from largest delta, sweep high-order bytes until target line

decreases in size

0x00000000 0x00000000 0x0F00BA20

0x00010000 0x00010000 0x0F00BA20

32B 32B Compressed size

Secret data Attacker-controlled input

slide-59
SLIDE 59

Safecracker on BDI

13

 Starting from largest delta, sweep high-order bytes until target line

decreases in size

0x00000000 0x00000000 0x0F00BA20

0x00010000 0x00010000 0x0F00BA20

32B

32B Compressed size

0x0F000000 0x0F000000 0x0F00BA20

Secret data Attacker-controlled input

slide-60
SLIDE 60

Safecracker on BDI

13

 Starting from largest delta, sweep high-order bytes until target line

decreases in size

0x00000000 0x00000000 0x0F00BA20

0x00010000 0x00010000 0x0F00BA20

32B

32B Compressed size

0x0F000000 0x0F000000 0x0F00BA20

20B !

0x0F000000 0000 0000 0000 0000 0000 0000 0000 BA20

4B base 2B deltas

Secret data Attacker-controlled input

slide-61
SLIDE 61

Safecracker on BDI

14

 Continue sweeping lower-order bytes until recovering all bytes

slide-62
SLIDE 62

Safecracker on BDI

14

 Continue sweeping lower-order bytes until recovering all bytes

Secret data Attacker-controlled input …

0x0F000100 0x0F000100 0x0F00BA20

20B Compressed size

slide-63
SLIDE 63

Safecracker on BDI

14

 Continue sweeping lower-order bytes until recovering all bytes

Secret data Attacker-controlled input …

0x0F000100 0x0F000100 0x0F00BA20

0x0F00BA00 0x0F00BA00 0x0F00BA20

12B 20B Compressed size …

slide-64
SLIDE 64

Safecracker on BDI

14

 Continue sweeping lower-order bytes until recovering all bytes

Secret data Attacker-controlled input …

0x0F000100 0x0F000100 0x0F00BA20

0x0F00BA00 0x0F00BA00 0x0F00BA20

12B … 20B Compressed size …

0x0F00BA20 0x0F00BA20 0x0F00BA20

8B …

slide-65
SLIDE 65

Safecracker on BDI

14

 Continue sweeping lower-order bytes until recovering all bytes  BDI allows recovering up to 8 bytes this way

Secret data Attacker-controlled input …

0x0F000100 0x0F000100 0x0F00BA20

0x0F00BA00 0x0F00BA00 0x0F00BA20

12B … 20B Compressed size …

0x0F00BA20 0x0F00BA20 0x0F00BA20

8B … Secret Size Compression Format Sequence Attempts 2B NoComp→B2D1→B8D0 O(28) 4B NoComp→B4D2→B4D1→B8D0 O(216) 8B NoComp→B8D4→B8D2→B8D1→B8D0 O(232)

slide-66
SLIDE 66

 Buffer overflows let Safecracker control where attacker-

controlled data is located

 Makes search more efficient  Can leak data far away from buffer

Enhancing Safecracker w/ buffer overflows

15

slide-67
SLIDE 67

 Buffer overflows let Safecracker control where attacker-

controlled data is located

 Makes search more efficient  Can leak data far away from buffer

 With BDI, can leak 1/8th of victim’s memory!

 Other compression algorithms (e.g., RLE) allow more leakage

Enhancing Safecracker w/ buffer overflows

15

slide-68
SLIDE 68

Safecracker Evaluation

16

 Microarchitectural simulation using zsim  Multicore system modeled after Skylake

Core Core L2 L2 Compressed LLC Main Memory 8MB VSC with 64-byte lines, 2x tag array, 32 tags/set BDI compression

slide-69
SLIDE 69

Safecracker Evaluation

16

 Microarchitectural simulation using zsim  Multicore system modeled after Skylake  Two Proof-of-Concept (PoC) workloads:

 Login server that colocates key and attacker data  Server with buffer overflow + key elsewhere in stack Core Core L2 L2 Compressed LLC Main Memory 8MB VSC with 64-byte lines, 2x tag array, 32 tags/set BDI compression

slide-70
SLIDE 70

Safecracker steals secrets quickly

17

PoC 1: Fixed colocation

slide-71
SLIDE 71

Safecracker steals secrets quickly

17

PoC 1: Fixed colocation Leaks 4B in under 100ms, 6B in 200ms (comparable to time spent finding target set)

slide-72
SLIDE 72

Safecracker steals secrets quickly

17

PoC 1: Fixed colocation Leaks 4B in under 100ms, 6B in 200ms (comparable to time spent finding target set) 8B would take much longer (~90 hours)

slide-73
SLIDE 73

Safecracker steals secrets quickly

17

PoC 1: Fixed colocation Leaks 4B in under 100ms, 6B in 200ms (comparable to time spent finding target set) 8B would take much longer (~90 hours) PoC 2: Buffer overflow

slide-74
SLIDE 74

Safecracker steals secrets quickly

17

PoC 1: Fixed colocation Leaks 4B in under 100ms, 6B in 200ms (comparable to time spent finding target set) 8B would take much longer (~90 hours) PoC 2: Buffer overflow Leaks 8B in ~10ms Attack time grows linearly with leaked bytes

slide-75
SLIDE 75

Generalizing attacks to other compressed caches

18

 Most compressed cache architectures allow conflicts among a small set of

lines  Pack+Probe still applies

slide-76
SLIDE 76

Generalizing attacks to other compressed caches

18

 Most compressed cache architectures allow conflicts among a small set of

lines  Pack+Probe still applies

 See paper for more discussions

slide-77
SLIDE 77

Generalizing attacks to other compressed caches

18

 Most compressed cache architectures allow conflicts among a small set of

lines  Pack+Probe still applies

 See paper for more discussions

 Compressibility always leaks information about data

 More info the better the compression algorithm is

slide-78
SLIDE 78

Generalizing attacks to other compressed caches

18

 Most compressed cache architectures allow conflicts among a small set of

lines  Pack+Probe still applies

 See paper for more discussions

 Compressibility always leaks information about data

 More info the better the compression algorithm is  Adaptive compression algorithms use shared state

slide-79
SLIDE 79

Generalizing attacks to other compressed caches

18

 Most compressed cache architectures allow conflicts among a small set of

lines  Pack+Probe still applies

 See paper for more discussions

 Compressibility always leaks information about data

 More info the better the compression algorithm is  Adaptive compression algorithms use shared state

 additional attack vector

slide-80
SLIDE 80

Defense against cache compression attacks

19

slide-81
SLIDE 81

Defense against cache compression attacks

19

 Cache partitioning for isolation

 Prevents attacks without software changes  Invasive: must partition both tag and data arrays

slide-82
SLIDE 82

Defense against cache compression attacks

19

 Cache partitioning for isolation

 Prevents attacks without software changes  Invasive: must partition both tag and data arrays

 Performance distribution of 25 mixes of 4 SPEC CPU2006 apps, using no and

static partitioning:

slide-83
SLIDE 83

Defense against cache compression attacks

19

 Cache partitioning for isolation

 Prevents attacks without software changes  Invasive: must partition both tag and data arrays

 Performance distribution of 25 mixes of 4 SPEC CPU2006 apps, using no and

static partitioning:

Partitioning increases fragmentation in VSC, reduces effective compression ratio

slide-84
SLIDE 84

See paper for more!

20

 Other possible defenses for compressed cache attacks  Examples of vulnerable apps due to colocation with attacker-controlled data  Discussion on generalizing attacks to other compressed caches  Artifact description

slide-85
SLIDE 85

Conclusions

21

 Compressed caches introduce new side channel & attacks

slide-86
SLIDE 86

Conclusions

21

 Compressed caches introduce new side channel & attacks  Pack+Probe exploits compressed cache architectures to observe compressibility of

victim’s lines

slide-87
SLIDE 87

Conclusions

21

 Compressed caches introduce new side channel & attacks  Pack+Probe exploits compressed cache architectures to observe compressibility of

victim’s lines

 Safecracker exploits compression algorithms + colocation of attacker-controlled &

secret data to leak data quickly

 Can leak a large fraction of program data  Potentially as damaging as speculation-based attacks

slide-88
SLIDE 88

Conclusions

21

 Compressed caches introduce new side channel & attacks  Pack+Probe exploits compressed cache architectures to observe compressibility of

victim’s lines

 Safecracker exploits compression algorithms + colocation of attacker-controlled &

secret data to leak data quickly

 Can leak a large fraction of program data  Potentially as damaging as speculation-based attacks

 Defenses have drawbacks

 Motivates future work on efficient defenses

slide-89
SLIDE 89

THANK YOU FOR WATCHING! SHARE YOUR QUESTIONS/COMMENTS WITH US!

22 Attacker Victim

encrypt 0x01… 1

Attacker sends encryption request to victim Secret key Attacker-controlled input

0x01020304050607 0x01 2 Victim stores input next to key 7B cache line

Cache compresses line

3 Attacker measures line’s

compressed size, infers 0x01 is in the secret data

Compromises secret key in ~10ms

Safecracker: Leaking Secrets through Compressed Caches