DrK DrK: Brea eaking Ker ernel el Addres ess Space e La Layout ut Ra Rando ndomi mization n wi with h In Intel el TSX
Yeongjin Jang, Sangho Lee, and Taesoo Kim Georgia Institute of Technology, August 3, 2016
1
DrK DrK: Brea eaking Ker ernel el Addres ess Space e La - - PowerPoint PPT Presentation
DrK DrK: Brea eaking Ker ernel el Addres ess Space e La Layout ut Ra Rando ndomi mization n wi with h In Intel el TSX Yeongjin Jang, Sangho Lee, and Taesoo Kim Georgia Institute of Technology, August 3, 2016 1 KA KASLR: A A P
1
2
3
4
5
6
7
8
9
10
11
12
Virtual Address Hit Miss Mapped address returns quicker! Unmapped address takes ~40 cycles more for page table walk
13
14
15
16
User Execution CPU Exception OS Execution OS Handling Noise
TLB Side Channel
CPU T L B
17
Rafal Wojtczuk, https://labs.bromium.com/2014/10/27/tsx-improves-timing-attacks-against-kaslr/
18
19
28 cycles 2 cycles 20 cycles 35 cycles
20
(retry, get back to traditional lock, etc.)
21
22
23
the TSX region (always aborts)
24
25
User Execution CPU Exception OS Execution OS Handling Noise
TLB Side Channel
26
27
28
29
30
31
32
33
34
35
knows the binary file
36
0x4000, and the size of non- executable section is 0x4000, then it is libahci!
37
38
39
40
41
42
43
44
Mapped Page Unmapped Page Description dTLB-loads 3,021,847 3,020,243 dTLB-load-misses
TLB-miss on U Observed Timing 209 (fast) 240 (slow)
45
Kernel address access TLB miss
46
Kernel address access TLB miss
47
Kernel address access TLB miss
48
Kernel address access
49
50
Exec Page Non-exec Page Unmapped Page iTLB-loads (hit)
1,000,247 272 iTLB-load-misses
Observed Timing
51
Exec Page Non-exec Page Unmapped Page iTLB-loads (hit)
1,000,247 272 iTLB-load-misses
Observed Timing
52
From the patent US 20100138608 A1, registered by Intel Corporation
53
From the patent US 20100138608 A1, registered by Intel Corporation
54
Kernel address access TLB miss
55
Kernel address access TLB miss
56
Kernel address access
57
Kernel address access TLB miss
58
Kernel address access
59
Execute
60
Kernel address access
61
Fast Path (X) Slow Path (NX) Slow Path (U)
page table walk.
Cycles: 181 Cycles: 226 Cycles: 226
62
63
64
65
66
67
68
69
70