78
KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp , M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University of Technology

KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR is Dead: Long Live KASLR

D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. MangardJuly 5, 2017—ESSoS’17

Graz University of Technology

Page 2: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Motivation www.tugraz.at

• KASLR to make memory corruption attacks inpractical

• Past year side-channel attacks have been published defeating KASLR• Is there a way to prevent these side-channel attacks?

• In Software?

2 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 3: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Motivation www.tugraz.at

• KASLR to make memory corruption attacks inpractical• Past year side-channel attacks have been published defeating KASLR

• Is there a way to prevent these side-channel attacks?• In Software?

2 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 4: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Motivation www.tugraz.at

• KASLR to make memory corruption attacks inpractical• Past year side-channel attacks have been published defeating KASLR• Is there a way to prevent these side-channel attacks?

• In Software?

2 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 5: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Motivation www.tugraz.at

• KASLR to make memory corruption attacks inpractical• Past year side-channel attacks have been published defeating KASLR• Is there a way to prevent these side-channel attacks?

• In Software?

2 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 6: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Background

Page 7: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Virtual Memory www.tugraz.at

• Maps virtual addresses used by a program to physical addresses in DRAM

• Virtual address space is organized in pages• Page tables are used to translate virtual to physical addresses

3 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 8: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Virtual Memory www.tugraz.at

• Maps virtual addresses used by a program to physical addresses in DRAM• Virtual address space is organized in pages

• Page tables are used to translate virtual to physical addresses

3 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 9: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Virtual Memory www.tugraz.at

• Maps virtual addresses used by a program to physical addresses in DRAM• Virtual address space is organized in pages• Page tables are used to translate virtual to physical addresses

3 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 10: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Address Translation on x86-64 www.tugraz.at

PML4I (9 b) PDPTI (9 b) PDI (9 b) PTI (9 b) Offset (12 b)48-bit virtual address

CR3 PML4PML4E 0PML4E 1

···#PML4I···

PML4E 511

PDPTPDPTE 0PDPTE 1

···#PDPTI···

PDPTE 511

Page DirectoryPDE 0PDE 1

···PDE #PDI

···PDE 511

Page TablePTE 0PTE 1

···PTE #PTI

···PTE 511

4 KiB PageByte 0Byte 1

···Offset

···Byte 4095

4 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 11: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Address Translation Caches www.tugraz.at

Core 0

ITLB DTLB

PDE cache

PDPTE cache

PML4E cache

Core 1

ITLB DTLB

PDE cache

PDPTE cache

PML4E cache

Page table structures insystem memory (DRAM)

Lookupdirection

5 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 12: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Address Space www.tugraz.at

User memory Kernel memory0 −1

context switch

6 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 13: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR: Kernel Address Space Layout Randomization www.tugraz.at

• Many exploits rely on the knowledge of the memory location of a certain function

• Statistical mitigation of memory corruption vulnerabilities• Randomizing core kernel image and device drivers position at boot time• Enabled in Linux 4.12 by default (May 2017)

7 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 14: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR: Kernel Address Space Layout Randomization www.tugraz.at

• Many exploits rely on the knowledge of the memory location of a certain function• Statistical mitigation of memory corruption vulnerabilities

• Randomizing core kernel image and device drivers position at boot time• Enabled in Linux 4.12 by default (May 2017)

7 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 15: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR: Kernel Address Space Layout Randomization www.tugraz.at

• Many exploits rely on the knowledge of the memory location of a certain function• Statistical mitigation of memory corruption vulnerabilities• Randomizing core kernel image and device drivers position at boot time

• Enabled in Linux 4.12 by default (May 2017)

7 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 16: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR: Kernel Address Space Layout Randomization www.tugraz.at

• Many exploits rely on the knowledge of the memory location of a certain function• Statistical mitigation of memory corruption vulnerabilities• Randomizing core kernel image and device drivers position at boot time• Enabled in Linux 4.12 by default (May 2017)

7 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 17: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR: Kernel Address Space Layout Randomization www.tugraz.at

Process A

0 −1

Process B

0 −1

Process C

0 −1

• Driver is loaded to a different offset on every boot

8 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 18: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Attacks against KASLR

Page 19: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

• 2016 by Jang et al. [Jan+16]• Transactional Synchronization Extension (TSX)

• Transaction aborts if conflict occurs

• Measure execution time in TSX abort handler• Fast: Address is mapped• Slow: Address is not mapped

• Reveal mapping status of each page• Detect kernel modules with unique size signature• Less noisy than Double Page Fault Attack by Hund et al. [Hun+13]

9 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 20: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

• 2016 by Jang et al. [Jan+16]• Transactional Synchronization Extension (TSX)

• Transaction aborts if conflict occurs• Measure execution time in TSX abort handler

• Fast: Address is mapped• Slow: Address is not mapped

• Reveal mapping status of each page• Detect kernel modules with unique size signature• Less noisy than Double Page Fault Attack by Hund et al. [Hun+13]

9 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 21: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

• 2016 by Jang et al. [Jan+16]• Transactional Synchronization Extension (TSX)

• Transaction aborts if conflict occurs• Measure execution time in TSX abort handler

• Fast: Address is mapped• Slow: Address is not mapped

• Reveal mapping status of each page• Detect kernel modules with unique size signature• Less noisy than Double Page Fault Attack by Hund et al. [Hun+13]

9 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 22: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

• 2016 by Jang et al. [Jan+16]• Transactional Synchronization Extension (TSX)

• Transaction aborts if conflict occurs• Measure execution time in TSX abort handler

• Fast: Address is mapped• Slow: Address is not mapped

• Reveal mapping status of each page

• Detect kernel modules with unique size signature• Less noisy than Double Page Fault Attack by Hund et al. [Hun+13]

9 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 23: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

• 2016 by Jang et al. [Jan+16]• Transactional Synchronization Extension (TSX)

• Transaction aborts if conflict occurs• Measure execution time in TSX abort handler

• Fast: Address is mapped• Slow: Address is not mapped

• Reveal mapping status of each page• Detect kernel modules with unique size signature

• Less noisy than Double Page Fault Attack by Hund et al. [Hun+13]

9 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 24: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

• 2016 by Jang et al. [Jan+16]• Transactional Synchronization Extension (TSX)

• Transaction aborts if conflict occurs• Measure execution time in TSX abort handler

• Fast: Address is mapped• Slow: Address is not mapped

• Reveal mapping status of each page• Detect kernel modules with unique size signature• Less noisy than Double Page Fault Attack by Hund et al. [Hun+13]

9 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 25: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

0 50 100 150 200 250 300

unmapped

mappedexecutable

mappednon-executable

299

226

270

Execution time in cycles

10 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 26: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

• 2016 by Gruss et al. [Gru+16]

• Execution time of Prefetch instruction varies• Depends on which address translation cache holds the right entry

• Reveal mapping status• Allows to obtain physical address of virtual address

11 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 27: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

• 2016 by Gruss et al. [Gru+16]• Execution time of Prefetch instruction varies

• Depends on which address translation cache holds the right entry

• Reveal mapping status• Allows to obtain physical address of virtual address

11 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 28: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

• 2016 by Gruss et al. [Gru+16]• Execution time of Prefetch instruction varies

• Depends on which address translation cache holds the right entry

• Reveal mapping status

• Allows to obtain physical address of virtual address

11 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 29: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

• 2016 by Gruss et al. [Gru+16]• Execution time of Prefetch instruction varies

• Depends on which address translation cache holds the right entry

• Reveal mapping status• Allows to obtain physical address of virtual address

11 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 30: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

PDPTE PDE PTE Page(cached)

Page(uncached)

200300400500600

241 241 237 212

515

Mapping level

Exec

utio

ntim

ein

cycle

s

12 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 31: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR is Dead: Long Live KASLR

Page 32: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Idea www.tugraz.at

• KAISER: Kernel Address Isolation to have Side channels Efficiently Removed

• Kernel Address Isolation: Separate kernel space and user space

context switch

User memory not mapped0 −1

context switch

SMAP + SMEP Kernel memory0 −1

switch address space

13 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 33: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Idea www.tugraz.at

• KAISER: Kernel Address Isolation to have Side channels Efficiently Removed• Kernel Address Isolation: Separate kernel space and user space

context switch

User memory not mapped0 −1

context switch

SMAP + SMEP Kernel memory0 −1

switch address space

13 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 34: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Challenges www.tugraz.at

• Challenge 1: Threads cannot use the same page table structures in user spaceand kernel space without a huge synchronization overhead.

• Challenge 2: Several locations must be valid for both user space and kernelspace during context switches. Identify them.

• Challenge 3: Switching the address space incurs an implicit TLB flush.Performance impact.

14 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 35: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Challenges www.tugraz.at

• Challenge 1: Threads cannot use the same page table structures in user spaceand kernel space without a huge synchronization overhead.

• Challenge 2: Several locations must be valid for both user space and kernelspace during context switches. Identify them.

• Challenge 3: Switching the address space incurs an implicit TLB flush.Performance impact.

14 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 36: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Challenges www.tugraz.at

• Challenge 1: Threads cannot use the same page table structures in user spaceand kernel space without a huge synchronization overhead.

• Challenge 2: Several locations must be valid for both user space and kernelspace during context switches. Identify them.

• Challenge 3: Switching the address space incurs an implicit TLB flush.Performance impact.

14 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 37: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

• Every process has two address spaces:

• Kernel Address Space: Kernel mapped, user space mapped and protected withSMAP and SMEP

• Shadow Address Space: Userspace mapped, Kernel not mapped

• Switching between the address space:• Update CR3 with corresponding PML4

15 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 38: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

• Every process has two address spaces:• Kernel Address Space: Kernel mapped, user space mapped and protected with

SMAP and SMEP

• Shadow Address Space: Userspace mapped, Kernel not mapped

• Switching between the address space:• Update CR3 with corresponding PML4

15 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 39: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

• Every process has two address spaces:• Kernel Address Space: Kernel mapped, user space mapped and protected with

SMAP and SMEP• Shadow Address Space: Userspace mapped, Kernel not mapped

• Switching between the address space:• Update CR3 with corresponding PML4

15 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 40: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

• Every process has two address spaces:• Kernel Address Space: Kernel mapped, user space mapped and protected with

SMAP and SMEP• Shadow Address Space: Userspace mapped, Kernel not mapped

• Switching between the address space:

• Update CR3 with corresponding PML4

15 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 41: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

• Every process has two address spaces:• Kernel Address Space: Kernel mapped, user space mapped and protected with

SMAP and SMEP• Shadow Address Space: Userspace mapped, Kernel not mapped

• Switching between the address space:• Update CR3 with corresponding PML4

15 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 42: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

UserKernel

PGD User

PGD Kernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4

• 8kb-aligned physical memory block to store both PML4s• Toggle bit 12 of the physical address to switch between mappings

• No memory lookups• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 43: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

UserKernel

PGD User

PGD Kernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4• 8kb-aligned physical memory block to store both PML4s

• Toggle bit 12 of the physical address to switch between mappings

• No memory lookups• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 44: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

UserKernel

PGD User

PGD Kernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4• 8kb-aligned physical memory block to store both PML4s• Toggle bit 12 of the physical address to switch between mappings

• No memory lookups• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 45: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

PGD User

PGD KernelUserKernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4• 8kb-aligned physical memory block to store both PML4s• Toggle bit 12 of the physical address to switch between mappings

• No memory lookups

• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 46: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

PGD User

PGD KernelUserKernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4• 8kb-aligned physical memory block to store both PML4s• Toggle bit 12 of the physical address to switch between mappings

• No memory lookups• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 47: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

PGD User

PGD KernelUserKernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4• 8kb-aligned physical memory block to store both PML4s• Toggle bit 12 of the physical address to switch between mappings• No memory lookups

• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 48: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 1 www.tugraz.at

CR3 Pair

CR3 + 0x1000CR3

PGD User

PGD KernelUserKernel

CR3[

12]

=1

CR3[

12]

=0

• Power-of-two offset between kernel and shadow PML4• 8kb-aligned physical memory block to store both PML4s• Toggle bit 12 of the physical address to switch between mappings• No memory lookups• Only a single scratch register

16 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 49: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Previous work suggested that only a portion of the interrupt dispatcher needs tobe mapped

• Not practical• In reality, much more has to be mapped

17 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 50: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Previous work suggested that only a portion of the interrupt dispatcher needs tobe mapped

• Not practical• In reality, much more has to be mapped

17 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 51: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Interrupt Descriptor Table (IDT)

• Interrupt entry and exit .text• Multi-threaded applications running on different cores:

• per-CPU memory regions• interrupt request (IRQ) stack and vector• global descriptor table (GDT)• task state segment (TSS)• thread stacks

18 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 52: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Interrupt Descriptor Table (IDT)• Interrupt entry and exit .text

• Multi-threaded applications running on different cores:• per-CPU memory regions• interrupt request (IRQ) stack and vector• global descriptor table (GDT)• task state segment (TSS)• thread stacks

18 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 53: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Interrupt Descriptor Table (IDT)• Interrupt entry and exit .text• Multi-threaded applications running on different cores:

• per-CPU memory regions• interrupt request (IRQ) stack and vector• global descriptor table (GDT)• task state segment (TSS)• thread stacks

18 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 54: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Design of kernel is based upon the capability to access user space addresses fromkernel mode

• SMEP: Protects against executing user space code from kernel mode• SMAP: Invalid user memory references in kernel mode

19 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 55: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Design of kernel is based upon the capability to access user space addresses fromkernel mode

• SMEP: Protects against executing user space code from kernel mode

• SMAP: Invalid user memory references in kernel mode

19 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 56: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 2 www.tugraz.at

• Design of kernel is based upon the capability to access user space addresses fromkernel mode

• SMEP: Protects against executing user space code from kernel mode• SMAP: Invalid user memory references in kernel mode

19 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 57: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 3 www.tugraz.at

• Minimize the number of implicit TLB flushes

• x86 performs implicit TLB flush on every CR3 update• PTE global bit

• Preserve mappings that exist in every process• Excluded from implicit TLB flushes

• Disable the global bits• Negligible overhead

• Tag TLB with CR3 [Ven+12]

20 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 58: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 3 www.tugraz.at

• Minimize the number of implicit TLB flushes• x86 performs implicit TLB flush on every CR3 update

• PTE global bit• Preserve mappings that exist in every process• Excluded from implicit TLB flushes

• Disable the global bits• Negligible overhead

• Tag TLB with CR3 [Ven+12]

20 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 59: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 3 www.tugraz.at

• Minimize the number of implicit TLB flushes• x86 performs implicit TLB flush on every CR3 update• PTE global bit

• Preserve mappings that exist in every process• Excluded from implicit TLB flushes

• Disable the global bits• Negligible overhead

• Tag TLB with CR3 [Ven+12]

20 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 60: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 3 www.tugraz.at

• Minimize the number of implicit TLB flushes• x86 performs implicit TLB flush on every CR3 update• PTE global bit

• Preserve mappings that exist in every process• Excluded from implicit TLB flushes

• Disable the global bits• Negligible overhead

• Tag TLB with CR3 [Ven+12]

20 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 61: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Solving Challenge 3 www.tugraz.at

• Minimize the number of implicit TLB flushes• x86 performs implicit TLB flush on every CR3 update• PTE global bit

• Preserve mappings that exist in every process• Excluded from implicit TLB flushes

• Disable the global bits• Negligible overhead

• Tag TLB with CR3 [Ven+12]

20 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 62: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Evaluation

Page 63: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Double Page Fault Attack www.tugraz.at

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8·104

unmapped

mapped

12,307

12,28214,621

14,621

Execution time in cycles

21 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 64: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Double Page Fault Attack www.tugraz.at

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8·104

unmapped

mapped

12,307

12,28214,621

14,621

Execution time in cycles

KAISER

KAISER

21 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 65: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

0 50 100 150 200 250 300

unmapped

mappedexecutable

mappednon-executable

299

226

270

300

300

300

Execution time in cycles

22 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 66: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

TSX Attack www.tugraz.at

0 50 100 150 200 250 300

unmapped

mappedexecutable

mappednon-executable

299

226

270

300

300

300

Execution time in cycles

KAISER

KAISER

KAISER

22 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 67: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

PDPTE PDE PTE Page(cached)

Page(uncached)

200300400500600

241 241 237 212

515

241 241 241 241 241

Mapping level

Exec

utio

ntim

ein

cycle

sdefault

23 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 68: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

PDPTE PDE PTE Page(cached)

Page(uncached)

200300400500600

241 241 237 212

515

241 241 241 241 241

Mapping level

Exec

utio

ntim

ein

cycle

sdefault

KAISER

23 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 69: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

0 20 40 60 80 100 1200

100

200

300

Page offset in kernel direct map

Min

imum

laten

cyin

cycle

s

default

24 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 70: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Prefetch Side-Channel Attack www.tugraz.at

0 20 40 60 80 100 1200

100

200

300

Page offset in kernel direct map

Min

imum

laten

cyin

cycle

s

defaultKAISER

24 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 71: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Performance www.tugraz.at

Benchmark Kernel RuntimeAverage

Overhead

1 core 2 cores 4 cores 8 cores

PARSEC 3.0default 27:56,0 s 14:56,3 s 8:35,6 s 7:05,1 s

0.37%KAISER 28:00,2 s 14:58,9 s 8:36,9 s 7:08,0 s

pgbenchdefault 3:22,3 s 3:21,9 s 3:21,7 s 3:53,5 s

0.39%KAISER 3:23,4 s 3:22,5 s 3:22,3 s 3:54,7 s

SPLASH-2Xdefault 17:38,4 s 10:47,7 s 7:10,4 s 6:05,3 s

0.09%KAISER 17:42,6 s 10:48,5 s 7:10,8 s 6:05,7 s

25 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 72: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Github www.tugraz.at

Source available on Github:

https://github.com/iaik/kaiser

26 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 73: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Conclusion

Page 74: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Conclusion www.tugraz.at

• KASLR is enabled by default in Linux

• KAISER prevents existing side-channel attacks• Double Page Fault Attacks• TSX-based side-channel attacks• Prefetch side-channel attacks

• Minor performance overhead on modern commodity hardware

27 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 75: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Conclusion www.tugraz.at

• KASLR is enabled by default in Linux• KAISER prevents existing side-channel attacks

• Double Page Fault Attacks• TSX-based side-channel attacks• Prefetch side-channel attacks

• Minor performance overhead on modern commodity hardware

27 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 76: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

Conclusion www.tugraz.at

• KASLR is enabled by default in Linux• KAISER prevents existing side-channel attacks

• Double Page Fault Attacks• TSX-based side-channel attacks• Prefetch side-channel attacks

• Minor performance overhead on modern commodity hardware

27 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology

Page 77: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

KASLR is Dead: Long Live KASLR

D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. MangardJuly 5, 2017—ESSoS’17

Graz University of Technology

Page 78: KASLR is Dead: Long Live KASLR - misc0110.net · KASLR is Dead: Long Live KASLR D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard July 5, 2017—ESSoS’17 Graz University

References www.tugraz.at

D. Gruss, C. Maurice, A. Fogh, M. Lipp, and S. Mangard. “Prefetch Side-Channel Attacks:Bypassing SMAP and Kernel ASLR”. In: CCS’16. 2016.

R. Hund, C. Willems, and T. Holz. “Practical Timing Side Channel Attacks against Kernel SpaceASLR”. In: S&P’13. 2013.

Y. Jang, S. Lee, and T. Kim. “Breaking Kernel Address Space Layout Randomization with IntelTSX”. In: CCS’16. 2016.

G. Venkatasubramanian, R. J. Figueiredo, R. Illikkal, and D. Newell. “TMT: A TLB TagManagement Framework for Virtualized Platforms”. In: International Journal of ParallelProgramming 40.3 (2012).

29 D. Gruss, M. Lipp, M. Schwarz, R. Fellner, C. Maurice, S. Mangard | Graz University of Technology