Time Protection: The Missing OS Abstraction Qian Ge, Yuval Yarom, - - PowerPoint PPT Presentation

time protection the missing os abstraction
SMART_READER_LITE
LIVE PREVIEW

Time Protection: The Missing OS Abstraction Qian Ge, Yuval Yarom, - - PowerPoint PPT Presentation

Time Protection: The Missing OS Abstraction Qian Ge, Yuval Yarom, Tom Chothia, Gernot Heiser qian.ge@data61.csiro.au www.data61.csiro.au Top secret Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au 2 Enforcing time


slide-1
SLIDE 1

www.data61.csiro.au

Time Protection: The Missing OS Abstraction

Qian Ge, Yuval Yarom, Tom Chothia, Gernot Heiser

qian.ge@data61.csiro.au

slide-2
SLIDE 2

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

2

Top secret

slide-3
SLIDE 3

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Enforcing time protection at the OS level

3

Security Domain Security Domain

Sending information through timing

slide-4
SLIDE 4

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Enforcing time protection at the OS level

3

Security Domain Security Domain

Sending information through timing

slide-5
SLIDE 5

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Enforcing time protection at the OS level

3

Security Domain Security Domain

Sending information through timing

slide-6
SLIDE 6

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Microarchitectural Timing Channels

Shared hardware caches

Security Domain Security Domain

4

slide-7
SLIDE 7

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Microarchitectural Timing Channels

Shared hardware caches

Security Domain Security Domain

4

Welcome to Dresden

slide-8
SLIDE 8

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Microarchitectural Timing Channels

Shared hardware caches

Security Domain Security Domain

4

Welcome to Dresden

slide-9
SLIDE 9

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Microarchitectural Timing Channels

Shared hardware caches

Security Domain Security Domain

4

Welcome to Dresden

slide-10
SLIDE 10

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Microarchitectural Timing Channels

Shared hardware caches

Security Domain Security Domain

Fast Fast Slow Fast Fast ….. S F S FFF SSSS F

Not English, but our protocol…

4

Welcome to Dresden

slide-11
SLIDE 11

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Contention, Contention, Contention…

Shared hardware caches

  • Contention leaks information via

timing

  • Caches:
  • capacity-limited
  • stateful
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

5

slide-12
SLIDE 12

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Contention, Contention, Contention…

Shared hardware caches

  • Contention leaks information via

timing

  • Caches:
  • capacity-limited
  • stateful
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

Any state-holding microarchitectural feature:

  • Caches, branch predictor, TLB

5

slide-13
SLIDE 13

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Preventing Contention by Partitioning

Security Domain Security Domain

Partitioned caches

slide-14
SLIDE 14

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Spatial Partitioning

Cache RAM

Cache Memory

Cache colouring:

  • Distributing coloured cache sets

to coloured memory frames

  • Memory management policy

7

slide-15
SLIDE 15

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Spatial Partitioning

Cache RAM

Cache Memory

Cache colouring:

  • Distributing coloured cache sets

to coloured memory frames

  • Memory management policy

7

Shared hardware caches

Partition security domains on disjoint cache sets

slide-16
SLIDE 16

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Spatial Partitioning

Cache RAM

Cache Memory

Cache colouring:

  • Distributing coloured cache sets

to coloured memory frames

  • Memory management policy
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

7

Shared hardware caches

Partition security domains on disjoint cache sets

slide-17
SLIDE 17

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Spatial Partitioning

Cache RAM

Cache Memory

Cache colouring:

  • Distributing coloured cache sets

to coloured memory frames

  • Memory management policy
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

7

Shared hardware caches

Partition security domains on disjoint cache sets

slide-18
SLIDE 18

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Spatial Partitioning

Cache RAM

Cache Memory

Cache colouring:

  • Distributing coloured cache sets

to coloured memory frames

  • Memory management policy
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

Cannot be supported by on-core caches

7

Shared hardware caches

Partition security domains on disjoint cache sets

slide-19
SLIDE 19

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Temporal Partitioning

Flushing on-core caches:

  • Resetting states

Shared on-caches

Context switch

8

slide-20
SLIDE 20

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Temporal Partitioning

Flushing on-core caches:

  • Resetting states
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

Shared on-caches

Context switch

8

slide-21
SLIDE 21

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Temporal Partitioning

Flushing on-core caches:

  • Resetting states
  • Resulting on temporal

interference during:

  • time-shared access
  • concurrent access

Shared on-caches

Context switch

8

slide-22
SLIDE 22

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Preventing Temporal Interference through Partitioning

Spatial partitioning

Security Domain Security Domain

Context

Temporal partitioning

9

slide-23
SLIDE 23

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Wait, Everyone Shares the Kernel….

Security Domain Security Domain

10

Shared hardware caches

Kernel Services

A shared partition

slide-24
SLIDE 24

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Wait, Everyone Shares the Kernel….

Security Domain Security Domain

Cache lines used by the kernel collide with Spy’s partition

10

Shared hardware caches

Kernel Services

A shared partition

slide-25
SLIDE 25

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Wait, Everyone Shares the Kernel….

Security Domain Security Domain

Cache lines used by the kernel collide with Spy’s partition

10

Shared hardware caches

Kernel Services

A shared partition

Poster Session @ 17:15

slide-26
SLIDE 26

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Wait, Everyone Shares the Kernel….

Security Domain Security Domain

Cache lines used by the kernel collide with Spy’s partition

Fast Fast Slow Fast Fast ….. S F S FFF SSSS F

10

Shared hardware caches

Kernel Services

A shared partition

Poster Session @ 17:15

slide-27
SLIDE 27

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Kernel Services

11

slide-28
SLIDE 28

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Cloning the Kernel Image

.text .rodata .data

Analysing the kernel sections

12

slide-29
SLIDE 29

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Cloning the Kernel Image

.text .rodata .data

Analysing the kernel sections

.text .rodata .data

Global (9KiB)

Maintaining coherency Duplicated sections

12

slide-30
SLIDE 30

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Cloning the Kernel Image

.text .rodata .data

Analysing the kernel sections

.text .rodata .data

Global (9KiB)

Maintaining coherency Duplicated sections

Kernel Clone: Generating a copy of the kernel image with user-level managed memory

12

slide-31
SLIDE 31

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Cloning the Kernel Image

.text .rodata .data

Analysing the kernel sections

.text .rodata .data

Global (9KiB)

Maintaining coherency Duplicated sections

Kernel Clone: Generating a copy of the kernel image with user-level managed memory

12

slide-32
SLIDE 32

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Dedicated Kernel Images

Spatial partitioning

Security Domain Security Domain

Context

Temporal partitioning

Shared Global Data

Deterministic usage

13

slide-33
SLIDE 33

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Timing Channel through the Shared Kernel

14

Raw channel

seL4 system call

Input (taking seL4 syscall)

Channel matrix: conditional probability

  • f observing the output signal (time,

spy) given the input signal (system-call number, Trojan) Horizontal variation indicates a channel

Output (cycles)

slide-34
SLIDE 34

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Timing Channel through the Shared Kernel

14

Raw channel

seL4 system call

Input (taking seL4 syscall)

Channel matrix: conditional probability

  • f observing the output signal (time,

spy) given the input signal (system-call number, Trojan) Horizontal variation indicates a channel

Output (cycles)

Prevented by cloned kernel

Input (taking seL4 syscall) Output (cycles)

slide-35
SLIDE 35

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

How realistic is cloning?

x86 Arm 224 KiB 120 KiB

Memory consumption

Arch seL4 Clone Linux fork + exec x86 79 μs 257 μs Arm 608 μs 4,300 μs

Efficiency

.text .rodata .data

Global (9KiB)

15

slide-36
SLIDE 36

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Performance Impact

  • 1%

0% 1% 2% 3% 4% 5% 6% 7% b a r n e s c h

  • l

e s k y f f t f m m l u

  • c

e a n r a d i

  • s

i t y r a d i x r a y t r a c e w a t e r n s q u a r e d w a t e r s p a t i a l M E A N Slowdown 50% colours base 50% colour clone

The slowdown of splash-2 against base line kernel

The cost of colouring a domain:

  • 50% of the cache colour
  • 50% of the cache colour + a coloured kernel

16

slide-37
SLIDE 37

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Performance Impact

x86 Arm 3.38% 1.09%

The geometric mean

The cost of time protection:

  • spatial partition + temporal

partition

  • 1%

0% 1% 2% 3% 4% 5% 6% 7% b a r n e s c h

  • l

e s k y f f t f m m l u

  • c

e a n r a d i

  • s

i t y r a d i x r a y t r a c e w a t e r n s q u a r e d w a t e r s p a t i a l M E A N Slowdown 50% colours base 50% colour clone

The slowdown of splash-2 against base line kernel

The cost of colouring a domain:

  • 50% of the cache colour
  • 50% of the cache colour + a coloured kernel

16

slide-38
SLIDE 38

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

We have also done:

  • Partition IRQs
  • Domain-switch actions
  • A deterministic domain switching latency
  • Preventing timing channels:
  • Shared kernel, Intra-core, cross-core, domain-switch latency, timer
  • Performance evaluation:
  • IPC, domain switching latency, kernel cloning, cache colouring, time protection

17

slide-39
SLIDE 39

Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au

Summary

  • Define temporal isolation as a mandatory (black-box mechanisms) enforcement

provided by the OS.

  • Time protection for preventing microarchitectural timing channels
  • Effective on closing studied timing channels
  • Low overhead

18

slide-40
SLIDE 40

www.data61.csiro.au

Trustworthy Systems Qian Ge
 PhD candidate e qian.ge@data61.csiro.au w https://ts.data61.csiro.au/projects/TS/ timingchannels/

THANK YOU

19