CPU Side-Channel Attacks
the Meltdown Attack Heechul Yun
1
CPU Side-Channel Attacks the Meltdown Attack Heechul Yun 1 This - - PowerPoint PPT Presentation
CPU Side-Channel Attacks the Meltdown Attack Heechul Yun 1 This Week: Hardware Security Introduction Meltdown Papers Spectre Attacks: Exploiting Speculative Execution, IEEE Security and Privacy (S&P), 2019 (Dustin)
1
2
– An attack that exploits Intel CPU’s flaw that allows any user-level process to read the content of the kernel-
– An attacker can dump the entire memory, including password and other confidential information
– Almost all Intel CPUs that do Out-of-Order Execution to improve performance
3
Kocher, Daniel Genkin, Yuval Yarom, Mike Hamburg, arXiv preprint (Submitted on 3 Jan 2018) 4
5
6
7
Process A Process B Process C Physical Memory
MMU
Virtual address physical address
8
– E.g., Process A cannot see process B’s memory (vice versa.)
– Q1. how does kernel map its own private memory? – Q2. how to prevent user processes from accessing the kernel mapped memory?
9
– Kernel code, data – Identical to all address spaces – Fixed 1-1 mapping of physical memory
– Process code, data, heap, stack,... – Unique to each address space – On-demand mapping (page fault)
10
Kernel User 0xFFFFFFFF 0xC0000000 0x00000000
– when you execute system calls or interrupt handlers.
– Kernel can move data between user memory and kernel memory easily w/o changing the address space.
11
Kernel User 0xFFFFFFFF 0xC0000000 0x00000000
12
– By exploiting weaknesses in Intel’s out-
13
Kernel User 0xFFFFFFFF 0xC0000000 0x00000000
– A technique to minimize data waiting time by executing future instructions – Introduced in 1967 (Tomasulo algorithm)
– Intel, AMD, ARM, ….
14
15
16
If (condition) { Do something A1 Do something A2 Do something A3 } else { Do something B1 Do something B2 Do something B3 }
17
– Fast: accessed by the victim, Slow: not-accessed
18 Image credit: “Cache Side Channels: State of the Art and Research Opportunities” by Prof. Yinqian Zhang at OSU
– Slow: victim accessed, fast: victim not accessed
19 Image credit: “Cache Side Channels: State of the Art and Research Opportunities” by Prof. Yinqian Zhang at OSU
20
21
22
23
24
25
26
27
28
29
Kernel User Physical Memory Process address space
30
31
32
33
– PCID (or ASID) supporting CPUs don’t need to flush TLB.
34
35
36
in adjacent rows.
the bug (**)
– manipulate page tables at the user-level
37 (*) Yoongu Kim et al, “Flipping Bits in Memory Without Accessing Them: An Experimental Study of DRAM Disturbance Errors,” ISCA’14 (**) Google Project Zero. Exploiting the DRAM rowhammer bug to gain kernel privileges, 2015
38 This slide is from the Dr. Yoongu Kim’s ISCA 2014 presentation
39
40
– Playstation Eye camera x1 – Pololu DRV8835 motor hat x1 – New Bright 1:24 RC Car x1 – INIU USB power bank battery (2.4A) x1 – Form board 11x14x3/16in x1 – Machine Screw: #2-56, 1/4″ x4 (or more) – JST-USB cable x1 – Jumper wires male->female x6
– https://docs.google.com/document/d/1Tzx2_GrA6KHZhD3 Up83Q3eieVpPXd5ZUJ4jvwPXNy6o/edit?usp=sharing
41
42
43
44