Controlled- Channel Attacks: Deterministic Side Channels for Untrusted Operating Systems

Size: px
Start display at page:

Download "Controlled- Channel Attacks: Deterministic Side Channels for Untrusted Operating Systems"

Transcription

1 Controlled- Channel Attacks: Deterministic Side Channels for Untrusted Operating Systems Yuanzhong Xu, Weidong Cui, Marcus Peinado The University of Texas at Austin, Microsoft Research San Jose, CA May 19, 2015

2 Applications run on top of OS OS 2

3 Reasons to distrust the OS rootkit OS Large code bases, security bugs 3

4 Reasons to distrust the OS Hosted on untrusted cloud OS 4

5 Shielding systems: remove OS from trusted computing base (TCB) Use hypervisor or secure hardware to confine OS Hypervisor- based Overshadow [ASPLOS '08] InkTag [ASPLOS '13] Intel SGX- based Haven [OSDI '14] OS Hypervisor or SGX CPU 5

6 Shielding systems: remove OS from trusted computing base (TCB) Hypervisor or SGX protects application memory pages from OS Secrecy Integrity Protected app memory pages OS Hypervisor or SGX CPU 6

7 Shielding systems: backward- compatibility & functionality Run legacy applications, on a legacy OS (with small or no modifications) OS is still needed Memory management Storage Network OS Efficient memory management Hypervisor or SGX CPU 7

8 Shielding systems: backward- compatibility & functionality Run legacy applications, on a legacy OS (with small or no modifications) Protected app memory pages OS is still needed Memory management Storage Network OS Integrity Application page table Hypervisor or SGX CPU 8

9 9

10 Breaking the shield (1/3) JPEG decoding (libjpeg) OS Hypervisor (InkTag) or SGX CPU (Haven) 10

11 Breaking the shield (2/3) Font rendering (FreeType) 100% accuracy English letters Common punctuation marks The treasure is buried ten feet north of the third palm tree OS The treasure is buried ten feet north of the third palm tree Hypervisor (InkTag) or SGX CPU (Haven) 11

12 Breaking the shield (3/3) Spell checking (Hunspell) 96% accuracy All words in novel The Wizard of OZ Folklore, legends, myths and fairy tales OS folklore *legend* myths and fairy *tale* Hypervisor (InkTag) or SGX CPU (Haven) 12

13 How? Controlled- channel attacks Side channel attacks from the OS Powerful due to the OS control over the applications Side channel 13

14 Side- channel attacks Traditional side channels: cache access, power consumption, network traffic Victim secret

15 Side- channel attacks Traditional side channels: cache access, power consumption, network traffic System noise: context switches, TLB flushes, exceptions, page faults Victim secret 15

16 Side channels for the OS Under attacker s control System noise: context switches, TLB flushes, exceptions, page faults Victim secret Noise- free channel OS 16

17 Controlled- channel attacks Page faults as a side channel Deterministic: OS controls page tables Set traps by making pages inaccessible Do not need timing Challenge: page- level granularity Protected app memory pages OS Hypervisor or SGX CPU Page faults Application page table 17

18 Input- dependent memory access Page X input if (input) Page Y Page Z Page fault sequence X, Y func1() func2() Page fault sequence X, Z 18

19 Input- dependent memory access Page X input = n N <= 3 Page fault sequence: X, Y Page Y array read array[n] Page Z N >= 4 Page fault sequence: X, Z 19

20 Hunspell Open- source spell checker, used in 20

21 Hunspell hash table Separate chaining Pointer array: index is hash code PG 1 PG 2 PG 3 PG 4 Load Assumption: Dictionary is known Linked lists a attack change channel side size PG 5 PG 6 PG 7 Page faults Page- level knowledge about layout 21

22 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } a attack change channel side size PG 5 PG 6 PG 7 } if (listnode) success(); else failure(); word = get_next(); 22

23 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults: 4 23

24 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults:

25 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults:

26 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults:

27 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults:

28 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults:

29 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); a attack change channel side size PG 5 PG 6 PG 7 Page faults:

30 Hunspell hash table lookup Input: side channel attack PG 1 PG 2 PG 3 PG 4 while (word) { n = hash(word); listnode = table[n]; } while (listnode) { if (equal(listnode, word)) break; listnode = listnode- >next; } if (listnode) success(); else failure(); word = get_next(); h a attack change channel side size PG 5 PG 6 PG 7 Page faults: 4 7 h h3 5 side channel attack 30

31 Hunspell hash table lookup PG 1 PG 2 PG 3 PG 4 Hash function shuffles the order Low correlation between The address of the head pointer The addresses of the list nodes Low ambiguity a attack hash change channel side size PG 5 PG 6 PG 7 h Page faults: 4 7 h h3 5 side channel attack 31

32 Attack results Implemented 3 attacks (Hunspell, FreeType, libjpeg) on both Haven and InkTag Hunspell (spell checking) ~96% accuracy for novel The Wizard of Oz FreeType(font rendering) 100% accuracy for any English input (letters and punctuation marks) 32

33 libjpeg results 33

34 Performance overhead Non- trivial overhead due to expensive page fault handling The attacks are still realistic to execute Hunspell: 2.94s to check the entire novel (39,719 words) FreeType: 0.52s to render 5 KB text Small run time may be hidden in noises 34

35 Thoughts on potential mitigations Ø No great off- the- shelf solution Applications: rewrite to hide access patterns Manually (e.g., OpenSSL) or by compiler High cost for complex legacy apps: engineering effort & performance overhead Shielding systems:more restrictions over the OS Restrictions on memory management May affect functionality Rethink the challenges for Overshadow s vision protect legacy applications from legacy untrusted operating systems 35

36 Conclusion An untrusted OS can construct noise- free side channels. The page- fault side channel leaks large amounts of information about legacy applications. Controlled- channel attacks must be addressed in the design of shielding systems. 36

Controlled-Channel Attacks: Deterministic Side Channels for Untrusted Operating Systems. Yuanzhong Xu, Weidong Cui, Marcus Peinado

Controlled-Channel Attacks: Deterministic Side Channels for Untrusted Operating Systems. Yuanzhong Xu, Weidong Cui, Marcus Peinado : Deterministic Side Channels for Untrusted Operating Systems Yuanzhong Xu, Weidong Cui, Marcus Peinado 2 Goal Protect the data of applications running on remote hardware 3 New tech Trusted Platform Modules

More information

Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX

Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX W. Wang, G. Chen, X, Pan, Y. Zhang, XF. Wang, V. Bindschaedler, H. Tang, C. Gunter. September 19, 2017 Motivation Intel

More information

Hardware Enclave Attacks CS261

Hardware Enclave Attacks CS261 Hardware Enclave Attacks CS261 Threat Model of Hardware Enclaves Intel Attestation Service (IAS) Process Enclave Untrusted Trusted Enclave Code Enclave Data Process Process Other Enclave OS and/or Hypervisor

More information

T-SGX: Eradicating Controlled-Channel

T-SGX: Eradicating Controlled-Channel T-SGX: Eradicating Controlled-Channel Attacks Against Enclave Programs Ming-Wei Shih Sangho Lee Taesoo Kim Marcus Peinado Georgia Institute of Technology Microsoft Research 2 3 Intel SGX aims to secure

More information

Ryoan: A Distributed Sandbox for Untrusted Computation on Secret Data

Ryoan: A Distributed Sandbox for Untrusted Computation on Secret Data Ryoan: A Distributed Sandbox for Untrusted Computation on Secret Data Tyler Hunt, Zhiting Zhu, Yuanzhong Xu, Simon Peter, and Emmett Witchel University of Texas at Austin OSDI 2016 Presented by John Alsop

More information

RISCV with Sanctum Enclaves. Victor Costan, Ilia Lebedev, Srini Devadas

RISCV with Sanctum Enclaves. Victor Costan, Ilia Lebedev, Srini Devadas RISCV with Sanctum Enclaves Victor Costan, Ilia Lebedev, Srini Devadas Today, privilege implies trust (1/3) If computing remotely, what is the TCB? Priviledge CPU HW Hypervisor trusted computing base OS

More information

Avoiding Leakage and Synchronization Attacks through Enclave-Side Preemption Control

Avoiding Leakage and Synchronization Attacks through Enclave-Side Preemption Control Avoiding Leakage and Synchronization Attacks through Enclave-Side Preemption Control Marcus Völp, Adam Lackorzynski *, Jérémie Decouchant, Vincent Rahli, Francisco Rocha, and Paulo Esteves-Veríssimo University

More information

SafeBricks: Shielding Network Functions in the Cloud

SafeBricks: Shielding Network Functions in the Cloud SafeBricks: Shielding Network Functions in the Cloud Rishabh Poddar, Chang Lan, Raluca Ada Popa, Sylvia Ratnasamy UC Berkeley Network Functions (NFs) in the cloud Clients 2 Enterprise Destination Network

More information

VIRTUAL MEMORY II. Jo, Heeseung

VIRTUAL MEMORY II. Jo, Heeseung VIRTUAL MEMORY II Jo, Heeseung TODAY'S TOPICS How to reduce the size of page tables? How to reduce the time for address translation? 2 PAGE TABLES Space overhead of page tables The size of the page table

More information

Virtual Machine Virtual Machine Types System Virtual Machine: virtualize a machine Container: virtualize an OS Program Virtual Machine: virtualize a process Language Virtual Machine: virtualize a language

More information

Varys. Protecting SGX Enclaves From Practical Side-Channel Attacks. Oleksii Oleksenko, Bohdan Trach. Mark Silberstein

Varys. Protecting SGX Enclaves From Practical Side-Channel Attacks. Oleksii Oleksenko, Bohdan Trach. Mark Silberstein Varys Protecting SGX Enclaves From Practical Side-Channel Attacks Oleksii Oleksenko, Bohdan Trach Robert Krahn, Andre Martin, Christof Fetzer Mark Silberstein Key issue of the cloud: We cannot trust it

More information

Spectre and Meltdown. Clifford Wolf q/talk

Spectre and Meltdown. Clifford Wolf q/talk Spectre and Meltdown Clifford Wolf q/talk 2018-01-30 Spectre and Meltdown Spectre (CVE-2017-5753 and CVE-2017-5715) Is an architectural security bug that effects most modern processors with speculative

More information

Address Translation. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Address Translation. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University Address Translation Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics How to reduce the size of page tables? How to reduce the time for

More information

Shreds: S H R E. Fine-grained Execution Units with Private Memory. Yaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long Lu D S

Shreds: S H R E. Fine-grained Execution Units with Private Memory. Yaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long Lu D S Shreds: S H R E D S Fine-grained Execution Units with Private Memory Yaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long Lu RiS3 Lab / Computer Science / Stony Brook University 1 Execution Units

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 20 Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Pages Pages and frames Page

More information

INFLUENTIAL OPERATING SYSTEM RESEARCH: SECURITY MECHANISMS AND HOW TO USE THEM CARSTEN WEINHOLD

INFLUENTIAL OPERATING SYSTEM RESEARCH: SECURITY MECHANISMS AND HOW TO USE THEM CARSTEN WEINHOLD Faculty of Computer Science Institute of Systems Architecture, Operating Systems Group INFLUENTIAL OPERATING SYSTEM RESEARCH: SECURITY MECHANISMS AND HOW TO USE THEM CARSTEN WEINHOLD OVERVIEW Fundamental

More information

CSC 5930/9010 Cloud S & P: Virtualization

CSC 5930/9010 Cloud S & P: Virtualization CSC 5930/9010 Cloud S & P: Virtualization Professor Henry Carter Fall 2016 Recap Network traffic can be encrypted at different layers depending on application needs TLS: transport layer IPsec: network

More information

arxiv: v2 [cs.cr] 30 Aug 2017

arxiv: v2 [cs.cr] 30 Aug 2017 Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX Wenhao Wang 1, Guoxing Chen 3, Xiaorui Pan 2, Yinqian Zhang 3, XiaoFeng Wang 2, Vincent Bindschaedler 4, Haixu Tang 2,

More information

Secure Computation Interfaces

Secure Computation Interfaces Secure Computation Interfaces Manuel Costa, Orion Hodson, Marcus Peinado, Sriram Rajamani, Mark Russinovich, Kapil Vaswani Introduction Applications such as secure Hadoop [1] need to have part of their

More information

Influential OS Research Security. Michael Raitza

Influential OS Research Security. Michael Raitza Influential OS Research Security Michael Raitza raitza@os.inf.tu-dresden.de 1 Security recap Various layers of security Application System Communication Aspects of security Access control / authorization

More information

Memory Management. Dr. Yingwu Zhu

Memory Management. Dr. Yingwu Zhu Memory Management Dr. Yingwu Zhu Big picture Main memory is a resource A process/thread is being executing, the instructions & data must be in memory Assumption: Main memory is super big to hold a program

More information

BUILDING SECURE (CLOUD) APPLICATIONS USING INTEL S SGX

BUILDING SECURE (CLOUD) APPLICATIONS USING INTEL S SGX BUILDING SECURE (CLOUD) APPLICATIONS USING INTEL S SGX FLORIAN KERSCHBAUM, UNIVERSITY OF WATERLOO JOINT WORK WITH BENNY FUHRY (SAP), ANDREAS FISCHER (SAP) AND MANY OTHERS DO YOU TRUST YOUR CLOUD SERVICE

More information

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor? Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor? Mr. Jacob Torrey May 13, 2014 Dartmouth College 153 Brooks Road, Rome, NY 315.336.3306 http://ainfosec.com @JacobTorrey torreyj@ainfosec.com

More information

Side Channels and Runtime Encryption Solutions with Intel SGX

Side Channels and Runtime Encryption Solutions with Intel SGX Leader in Runtime Encryption Whitepaper Side Channels and Runtime Encryption Solutions with Intel SGX by Andy Leiserson, Chief Architect at Fortanix Executive Summary Introduction to Side Channel Attacks

More information

Chapter 8 Main Memory

Chapter 8 Main Memory COP 4610: Introduction to Operating Systems (Spring 2014) Chapter 8 Main Memory Zhi Wang Florida State University Contents Background Swapping Contiguous memory allocation Paging Segmentation OS examples

More information

SGXBounds Memory Safety for Shielded Execution

SGXBounds Memory Safety for Shielded Execution SGXBounds Memory Safety for Shielded Execution Dmitrii Kuvaiskii, Oleksii Oleksenko, Sergei Arnautov, Bohdan Trach, Pramod Bhatotia *, Pascal Felber, Christof Fetzer TU Dresden, * The University of Edinburgh,

More information

A Comparison Study of Intel SGX and AMD Memory Encryption Technology

A Comparison Study of Intel SGX and AMD Memory Encryption Technology A Comparison Study of Intel SGX and AMD Memory Encryption Technology Saeid Mofrad, Fengwei Zhang Shiyong Lu Wayne State University {saeid.mofrad, Fengwei, Shiyong}@wayne.edu Weidong Shi (Larry) University

More information

Meltdown and Spectre - understanding and mitigating the threats

Meltdown and Spectre - understanding and mitigating the threats Meltdown and Spectre - understanding and mitigating the threats Gratuitous vulnerability logos Jake Williams @MalwareJake SANS / Rendition Infosec sans.org / rsec.us @RenditionSec The sky isn t falling!

More information

Ascend: Architecture for Secure Computation on Encrypted Data Oblivious RAM (ORAM)

Ascend: Architecture for Secure Computation on Encrypted Data Oblivious RAM (ORAM) CSE 5095 & ECE 4451 & ECE 5451 Spring 2017 Lecture 7b Ascend: Architecture for Secure Computation on Encrypted Data Oblivious RAM (ORAM) Marten van Dijk Syed Kamran Haider, Chenglu Jin, Phuong Ha Nguyen

More information

Main Memory. Electrical and Computer Engineering Stephen Kim ECE/IUPUI RTOS & APPS 1

Main Memory. Electrical and Computer Engineering Stephen Kim ECE/IUPUI RTOS & APPS 1 Main Memory Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 Main Memory Background Swapping Contiguous allocation Paging Segmentation Segmentation with paging

More information

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation

More information

Virtualization. Operating Systems, 2016, Meni Adler, Danny Hendler & Amnon Meisels

Virtualization. Operating Systems, 2016, Meni Adler, Danny Hendler & Amnon Meisels Virtualization Operating Systems, 2016, Meni Adler, Danny Hendler & Amnon Meisels 1 What is virtualization? Creating a virtual version of something o Hardware, operating system, application, network, memory,

More information

Lecture Secure, Trusted and Trustworthy Computing Introduction to SGX

Lecture Secure, Trusted and Trustworthy Computing Introduction to SGX Lecture Secure, and Trustworthy Computing Introduction to Prof. Dr.-Ing. Ahmad-Reza Sadeghi System Security Lab Technische Universität Darmstadt Germany Winter Term 2016/17 Intel Software Guard Extensions

More information

SGX Security Background. Masab Ahmad Department of Electrical and Computer Engineering University of Connecticut

SGX Security Background. Masab Ahmad Department of Electrical and Computer Engineering University of Connecticut SGX Security Background Masab Ahmad masab.ahmad@uconn.edu Department of Electrical and Computer Engineering University of Connecticut 1 Security Background Outline Cryptographic Primitives Cryptographic

More information

Racing in Hyperspace: Closing Hyper-Threading Side Channels on SGX with Contrived Data Races. CS 563 Young Li 10/31/18

Racing in Hyperspace: Closing Hyper-Threading Side Channels on SGX with Contrived Data Races. CS 563 Young Li 10/31/18 Racing in Hyperspace: Closing Hyper-Threading Side Channels on SGX with Contrived Data Races CS 563 Young Li 10/31/18 Intel Software Guard extensions (SGX) and Hyper-Threading What is Intel SGX? Set of

More information

Memory Management. Dr. Yingwu Zhu

Memory Management. Dr. Yingwu Zhu Memory Management Dr. Yingwu Zhu Big picture Main memory is a resource A process/thread is being executing, the instructions & data must be in memory Assumption: Main memory is infinite Allocation of memory

More information

Main Memory (Part II)

Main Memory (Part II) Main Memory (Part II) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Main Memory 1393/8/17 1 / 50 Reminder Amir H. Payberah

More information

CS399 New Beginnings. Jonathan Walpole

CS399 New Beginnings. Jonathan Walpole CS399 New Beginnings Jonathan Walpole Virtual Memory (1) Page Tables When and why do we access a page table? - On every instruction to translate virtual to physical addresses? Page Tables When and why

More information

SGX Enclave Life Cycle Tracking TLB Flushes Security Guarantees

SGX Enclave Life Cycle Tracking TLB Flushes Security Guarantees CSE 5095 & ECE 4451 & ECE 5451 Spring 2017 Lecture 3b SGX Enclave Life Cycle Tracking TLB Flushes Security Guarantees Slide deck extracted from Kamran s tutorial on SGX and Chenglu s security analysis

More information

Advanced Systems Security: Virtual Machine Systems

Advanced Systems Security: Virtual Machine Systems Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Advanced Systems Security:

More information

Meltdown and Spectre - understanding and mitigating the threats (Part Deux)

Meltdown and Spectre - understanding and mitigating the threats (Part Deux) Meltdown and Spectre - understanding and mitigating the threats (Part Deux) Gratuitous vulnerability logos Jake Williams @MalwareJake SANS / Rendition Infosec sans.org / rsec.us @SANSInstitute / @RenditionSec

More information

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives Virtual Machines Resource Virtualization Separating the abstract view of computing resources from the implementation of these resources

More information

Virtual Memory 1. To do. q Segmentation q Paging q A hybrid system

Virtual Memory 1. To do. q Segmentation q Paging q A hybrid system Virtual Memory 1 To do q Segmentation q Paging q A hybrid system Address spaces and multiple processes IBM OS/360 Split memory in n parts (possible!= sizes) A process per partition Program Code Heap Operating

More information

Cache Side Channel Attacks on Intel SGX

Cache Side Channel Attacks on Intel SGX Cache Side Channel Attacks on Intel SGX Princeton University Technical Report CE-L2017-001 January 2017 Zecheng He Ruby B. Lee {zechengh, rblee}@princeton.edu Department of Electrical Engineering Princeton

More information

Topic 18: Virtual Memory

Topic 18: Virtual Memory Topic 18: Virtual Memory COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Virtual Memory Any time you see virtual, think using a level of indirection

More information

Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX

Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX Leak Cauldron on the Dark Land: Understanding Memor Side-Channel Hazards in SGX 1,4 Wenhao Wang, 2 Guoxing Chen, 1 Xiaorui Pan, 2 Yinqian Zhang, 1 XiaoFeng Wang, 3 Vincent Bindschaedler, 1 Haixu Tang and

More information

System-Level Protection Against Cache-Based Side Channel Attacks in the Cloud. Taesoo Kim, Marcus Peinado, Gloria Mainar-Ruiz

System-Level Protection Against Cache-Based Side Channel Attacks in the Cloud. Taesoo Kim, Marcus Peinado, Gloria Mainar-Ruiz System-Level Protection Against Cache-Based Side Channel Attacks in the Cloud Taesoo Kim, Marcus Peinado, Gloria Mainar-Ruiz MIT CSAIL Microsoft Research Security is a big concern in cloud adoption Why

More information

TRUSTSHADOW: SECURE EXECUTION OF UNMODIFIED APPLICATIONS WITH ARM TRUSTZONE Florian Olschewski

TRUSTSHADOW: SECURE EXECUTION OF UNMODIFIED APPLICATIONS WITH ARM TRUSTZONE Florian Olschewski TRUSTSHADOW: SECURE EXECUTION OF UNMODIFIED APPLICATIONS WITH ARM TRUSTZONE 14.11.2018 Florian Olschewski 1 OUTLINE 1) Introduction 2) Trustzone 3) Threat Model 4) Overview 5) Runtime System 6) Implementation

More information

Introduction to SGX (Software Guard Extensions) and SGX Virtualization. Kai Huang, Jun Nakajima (Speaker) July 12, 2017

Introduction to SGX (Software Guard Extensions) and SGX Virtualization. Kai Huang, Jun Nakajima (Speaker) July 12, 2017 Introduction to SGX (Software Guard Extensions) and SGX Virtualization Kai Huang, Jun Nakajima (Speaker) July 12, 2017 1 INTEL RESTRICTED SECRET Agenda SGX Introduction Xen SGX Virtualization Support Backup

More information

Xen and the Art of Virtualization. CSE-291 (Cloud Computing) Fall 2016

Xen and the Art of Virtualization. CSE-291 (Cloud Computing) Fall 2016 Xen and the Art of Virtualization CSE-291 (Cloud Computing) Fall 2016 Why Virtualization? Share resources among many uses Allow heterogeneity in environments Allow differences in host and guest Provide

More information

CPS 510 final exam, 4/27/2015

CPS 510 final exam, 4/27/2015 CPS 510 final exam, 4/27/2015 Your name please: This exam has 25 questions worth 12 points each. For each question, please give the best answer you can in a few sentences or bullets using the lingo of

More information

Advanced Systems Security: Ordinary Operating Systems

Advanced Systems Security: Ordinary Operating Systems Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Advanced Systems Security:

More information

0x1A Great Papers in Computer Security

0x1A Great Papers in Computer Security CS 380S 0x1A Great Papers in Computer Security Vitaly Shmatikov http://www.cs.utexas.edu/~shmat/courses/cs380s/ slide 1 X. Chen, T, Garfinkel, E. Lewis, P. Subrahmanyam, C. Waldspurger, D. Boneh, J. Dwoskin,

More information

Extended Page Tables (EPT) A VMM must protect host physical memory Multiple guest operating systems share the same host physical memory VMM typically implements protections through page-table shadowing

More information

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University CS 333 Introduction to Operating Systems Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University Virtual addresses Virtual memory addresses (what the process uses) Page

More information

Virtual Memory. Today. Segmentation Paging A good, if common example

Virtual Memory. Today. Segmentation Paging A good, if common example Virtual Memory Today Segmentation Paging A good, if common example Virtual memory system Goals Transparency Programs should not know that memory is virtualized; the OS +HW multiplex memory among processes

More information

Advanced Systems Security: Virtual Machine Systems

Advanced Systems Security: Virtual Machine Systems Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Advanced Systems Security:

More information

Crypto tidbits: misuse, side channels. Slides from Dave Levin 414-spring2016

Crypto tidbits: misuse, side channels. Slides from Dave Levin 414-spring2016 Crypto tidbits: misuse, side channels Slides from Dave Levin 414-spring2016 A paper from 2013 that looked at how Android apps use crypto, as a function of 6 rules that reflect the bare minimum a secure

More information

Basic Memory Management

Basic Memory Management Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester 10/15/14 CSC 2/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it

More information

Intel Software Guard Extensions (Intel SGX) Memory Encryption Engine (MEE) Shay Gueron

Intel Software Guard Extensions (Intel SGX) Memory Encryption Engine (MEE) Shay Gueron Real World Cryptography Conference 2016 6-8 January 2016, Stanford, CA, USA Intel Software Guard Extensions (Intel SGX) Memory Encryption Engine (MEE) Shay Gueron Intel Corp., Intel Development Center,

More information

4. Jump to *RA 4. StackGuard 5. Execute code 5. Instruction Set Randomization 6. Make system call 6. System call Randomization

4. Jump to *RA 4. StackGuard 5. Execute code 5. Instruction Set Randomization 6. Make system call 6. System call Randomization 04/04/06 Lecture Notes Untrusted Beili Wang Stages of Static Overflow Solution 1. Find bug in 1. Static Analysis 2. Send overflowing input 2. CCured 3. Overwrite return address 3. Address Space Randomization

More information

Review for Midterm. Starring Ari and Tyler

Review for Midterm. Starring Ari and Tyler Review for Midterm Starring Ari and Tyler Basic OS structure OS has two chief goals: arbitrating access to resources, and exposing functionality. Often go together: we arbitrate hardware by wrapping in

More information

Introducing the Cray XMT. Petr Konecny May 4 th 2007

Introducing the Cray XMT. Petr Konecny May 4 th 2007 Introducing the Cray XMT Petr Konecny May 4 th 2007 Agenda Origins of the Cray XMT Cray XMT system architecture Cray XT infrastructure Cray Threadstorm processor Shared memory programming model Benefits/drawbacks/solutions

More information

Eleos: Exit-Less OS Services for SGX Enclaves

Eleos: Exit-Less OS Services for SGX Enclaves Eleos: Exit-Less OS Services for SGX Enclaves Meni Orenbach Marina Minkin Pavel Lifshits Mark Silberstein Accelerated Computing Systems Lab Haifa, Israel What do we do? Improve performance: I/O intensive

More information

OS Virtualization. Why Virtualize? Introduction. Virtualization Basics 12/10/2012. Motivation. Types of Virtualization.

OS Virtualization. Why Virtualize? Introduction. Virtualization Basics 12/10/2012. Motivation. Types of Virtualization. Virtualization Basics Motivation OS Virtualization CSC 456 Final Presentation Brandon D. Shroyer Types of Virtualization Process virtualization (Java) System virtualization (classic, hosted) Emulation

More information

Meltdown or "Holy Crap: How did we do this to ourselves" Meltdown exploits side effects of out-of-order execution to read arbitrary kernelmemory

Meltdown or Holy Crap: How did we do this to ourselves Meltdown exploits side effects of out-of-order execution to read arbitrary kernelmemory Meltdown or "Holy Crap: How did we do this to ourselves" Abstract Meltdown exploits side effects of out-of-order execution to read arbitrary kernelmemory locations Breaks all security assumptions given

More information

Intel Virtualization Technology Roadmap and VT-d Support in Xen

Intel Virtualization Technology Roadmap and VT-d Support in Xen Intel Virtualization Technology Roadmap and VT-d Support in Xen Jun Nakajima Intel Open Source Technology Center Legal Disclaimer INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS.

More information

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) Language-based Protection: Solution

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) Language-based Protection: Solution Outline V22.0202-001 Computer Systems Organization II (Honors) (Introductory Operating Systems) Lecture 21 Language-Based Protection Security April 29, 2002 Announcements Lab 6 due back on May 6th Final

More information

CSE 127 Computer Security

CSE 127 Computer Security CSE 127 Computer Security Stefan Savage, Spring 2018, Lecture 19 Hardware Security: Meltdown, Spectre, Rowhammer Vulnerabilities and Abstractions Abstraction Reality Vulnerability Review: ISA and µarchitecture

More information

Isolating Operating System Components with Intel SGX

Isolating Operating System Components with Intel SGX SysTEX 16 Trento, Italy Isolating Operating System Components with Intel SGX Lars Richter, Johannes Götzfried, Tilo Müller Department of Computer Science FAU Erlangen-Nuremberg, Germany December 12, 2016

More information

CSE 4/521 Introduction to Operating Systems. Lecture 14 Main Memory III (Paging, Structure of Page Table) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 14 Main Memory III (Paging, Structure of Page Table) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 14 Main Memory III (Paging, Structure of Page Table) Summer 2018 Overview Objective: To discuss how paging works in contemporary computer systems. Paging

More information

Towards Application Security on Untrusted Operating Systems

Towards Application Security on Untrusted Operating Systems Towards Application Security on Untrusted Operating Systems Dan R. K. Ports MIT CSAIL & VMware Tal Garfinkel VMware Motivation Many applications handle sensitive data financial, medical, insurance, military...

More information

Course Outline. Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems

Course Outline. Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems Course Outline Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems 1 Today: Memory Management Terminology Uniprogramming Multiprogramming Contiguous

More information

Goals of Memory Management

Goals of Memory Management Memory Management Goals of Memory Management Allocate available memory efficiently to multiple processes Main functions Allocate memory to processes when needed Keep track of what memory is used and what

More information

Chapter 8: Memory-Management Strategies

Chapter 8: Memory-Management Strategies Chapter 8: Memory-Management Strategies Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and

More information

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Instructor: Dr. Turgay Korkmaz Department Computer Science The University of Texas at San Antonio Office: NPB

More information

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it to be run Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester Mono-programming

More information

Efficient Memory Integrity Verification and Encryption for Secure Processors

Efficient Memory Integrity Verification and Encryption for Secure Processors Efficient Memory Integrity Verification and Encryption for Secure Processors G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas Massachusetts Institute of Technology New Security

More information

Virtual Memory 2. q Handling bigger address spaces q Speeding translation

Virtual Memory 2. q Handling bigger address spaces q Speeding translation Virtual Memory 2 q Handling bigger address spaces q Speeding translation Two considerations with page tables Mapping must be fast Done on every memory reference, at least 1 per instruction With large address

More information

Lecture 3 MOBILE PLATFORM SECURITY

Lecture 3 MOBILE PLATFORM SECURITY Lecture 3 MOBILE PLATFORM SECURITY You will be learning: What techniques are used in mobile software platform security? What techniques are used in mobile hardware platform security? Is there a common

More information

Virtual Memory: Policies. CS439: Principles of Computer Systems March 5, 2018

Virtual Memory: Policies. CS439: Principles of Computer Systems March 5, 2018 Virtual Memory: Policies CS439: Principles of Computer Systems March 5, 28 Last Time Overlays Paging Pages Page frames Address translation Today s Agenda Paging: Mechanisms Page Tales Page Faults Paging:

More information

Protection. Thierry Sans

Protection. Thierry Sans Protection Thierry Sans Protecting Programs How to lower the risk of a program security flaw resulting from a bug? 1. Build better programs 2. Build better operating systems Build Better Programs Why are

More information

Virtual Memory. Virtual Memory

Virtual Memory. Virtual Memory Virtual Memory Virtual Memory Main memory is cache for secondary storage Secondary storage (disk) holds the complete virtual address space Only a portion of the virtual address space lives in the physical

More information

CPS104 Computer Organization and Programming Lecture 16: Virtual Memory. Robert Wagner

CPS104 Computer Organization and Programming Lecture 16: Virtual Memory. Robert Wagner CPS104 Computer Organization and Programming Lecture 16: Virtual Memory Robert Wagner cps 104 VM.1 RW Fall 2000 Outline of Today s Lecture Virtual Memory. Paged virtual memory. Virtual to Physical translation:

More information

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES OBJECTIVES Detailed description of various ways of organizing memory hardware Various memory-management techniques, including paging and segmentation To provide

More information

Maxoid: Transparently Confining Mobile Applications with Custom Views of State

Maxoid: Transparently Confining Mobile Applications with Custom Views of State Maxoid: Transparently Confining Mobile Applications with Custom Views of State Yuanzhong Xu and Emmett Witchel University of Texas at Austin 4/24/2015 Bordeaux, France Focus of this work Security problems:

More information

Lecture 21. Monday, February 28 CS 470 Operating Systems - Lecture 21 1

Lecture 21. Monday, February 28 CS 470 Operating Systems - Lecture 21 1 Lecture 21 Case study guidelines posted Case study assignments Third project (virtual memory simulation) will go out after spring break. Extra credit fourth project (shell program) will go out after that.

More information

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 8: MEMORY MANAGEMENT By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the

More information

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Chapter 8: Main Memory. Operating System Concepts 9 th Edition Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

Memory: Page Table Structure. CSSE 332 Operating Systems Rose-Hulman Institute of Technology

Memory: Page Table Structure. CSSE 332 Operating Systems Rose-Hulman Institute of Technology Memory: Page Table Structure CSSE 332 Operating Systems Rose-Hulman Institute of Technology General address transla+on CPU virtual address data cache MMU Physical address Global memory Memory management

More information

Practical Protection of Kernel Integrity for Commodity OS from Untrusted Extensions

Practical Protection of Kernel Integrity for Commodity OS from Untrusted Extensions Practical Protection of Kernel Integrity for Commodity OS from Untrusted Extensions Xi Xiong The Pennsylvania State University xixiong@cse.psu.edu Donghai Tian The Pennsylvania State University Beijing

More information

CSE 451: Operating Systems Winter Page Table Management, TLBs and Other Pragmatics. Gary Kimura

CSE 451: Operating Systems Winter Page Table Management, TLBs and Other Pragmatics. Gary Kimura CSE 451: Operating Systems Winter 2013 Page Table Management, TLBs and Other Pragmatics Gary Kimura Moving now from Hardware to how the OS manages memory Two main areas to discuss Page table management,

More information

Usable PIR. Network Security and Applied. Cryptography Laboratory.

Usable PIR. Network Security and Applied. Cryptography Laboratory. Network Security and Applied Cryptography Laboratory http://crypto.cs.stonybrook.edu Usable PIR NDSS '08, San Diego, CA Peter Williams petertw@cs.stonybrook.edu Radu Sion sion@cs.stonybrook.edu ver. 2.1

More information

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 13: Address Translation

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 13: Address Translation CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 Lecture 13: Address Translation 13.0 Main Points 13.1 Hardware Translation Overview CPU Virtual Address Translation

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

Multi-level Translation. CS 537 Lecture 9 Paging. Example two-level page table. Multi-level Translation Analysis

Multi-level Translation. CS 537 Lecture 9 Paging. Example two-level page table. Multi-level Translation Analysis Multi-level Translation CS 57 Lecture 9 Paging Michael Swift Problem: what if you have a sparse address space e.g. out of GB, you use MB spread out need one PTE per page in virtual address space bit AS

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS SPRING 2013 Lecture 13: Paging Prof. Alan Mislove (amislove@ccs.neu.edu) Paging Physical address space of a process can be noncontiguous; process is allocated physical memory

More information

Leveraging Intel SGX to Create a Nondisclosure Cryptographic library

Leveraging Intel SGX to Create a Nondisclosure Cryptographic library CS 2530 - Computer and Network Security Project presentation Leveraging Intel SGX to Create a Nondisclosure Cryptographic library Mohammad H Mofrad & Spencer L Gray University of Pittsburgh Thursday, December

More information

CIS Operating Systems Memory Management Address Translation. Professor Qiang Zeng Fall 2017

CIS Operating Systems Memory Management Address Translation. Professor Qiang Zeng Fall 2017 CIS 5512 - Operating Systems Memory Management Address Translation Professor Qiang Zeng Fall 2017 Outline Fixed partitions Dynamic partitions Con$guous alloca$on: Each process occupies a con$guous memory

More information

Dawn Song

Dawn Song 1 Virtual Machines & Security Dawn Song dawnsong@cs.berkeley.edu Virtual Machines VM: Execution environment that gives the illusion of a real machine VMM/Hypervisor: host software which provides this capability

More information