meltdown & spectre - qualcomm

206
Side-channels considered hARMful Moritz Lipp (@mlqxyz) Meltdown & Spectre Qualcomm Mobile Security Summit 2018 17 May, 2018 - San Diego, CA Michael Schwarz (@misc0110)

Upload: others

Post on 23-Nov-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Meltdown & Spectre - Qualcomm

Side-channels considered hARMful

Moritz Lipp (@mlqxyz)

Meltdown & Spectre

Qualcomm Mobile Security Summit 2018

17 May, 2018 - San Diego, CA

Michael Schwarz (@misc0110)

Page 2: Meltdown & Spectre - Qualcomm

Flashback www.tugraz.at

Qualcomm Mobile

Security Summit

2017

2 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 3: Meltdown & Spectre - Qualcomm

Flashback: Side-channel attacks www.tugraz.at

• Safe software infrastructure does not mean safe execution

• Information leaks because of the underlying hardware

• Side-channel attacks exploit unintentional information leakage

by side-effects

• Power consumption

• Execution time

• CPU cache

• . . .

• Performance optimizations often induce side-channel leakage

3 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 4: Meltdown & Spectre - Qualcomm

Outline www.tugraz.at

Last year

• Leaking keystroke timings via the cache

• Leaking AES keys from the cache

• Covertly sending data through the cache

• Rowhammer: flipping bits in DRAM

This year

• More leakage!

• Build upon the tools of last year

• Leaking arbitrary memory content

• Leaking privileged register content

4 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 5: Meltdown & Spectre - Qualcomm

Outline www.tugraz.at

Last year

• Leaking keystroke timings via the cache

• Leaking AES keys from the cache

• Covertly sending data through the cache

• Rowhammer: flipping bits in DRAM

This year

• More leakage!

• Build upon the tools of last year

• Leaking arbitrary memory content

• Leaking privileged register content

4 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 6: Meltdown & Spectre - Qualcomm

Whoami www.tugraz.at

Moritz Lipp

PhD student @ Graz University of Technology

7 @mlqxyz

R [email protected]

5 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 7: Meltdown & Spectre - Qualcomm

Whoami www.tugraz.at

Michael Schwarz

PhD student @ Graz University of Technology

7 @misc0110

R [email protected]

6 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 8: Meltdown & Spectre - Qualcomm

Let’s Read Kernel Memory from

User Space!

Page 9: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Find something human readable, e.g., the Linux version

# sudo grep linux_banner /proc/kallsyms

ffffffff81a000e0 R linux_banner

7 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 10: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

char data = *(char*) 0xffffffff81a000e0;

printf("%c\n", data);

8 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 11: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Compile and run

segfault at ffffffff81a000e0 ip 0000000000400535

sp 00007ffce4a80610 error 5 in reader

• Kernel addresses are of course not accessible

• Any invalid access throws an exception → segmentation fault

9 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 12: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Compile and run

segfault at ffffffff81a000e0 ip 0000000000400535

sp 00007ffce4a80610 error 5 in reader

• Kernel addresses are of course not accessible

• Any invalid access throws an exception → segmentation fault

9 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 13: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Compile and run

segfault at ffffffff81a000e0 ip 0000000000400535

sp 00007ffce4a80610 error 5 in reader

• Kernel addresses are of course not accessible

• Any invalid access throws an exception → segmentation fault

9 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 14: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Just catch the segmentation fault!

• We can simply install a signal handler

• And if an exception occurs, just jump back and continue

• Then we can read the value

• Sounds like a good idea

10 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 15: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Just catch the segmentation fault!

• We can simply install a signal handler

• And if an exception occurs, just jump back and continue

• Then we can read the value

• Sounds like a good idea

10 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 16: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Just catch the segmentation fault!

• We can simply install a signal handler

• And if an exception occurs, just jump back and continue

• Then we can read the value

• Sounds like a good idea

10 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 17: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Just catch the segmentation fault!

• We can simply install a signal handler

• And if an exception occurs, just jump back and continue

• Then we can read the value

• Sounds like a good idea

10 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 18: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Just catch the segmentation fault!

• We can simply install a signal handler

• And if an exception occurs, just jump back and continue

• Then we can read the value

• Sounds like a good idea

10 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 19: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Still no kernel memory

• Privilege checks seem to work

• Maybe it is not that straight forward

• Back to the drawing board

11 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 20: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Still no kernel memory

• Privilege checks seem to work

• Maybe it is not that straight forward

• Back to the drawing board

11 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 21: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Still no kernel memory

• Privilege checks seem to work

• Maybe it is not that straight forward

• Back to the drawing board

11 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 22: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Still no kernel memory

• Privilege checks seem to work

• Maybe it is not that straight forward

• Back to the drawing board

11 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 23: Meltdown & Spectre - Qualcomm

Caches and Cache Attacks

Page 24: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);

printf("%d", i);

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 25: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss

printf("%d", i);

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 26: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss Request

printf("%d", i);

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 27: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss Request

Response

printf("%d", i);

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 28: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss Request

Responsei

printf("%d", i);

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 29: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss Request

Responsei

printf("%d", i);

Cache hit

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 30: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss Request

Responsei

printf("%d", i);

Cache hit

DRAM access,slow

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 31: Meltdown & Spectre - Qualcomm

CPU Cache www.tugraz.at

printf("%d", i);Cache

miss Request

Responsei

printf("%d", i);

Cache hit

No DRAM access,

much faster

DRAM access,slow

12 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 32: Meltdown & Spectre - Qualcomm

Memory Access Latency www.tugraz.at

0 100 200 300 400 500 600 700 800 900 1,000 1,100 1,200

1

2

3

·104

Measured access time (CPU cycles)

Nu

mb

erof

acce

sses

Cache hit

Cache miss

13 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 33: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 34: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER

Shared Memory

cached

cached

VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 35: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER

Shared Memory

VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 36: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 37: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 38: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER

Shared Memory

VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 39: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER

Shared Memory

VICTIM

flushaccess

access

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 40: Meltdown & Spectre - Qualcomm

Flush+Reload www.tugraz.at

Shared Memory

ATTACKER

Shared Memory

VICTIM

flushaccess

access

fast if victim accessed data,slow otherwise

14 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 41: Meltdown & Spectre - Qualcomm

Operating Systems 101

Page 42: Meltdown & Spectre - Qualcomm

Memory Isolation www.tugraz.at

• Kernel is isolated from user space

• This isolation is a combination of

hardware and software

• User applications cannot access

anything from the kernel

• There is only a well-defined

interface called system calls

Userspace Kernelspace

ApplicationsOperatingSystem Memory

15 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 43: Meltdown & Spectre - Qualcomm

Out-of-order Execution

Page 44: Meltdown & Spectre - Qualcomm

Out-of-order Execution www.tugraz.at

int width = 10, height = 5;

float diagonal = sqrt(width * width

+ height * height);

int area = width * height;

printf("Area %d x %d = %d\n", width, height, area);

16 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 45: Meltdown & Spectre - Qualcomm

Out-of-order Execution www.tugraz.at

int width = 10, height = 5;

float diagonal = sqrt(width * width

+ height * height);

int area = width * height;

printf("Area %d x %d = %d\n", width, height, area);

ParallelizeD

epen

denc

y

16 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 46: Meltdown & Spectre - Qualcomm

Out-of-order Execution www.tugraz.at

Exe

cutio

nE

ngin

e

Reorder buffer

µOP µOP µOP µOP µOP µOP µOP µOP

Scheduler

Execution Units

AL

U,A

ES,

...

AL

U,F

MA

,...

AL

U,V

ect,

...

AL

U,B

ranc

h

Loa

dda

ta

Loa

dda

ta

Stor

eda

ta

AG

U

µOP µOP µOP µOP µOP µOP µOP µOP

CDB

Mem

ory

Subs

yste

m Load Buffer Store Buffer

L1 Data CacheDTLB STLB

L2 Cache

Fron

tend

Allocation Queue

µOP µOP µOP µOP

MUX

4-Way Decode

µOP µOP µOP µOP

Instruction Queue

Instruction Fetch & PreDecode

µOP Cache

µOPs

BranchPredictor

L1 Instruction CacheITLB

• Instructions are fetched and decoded in the front-end

• Instructions are dispatched to the backend

• Instructions are processed by individual execution units

17 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 47: Meltdown & Spectre - Qualcomm

Out-of-order Execution www.tugraz.at

Exe

cutio

nE

ngin

e

Reorder buffer

µOP µOP µOP µOP µOP µOP µOP µOP

Scheduler

Execution Units

AL

U,A

ES,

...

AL

U,F

MA

,...

AL

U,V

ect,

...

AL

U,B

ranc

h

Loa

dda

ta

Loa

dda

ta

Stor

eda

ta

AG

U

µOP µOP µOP µOP µOP µOP µOP µOP

CDB

Mem

ory

Subs

yste

m Load Buffer Store Buffer

L1 Data CacheDTLB STLB

L2 Cache

Fron

tend

Allocation Queue

µOP µOP µOP µOP

MUX

4-Way Decode

µOP µOP µOP µOP

Instruction Queue

Instruction Fetch & PreDecode

µOP Cache

µOPs

BranchPredictor

L1 Instruction CacheITLB

• Instructions are executed out-of-order

• Instructions wait until their dependencies are ready

• Later instructions might execute prior earlier instructions

• Instructions retire in-order

• State becomes architecturally visible

18 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 48: Meltdown & Spectre - Qualcomm

Reading memory www.tugraz.at

• If an application reads memory, . . .

• . . . permissions are checked

• . . . data is loaded

• If an application tries to read inaccessible memory, . . .

• . . . an error occurs

• . . . application is stopped

• But what happens if the checks are reordered?

• Would we know?

19 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 49: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Adapted code

*(volatile char*)0;

array[84 * 4096] = 0;

• volatile because compiler was not happy

warning : s t a t e m e n t w i t h no e f f e c t [−Wunused−v a l u e ]

∗( c h a r ∗ ) 0 ;

• Static code analyzer is still not happy

warning : D e r e f e r e n c e o f n u l l p o i n t e r

∗( v o l a t i l e c h a r ∗ ) 0 ;

20 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 50: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Adapted code

*(volatile char*)0;

array[84 * 4096] = 0;

• volatile because compiler was not happy

warning : s t a t e m e n t w i t h no e f f e c t [−Wunused−v a l u e ]

∗( c h a r ∗ ) 0 ;

• Static code analyzer is still not happy

warning : D e r e f e r e n c e o f n u l l p o i n t e r

∗( v o l a t i l e c h a r ∗ ) 0 ;

20 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 51: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Adapted code

*(volatile char*)0;

array[84 * 4096] = 0;

• volatile because compiler was not happy

warning : s t a t e m e n t w i t h no e f f e c t [−Wunused−v a l u e ]

∗( c h a r ∗ ) 0 ;

• Static code analyzer is still not happy

warning : D e r e f e r e n c e o f n u l l p o i n t e r

∗( v o l a t i l e c h a r ∗ ) 0 ;

20 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 52: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Flush+Reload over all pages of the array

0 50 100 150 200 250

300

400

500

Page

Accesstime

[cycles]

• “Unreachable” code line was actually executed

• Exception was only thrown afterwards

21 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 53: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Flush+Reload over all pages of the array

0 50 100 150 200 250

300

400

500

Page

Accesstime

[cycles]

• “Unreachable” code line was actually executed

• Exception was only thrown afterwards

21 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 54: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Out-of-order instructions leave microarchitectural traces

• We can see them for example in the cache

• Give such instructions a name: transient instructions

• We can indirectly observe the execution of transient instructions

22 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 55: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Out-of-order instructions leave microarchitectural traces

• We can see them for example in the cache

• Give such instructions a name: transient instructions

• We can indirectly observe the execution of transient instructions

22 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 56: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Out-of-order instructions leave microarchitectural traces

• We can see them for example in the cache

• Give such instructions a name: transient instructions

• We can indirectly observe the execution of transient instructions

22 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 57: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Out-of-order instructions leave microarchitectural traces

• We can see them for example in the cache

• Give such instructions a name: transient instructions

• We can indirectly observe the execution of transient instructions

22 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 58: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Maybe there is no permission check in transient instructions...

• ...or it is only done when commiting them

• Add another layer of indirection to test

char data = *(char*) 0xffffffff81a000e0;

array[data * 4096] = 0;

• Then check whether any part of array is cached

23 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 59: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Maybe there is no permission check in transient instructions...

• ...or it is only done when commiting them

• Add another layer of indirection to test

char data = *(char*) 0xffffffff81a000e0;

array[data * 4096] = 0;

• Then check whether any part of array is cached

23 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 60: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Maybe there is no permission check in transient instructions...

• ...or it is only done when commiting them

• Add another layer of indirection to test

char data = *(char*) 0xffffffff81a000e0;

array[data * 4096] = 0;

• Then check whether any part of array is cached

23 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 61: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Maybe there is no permission check in transient instructions...

• ...or it is only done when commiting them

• Add another layer of indirection to test

char data = *(char*) 0xffffffff81a000e0;

array[data * 4096] = 0;

• Then check whether any part of array is cached

23 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 62: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Flush+Reload over all pages of the array

0 50 100 150 200 250

300

400

500

Page

Accesstime

[cycles]

• Index of cache hit reveals data

• Permission check is in some cases not fast enough

24 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 63: Meltdown & Spectre - Qualcomm

Building the Code www.tugraz.at

• Flush+Reload over all pages of the array

0 50 100 150 200 250

300

400

500

Page

Accesstime

[cycles]

• Index of cache hit reveals data

• Permission check is in some cases not fast enough

24 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 64: Meltdown & Spectre - Qualcomm

Meltdown www.tugraz.at

• Using out-of-order execution, we can read data at any address

• Privilege checks are sometimes too slow

• Allows to leak kernel memory

• Entire physical memory is typically also accessible in kernel address space

• Works on Intel CPUs and ARM Cortex-A75

25 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 65: Meltdown & Spectre - Qualcomm

Meltdown www.tugraz.at

• Using out-of-order execution, we can read data at any address

• Privilege checks are sometimes too slow

• Allows to leak kernel memory

• Entire physical memory is typically also accessible in kernel address space

• Works on Intel CPUs and ARM Cortex-A75

25 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 66: Meltdown & Spectre - Qualcomm

Meltdown www.tugraz.at

• Using out-of-order execution, we can read data at any address

• Privilege checks are sometimes too slow

• Allows to leak kernel memory

• Entire physical memory is typically also accessible in kernel address space

• Works on Intel CPUs and ARM Cortex-A75

25 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 67: Meltdown & Spectre - Qualcomm

Meltdown www.tugraz.at

• Using out-of-order execution, we can read data at any address

• Privilege checks are sometimes too slow

• Allows to leak kernel memory

• Entire physical memory is typically also accessible in kernel address space

• Works on Intel CPUs and ARM Cortex-A75

25 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 68: Meltdown & Spectre - Qualcomm

Meltdown www.tugraz.at

• Using out-of-order execution, we can read data at any address

• Privilege checks are sometimes too slow

• Allows to leak kernel memory

• Entire physical memory is typically also accessible in kernel address space

• Works on Intel CPUs and ARM Cortex-A75

25 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 69: Meltdown & Spectre - Qualcomm

Demo

Page 70: Meltdown & Spectre - Qualcomm

Can we fix that?

Page 71: Meltdown & Spectre - Qualcomm

Take the kernel addresses... www.tugraz.at

• Kernel addresses in user space are a problem

• Why don’t we take the kernel addresses...

26 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 72: Meltdown & Spectre - Qualcomm

Take the kernel addresses... www.tugraz.at

• Kernel addresses in user space are a problem

• Why don’t we take the kernel addresses...

26 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 73: Meltdown & Spectre - Qualcomm

...and remove them www.tugraz.at

• ...and remove them if not needed?

• User accessible check in hardware is not reliable

27 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 74: Meltdown & Spectre - Qualcomm

...and remove them www.tugraz.at

• ...and remove them if not needed?

• User accessible check in hardware is not reliable

27 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 75: Meltdown & Spectre - Qualcomm

Idea www.tugraz.at

• Let’s just unmap the kernel in user space

• Kernel addresses are then no longer present

• Memory which is not mapped cannot be accessed at all

28 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 76: Meltdown & Spectre - Qualcomm

Idea www.tugraz.at

• Let’s just unmap the kernel in user space

• Kernel addresses are then no longer present

• Memory which is not mapped cannot be accessed at all

28 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 77: Meltdown & Spectre - Qualcomm

Idea www.tugraz.at

• Let’s just unmap the kernel in user space

• Kernel addresses are then no longer present

• Memory which is not mapped cannot be accessed at all

28 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 78: Meltdown & Spectre - Qualcomm

Userspace Kernelspace

ApplicationsOperatingSystem Memory

Page 79: Meltdown & Spectre - Qualcomm

Userspace Kernelspace

ApplicationsOperatingSystem Memory

Userspace Kernelspace

Applications

Kernel View User View

context switch

Page 80: Meltdown & Spectre - Qualcomm

Kernel Address Space Isolation www.tugraz.at

• We published KAISER in July 2017

• Intel and others improved and merged it into Linux as KPTI (Kernel

Page Table Isolation)

• Kernel patches available for arm64

• Microsoft and Apple implemented similar concepts, for x86 and ARM

• All share the same idea: switching address spaces on context switch

29 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 81: Meltdown & Spectre - Qualcomm

Kernel Address Space Isolation www.tugraz.at

• We published KAISER in July 2017

• Intel and others improved and merged it into Linux as KPTI (Kernel

Page Table Isolation)

• Kernel patches available for arm64

• Microsoft and Apple implemented similar concepts, for x86 and ARM

• All share the same idea: switching address spaces on context switch

29 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 82: Meltdown & Spectre - Qualcomm

Kernel Address Space Isolation www.tugraz.at

• We published KAISER in July 2017

• Intel and others improved and merged it into Linux as KPTI (Kernel

Page Table Isolation)

• Kernel patches available for arm64

• Microsoft and Apple implemented similar concepts, for x86 and ARM

• All share the same idea: switching address spaces on context switch

29 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 83: Meltdown & Spectre - Qualcomm

Kernel Address Space Isolation www.tugraz.at

• We published KAISER in July 2017

• Intel and others improved and merged it into Linux as KPTI (Kernel

Page Table Isolation)

• Kernel patches available for arm64

• Microsoft and Apple implemented similar concepts, for x86 and ARM

• All share the same idea: switching address spaces on context switch

29 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 84: Meltdown & Spectre - Qualcomm

Kernel Address Space Isolation www.tugraz.at

• We published KAISER in July 2017

• Intel and others improved and merged it into Linux as KPTI (Kernel

Page Table Isolation)

• Kernel patches available for arm64

• Microsoft and Apple implemented similar concepts, for x86 and ARM

• All share the same idea: switching address spaces on context switch

29 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 85: Meltdown & Spectre - Qualcomm

But wait, what about privileged registers?

Page 86: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• ARM found a closely related Meltdown variant

• Read of system registers that are not accessible from current exception

level

• ARM Cortex-A15, Cortex-A57 and Cortex-A72 are vulnerable

• Impact: breaking KASLR and pointer authentication

30 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 87: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• ARM found a closely related Meltdown variant

• Read of system registers that are not accessible from current exception

level

• ARM Cortex-A15, Cortex-A57 and Cortex-A72 are vulnerable

• Impact: breaking KASLR and pointer authentication

30 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 88: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• ARM found a closely related Meltdown variant

• Read of system registers that are not accessible from current exception

level

• ARM Cortex-A15, Cortex-A57 and Cortex-A72 are vulnerable

• Impact: breaking KASLR and pointer authentication

30 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 89: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• ARM found a closely related Meltdown variant

• Read of system registers that are not accessible from current exception

level

• ARM Cortex-A15, Cortex-A57 and Cortex-A72 are vulnerable

• Impact: breaking KASLR and pointer authentication

30 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 90: Meltdown & Spectre - Qualcomm

Demo

Page 91: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• Solution? Substitute registers with dummy values on context switch

• Only necessary for virtual addresses and secrets

→ only a few registers affected

• Performance overhead should be minimal

31 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 92: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• Solution? Substitute registers with dummy values on context switch

• Only necessary for virtual addresses and secrets

→ only a few registers affected

• Performance overhead should be minimal

31 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 93: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• Solution? Substitute registers with dummy values on context switch

• Only necessary for virtual addresses and secrets

→ only a few registers affected

• Performance overhead should be minimal

31 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 94: Meltdown & Spectre - Qualcomm

Meltdown for Registers (Variant 3a) www.tugraz.at

• Solution? Substitute registers with dummy values on context switch

• Only necessary for virtual addresses and secrets

→ only a few registers affected

• Performance overhead should be minimal

31 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 95: Meltdown & Spectre - Qualcomm

Where are Variant 1 and 2?

Page 96: Meltdown & Spectre - Qualcomm

Speculative Execution www.tugraz.at

• CPU tries to predict the future (branch predictor), . . .

• . . . based on events learned in the past

• Speculative execution of instructions

• If the prediction was correct, . . .

• . . . very fast

• otherwise: Discard results

• Measurable side-effects?

32 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 97: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 98: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 99: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 100: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 101: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 102: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 103: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

false

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 104: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

false

false

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 105: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

false

false

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 106: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

false

falsetrue

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 107: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

pre

dic

ted

if <access in bounds>

true

true false

false

falsetrue

33 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 108: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 109: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 110: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 111: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Execute

index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 112: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 113: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 114: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 115: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 116: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 117: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 118: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 119: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 120: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 121: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 122: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 123: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 124: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 125: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 126: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 127: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Execute

index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 128: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 129: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 130: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 131: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Execute

index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 132: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 133: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 134: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Speculate

index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 135: Meltdown & Spectre - Qualcomm

Spectre (Variant 1: Bounds-check bypass) www.tugraz.at

Execute

index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then

else

Prediction

34 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 136: Meltdown & Spectre - Qualcomm

Demo

Page 137: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

swim()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 138: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

Speculate

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

swim()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 139: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

swim()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 140: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

Execute

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

swim()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 141: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 142: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

Speculate

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 143: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = bird;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 144: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = fish;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 145: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

Speculate

a->move()

Animal* a = fish;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 146: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = fish;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 147: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

Execute

a->move()

Animal* a = fish;

LUT[data[index] * 4096] 0

fly()

Prediction

fly()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 148: Meltdown & Spectre - Qualcomm

Spectre (Variant 2: Branch target injection) www.tugraz.at

a->move()

Animal* a = fish;

LUT[data[index] * 4096] 0

fly()

Prediction

swim()swim

()

35 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 149: Meltdown & Spectre - Qualcomm

Demo

Page 150: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• We can influence the CPU to mispredict the future

• “Convince” other programs to reveal their secrets

• Can even be triggered from the browser

• Untrusted code can convince trusted code to reveal secrets

36 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 151: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• We can influence the CPU to mispredict the future

• “Convince” other programs to reveal their secrets

• Can even be triggered from the browser

• Untrusted code can convince trusted code to reveal secrets

36 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 152: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• We can influence the CPU to mispredict the future

• “Convince” other programs to reveal their secrets

• Can even be triggered from the browser

• Untrusted code can convince trusted code to reveal secrets

36 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 153: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• We can influence the CPU to mispredict the future

• “Convince” other programs to reveal their secrets

• Can even be triggered from the browser

• Untrusted code can convince trusted code to reveal secrets

36 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 154: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Demonstrated on Intel, AMD and ARM CPUs

• Affects processor with branch target speculation

• Much harder to fix, KAISER does not help

37 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 155: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Demonstrated on Intel, AMD and ARM CPUs

• Affects processor with branch target speculation

• Much harder to fix, KAISER does not help

37 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 156: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Demonstrated on Intel, AMD and ARM CPUs

• Affects processor with branch target speculation

• Much harder to fix, KAISER does not help

37 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 157: Meltdown & Spectre - Qualcomm

Can we fix that?

Page 158: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Trivial approach: disable speculative execution

• No wrong speculation if there is no speculation

• Problem: massive performance hit!

• Also: How to disable it?

• Speculative execution is deeply integrated into CPU

38 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 159: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Trivial approach: disable speculative execution

• No wrong speculation if there is no speculation

• Problem: massive performance hit!

• Also: How to disable it?

• Speculative execution is deeply integrated into CPU

38 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 160: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Trivial approach: disable speculative execution

• No wrong speculation if there is no speculation

• Problem: massive performance hit!

• Also: How to disable it?

• Speculative execution is deeply integrated into CPU

38 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 161: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Trivial approach: disable speculative execution

• No wrong speculation if there is no speculation

• Problem: massive performance hit!

• Also: How to disable it?

• Speculative execution is deeply integrated into CPU

38 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 162: Meltdown & Spectre - Qualcomm

Spectre www.tugraz.at

• Trivial approach: disable speculative execution

• No wrong speculation if there is no speculation

• Problem: massive performance hit!

• Also: How to disable it?

• Speculative execution is deeply integrated into CPU

38 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 163: Meltdown & Spectre - Qualcomm

Drilling template www.tugraz.at

Drilling template (@kreon nrw)

39 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 164: Meltdown & Spectre - Qualcomm

More things which do not work www.tugraz.at

• Prevent access to high-resolution timer

→ Own timer using timing thread (last year)

• Flush instruction only privileged

→ Cache eviction through memory accesses (last year)

• Just move secrets into secure world

→ Spectre works on secure enclaves

40 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 165: Meltdown & Spectre - Qualcomm

More things which do not work www.tugraz.at

• Prevent access to high-resolution timer

→ Own timer using timing thread (last year)

• Flush instruction only privileged

→ Cache eviction through memory accesses (last year)

• Just move secrets into secure world

→ Spectre works on secure enclaves

40 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 166: Meltdown & Spectre - Qualcomm

More things which do not work www.tugraz.at

• Prevent access to high-resolution timer

→ Own timer using timing thread (last year)

• Flush instruction only privileged

→ Cache eviction through memory accesses (last year)

• Just move secrets into secure world

→ Spectre works on secure enclaves

40 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 167: Meltdown & Spectre - Qualcomm

More things which do not work www.tugraz.at

• Prevent access to high-resolution timer

→ Own timer using timing thread (last year)

• Flush instruction only privileged

→ Cache eviction through memory accesses (last year)

• Just move secrets into secure world

→ Spectre works on secure enclaves

40 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 168: Meltdown & Spectre - Qualcomm

More things which do not work www.tugraz.at

• Prevent access to high-resolution timer

→ Own timer using timing thread (last year)

• Flush instruction only privileged

→ Cache eviction through memory accesses (last year)

• Just move secrets into secure world

→ Spectre works on secure enclaves

40 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 169: Meltdown & Spectre - Qualcomm

More things which do not work www.tugraz.at

• Prevent access to high-resolution timer

→ Own timer using timing thread (last year)

• Flush instruction only privileged

→ Cache eviction through memory accesses (last year)

• Just move secrets into secure world

→ Spectre works on secure enclaves

40 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 170: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Workaround: insert instructions stopping speculation

→ insert after every bounds check

• ARM: Conditional select or conditional move and new

barrier CSDB

• Alternative: DSB SYS + ISB → greater performance

hit

• Retrofitted to existing ARMv7 and ARMv8

41 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 171: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Workaround: insert instructions stopping speculation

→ insert after every bounds check

• ARM: Conditional select or conditional move and new

barrier CSDB

• Alternative: DSB SYS + ISB → greater performance

hit

• Retrofitted to existing ARMv7 and ARMv8

41 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 172: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Workaround: insert instructions stopping speculation

→ insert after every bounds check

• ARM: Conditional select or conditional move and new

barrier CSDB

• Alternative: DSB SYS + ISB → greater performance

hit

• Retrofitted to existing ARMv7 and ARMv8

41 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 173: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Workaround: insert instructions stopping speculation

→ insert after every bounds check

• ARM: Conditional select or conditional move and new

barrier CSDB

• Alternative: DSB SYS + ISB → greater performance

hit

• Retrofitted to existing ARMv7 and ARMv8

41 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 174: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Workaround: insert instructions stopping speculation

→ insert after every bounds check

• ARM: Conditional select or conditional move and new

barrier CSDB

• Alternative: DSB SYS + ISB → greater performance

hit

• Retrofitted to existing ARMv7 and ARMv8

41 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 175: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier requires compiler supported

• Already implemented in GCC, LLVM, and MSVC

• Can be automated (MSVC) → not really reliable

• Explicit use by programmer: builtin load no speculate

42 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 176: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier requires compiler supported

• Already implemented in GCC, LLVM, and MSVC

• Can be automated (MSVC) → not really reliable

• Explicit use by programmer: builtin load no speculate

42 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 177: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier requires compiler supported

• Already implemented in GCC, LLVM, and MSVC

• Can be automated (MSVC) → not really reliable

• Explicit use by programmer: builtin load no speculate

42 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 178: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier requires compiler supported

• Already implemented in GCC, LLVM, and MSVC

• Can be automated (MSVC) → not really reliable

• Explicit use by programmer: builtin load no speculate

42 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 179: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier requires compiler supported

• Already implemented in GCC, LLVM, and MSVC

• Can be automated (MSVC) → not really reliable

• Explicit use by programmer: builtin load no speculate

42 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 180: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

43 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 181: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

43 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 182: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier works if affected code constructs are

known

• Programmer has to fully understand vulnerability

• Automatic detection is not reliable

• Non-negligible performance overhead of barriers

44 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 183: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier works if affected code constructs are

known

• Programmer has to fully understand vulnerability

• Automatic detection is not reliable

• Non-negligible performance overhead of barriers

44 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 184: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier works if affected code constructs are

known

• Programmer has to fully understand vulnerability

• Automatic detection is not reliable

• Non-negligible performance overhead of barriers

44 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 185: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier works if affected code constructs are

known

• Programmer has to fully understand vulnerability

• Automatic detection is not reliable

• Non-negligible performance overhead of barriers

44 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 186: Meltdown & Spectre - Qualcomm

Spectre Variant 1 Mitigations www.tugraz.at

• Speculation barrier works if affected code constructs are

known

• Programmer has to fully understand vulnerability

• Automatic detection is not reliable

• Non-negligible performance overhead of barriers

44 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 187: Meltdown & Spectre - Qualcomm

Spectre Variant 2 Mitigations (Software) www.tugraz.at

• ARM provides hardened Linux kernel and ARM Trusted Firmware

patches

• Clears branch-predictor state on context switch

• Either via instruction (BPIALL)...

• ...or workaround (disable/enable MMU)

• Google’s Retpoline does not work on ARM

45 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 188: Meltdown & Spectre - Qualcomm

Spectre Variant 2 Mitigations (Software) www.tugraz.at

• ARM provides hardened Linux kernel and ARM Trusted Firmware

patches

• Clears branch-predictor state on context switch

• Either via instruction (BPIALL)...

• ...or workaround (disable/enable MMU)

• Google’s Retpoline does not work on ARM

45 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 189: Meltdown & Spectre - Qualcomm

Spectre Variant 2 Mitigations (Software) www.tugraz.at

• ARM provides hardened Linux kernel and ARM Trusted Firmware

patches

• Clears branch-predictor state on context switch

• Either via instruction (BPIALL)...

• ...or workaround (disable/enable MMU)

• Google’s Retpoline does not work on ARM

45 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 190: Meltdown & Spectre - Qualcomm

Spectre Variant 2 Mitigations (Software) www.tugraz.at

• ARM provides hardened Linux kernel and ARM Trusted Firmware

patches

• Clears branch-predictor state on context switch

• Either via instruction (BPIALL)...

• ...or workaround (disable/enable MMU)

• Google’s Retpoline does not work on ARM

45 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 191: Meltdown & Spectre - Qualcomm

Spectre Variant 2 Mitigations (Software) www.tugraz.at

• ARM provides hardened Linux kernel and ARM Trusted Firmware

patches

• Clears branch-predictor state on context switch

• Either via instruction (BPIALL)...

• ...or workaround (disable/enable MMU)

• Google’s Retpoline does not work on ARM

45 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 192: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 193: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto

→ “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 194: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 195: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR

→ “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 196: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 197: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone

→ “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 198: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 199: Meltdown & Spectre - Qualcomm

Learn from it www.tugraz.at

We have ignored software side-channels for many many years:

• attacks on crypto → “software should be fixed”

• attacks on ASLR → “ASLR is broken anyway”

• attacks on SGX and TrustZone → “not part of the threat model”

→ for years we solely optimized for performance

46 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 200: Meltdown & Spectre - Qualcomm

When you read the manuals... www.tugraz.at

After learning about a side channel you realize:

• the side channels were documented in the processor manual

• only now we understand the implications

47 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 201: Meltdown & Spectre - Qualcomm

When you read the manuals... www.tugraz.at

After learning about a side channel you realize:

• the side channels were documented in the processor manual

• only now we understand the implications

47 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 202: Meltdown & Spectre - Qualcomm

When you read the manuals... www.tugraz.at

After learning about a side channel you realize:

• the side channels were documented in the processor manual

• only now we understand the implications

47 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 203: Meltdown & Spectre - Qualcomm

What do we learn from it? www.tugraz.at

Motor Vehicle Deaths in U.S. by Year

48 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 204: Meltdown & Spectre - Qualcomm

A unique chance www.tugraz.at

A unique chance to

• rethink processor design

• grow up, like other fields (car industry, construction industry)

• find good trade-offs between security and performance

49 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 205: Meltdown & Spectre - Qualcomm

Conclusion www.tugraz.at

• Underestimated microarchitectural attacks for a long time

• Meltdown and Spectre exploit performance optimizations

• Allow to leak arbitrary memory

• Countermeasures come with a performance impact

• Find trade-offs between security and performance

50 Moritz Lipp (@mlqxyz), Michael Schwarz (@misc0110) — www.iaik.tugraz.at

Page 206: Meltdown & Spectre - Qualcomm

Side-channels considered hARMful

Moritz Lipp (@mlqxyz)

Meltdown & Spectre

Qualcomm Mobile Security Summit 2018

17 May, 2018 - San Diego, CA

Michael Schwarz (@misc0110)