Back To The Future: A Radical Insecure Design of KVM on ARM

Size: px
Start display at page:

Download "Back To The Future: A Radical Insecure Design of KVM on ARM"

Transcription

1 Back To The Future: A Radical Insecure Design of KVM on ARM Abstract In ARM, there are certain instructions that generate exceptions. Such instructions are typically executed to request a service from the software that runs at a higher privilege level. From OS kernel (EL1), the software can call into hypervisor (EL2) with the HVC instruction. The KVM Hypervisor is a part of the Linux kernel, and it is enabled on all the supported ARM system by default. In this architecture, KVM is implemented as split-mode and runs across differently privileged CPU modes to execute code. This paper discusses the design, along with a vulnerability in the way Linux kernel initializes the KVM Hypervisor. An attacker having access to host EL1 can execute code in EL2. This vulnerability can be exploited by an attacker to install a hypervisor rootkit on ARM systems. Introduction In ARMv8-A, a program executes in one of the four Exception levels. Exception levels determine the level of execution privilege. Execution at ELn corresponds to privilege PLn. Larger value of n mean more privileges. ARMv8-A also provides hardware support for virtualization. The standalone hypervisor runs in EL2 with more privilege than OS kernel running in EL1. The KVM hypervisor is an extension of Linux kernel and is automatically available on devices that are running a recent version of the Linux kernel. Running entire Linux kernel in EL2 has its own problems, so KVM is implemented as split-mode and runs across differently privileged CPU modes. This way, it can take advantage of the functionality offered by each CPU mode. It is divided into two components, the Lowvisor that runs in EL2, and the Highvisor, which runs in EL1. The Lowvisor is designed to take advantage of the hardware virtualization support available in EL2. It provides some key functions like setting up the correct execution context by appropriate configuration of the hardware, and enforces protection and isolation between different execution contexts. The Highvisor runs in kernel mode as part of the host Linux kernel. If the system supports virtualization, Linux starts to boot in EL2 and then installs a hypervisor stub that allows Linux Kernel to further initialize and install KVM Hypervisor. There is a vulnerability in the way Linux kernel initializes the KVM Hypervisor. An attacker having access to host EL1 can exploit this it to execute code in EL2. This paper specifically discusses ARM64v8-A architecture.

2 Background Arm privilege layer and exception vector table In ARMv8-A, a program executes in one of the four Exception levels. Exception levels determine the level of execution privilege. Following is a typical example of what software runs at each Exception level: EL0 Normal user applications. EL1 Operating system kernel typically described as privileged. EL2. Hypervisor. EL3 Low-level firmware, including the Secure Monitor Each exception level has its own exception vector table, that is, there is one for each of EL3, EL2 and EL1. When an exception occurs, the processor must execute handler code that corresponds to the exception. The location in memory where a handler is stored is called the exception vector. In the ARM architecture, exception vectors are stored in a table, called the exception vector table. Vectors for individual exceptions are located at fixed offsets from beginning of the table. The virtual address of each table base is set by the Vector Based Address Registers, namely VBAR_EL3, VBAR_EL2 and VBAR_EL1.

3 The base address is given by VBAR_ELn and then each entry has a defined offset from this base address. Each table has 16 entries, with each entry being 128 bytes (32 instructions) in size. The table effectively consists of 4 sets of 4 entries. Which entry is used depends upon a number of factors: The type of exception (SError, FIQ, IRQ or Synchronous) If the exception is being taken at the same Exception level, the Stack Pointer to be used (SP0 or SPx) If the exception is being taken at a lower Exception level, the execution state of the next lower level (AArch64 or AArch32) Arm Virtual Extension Most mainstream operating systems are built on the assumption that a system has a single privileged OS running several unprivileged applications. ARM virtualization, however, enables more than one OS to co-exist and operate on the same system. Implementing these virtual cores requires both, dedicated hardware extensions (to accelerate switching between virtual machines), and hypervisor software. A new mode, EL2, is introduced to support virtualization in the nonsecure world. El2 is more privileged than user and kernel modes. Software running in EL2 can configure the hardware to trap from kernel mode into EL2 on various sensitive instructions and hardware interrupts. To run VMs, the hypervisor must at least partially reside in EL2. ARM designed the virtualization support around El2 as they envisioned a standalone hypervisor underneath a more complex rich OS. Hypervisors can be broadly classified as Type1 and Type 2 hypervisor. Type 1 are the bare-metal hypervisor and each Virtual Machine (VM) contains a guest OS. Type 2 hypervisors are extensions of the host OS with each subsequent guest OS contained in a separate VM. Unlike Type 1 hypervisors, Type 2 do not consider hosts as VMs. There are two major Open Source

4 hypervisors, KVM, and Xen. The KVM hypervisor, discussed in this paper, is an extension of Linux and is considered as Type 2 hypervisor. KVM Design The KVM hypervisor is an extension of Linux. Although standalone bare metal hypervisor design approach has the potential for better performance and a smaller Trusted Computing Base (TCB), due to diversity in ARM hardware, as compared to x86, this approach is less practical on ARM. Linux, however, is supported across almost all ARM platforms and by integrating KVM with Linux, KVM is automatically available on all devices running a recent version of the Linux kernel. Integration of KVM/ARM in Linux solved the portability and hardware support issues. However, ARM hardware virtualization extensions were designed to support a standalone hypervisor, which is completely separate from any standard kernel. Simply running a hypervisor entirely in EL2 mode is attractive since it is the most privileged level. But, since KVM leverages existing kernel infrastructure such as the scheduler, running KVM in EL2 implies running the entire Linux kernel in EL2. This is considered problematic by the KVM team for various reasons. As a solution for ARMv8.0, KVM introduced split-mode virtualization, a new approach to hypervisor design that splits the core hypervisor so that it runs across different privileged CPU modes and takes advantage of the specific benefits and functionality offered by each CPU mode. KVM uses split-mode virtualization to leverage the ARM hardware virtualization support enabled in EL2, while at the same time, leveraging existing Linux kernel services running in kernel mode. split-mode virtualization allows KVM to be integrated with the Linux kernel without intrusive modifications to the existing code base. This is done by splitting the hypervisor into two components, the Lowvisor, and the Highvisor, as shown in picture below. The Lowvisor is designed to take advantage of the hardware virtualization support available in El2, It provides some key functions like setting up the correct execution context by appropriate configuration of the hardware, and enforces protection and isolation between different execution contexts. The Lowvisor performs only the minimal amount of processing required and defers the bulk of the work to the Highvisor, after a world switch to the Highvisor is complete. The Highvisor runs in kernel mode as part of the host Linux kernel. It can therefore directly leverage existing Linux functionality such as the scheduler, and can also make use of standard kernel software data structures and mechanisms to implement its functionality (such as locking mechanisms and memory allocation functions). This makes higher-level functionality easier to implement in the Highvisor.

5 Note: In ARMv8.1 extension with Virtualization Host Extension, it is possible to run the whole kernel in EL2. Linux Boot and KVM In ARM architecture EL2 is more privileged than the kernel modes (EL1) and there is no architecturally defined ABI for entering to EL2 from less privileged modes. So, in order to support KVM on Linux, Linux starts to boot in El2. Once the kernel is booted in EL2, it installs a stub handler that allows other subsystems like KVM to take control of EL2 mode. After installing the stub, the Linux kernel switches back to EL1 for further boot process. For example, ARM Trusted Firmware which provides a reference implementation of secure world software for ARMv8-A passes controls in EL2 to the normal world software. Following is the code snippet from ARM Trusted Firmware for Resberry Pi 3. The SPSR register is set to transfer control in EL2. For ARM architecture, as soon as Linux boots, it checks the current CPU mode. In case the current mode is EL2, Linux configures EL2 hardware and then installs a hypervisors stub that allows other subsystems like KVM to take control of EL2 mode. Following is the code snippet from the file kernel/arch/arm64/kernel/head.s.

6 If the CPU is in El2, the control is transferred to install_el2_stub which installs the Hypervisor stub. Following is the code snippet from kernel/arch/arm64/kernel/head.s that installs the stub. The above code snippet updates the register VBAR_EL2 so that it points to hyp_stub_vectors vector table. The hyp stub hyp_stub_vectors is defined in the file hyp_stub.s as follow

7 Once VBAR_EL2 is updated with the address of vector table hyp_stub_vectors, the vector table hyp_stub_vectors is installed as an exception vector table for EL2. The function el1_sync, defined at offset 0x400 of vector table, is registered as the handler for Synchronous exception from 64-bit EL1 kernel. Function el1_sync will be invoked as an exception handler if HVC instruction is executed by 64bit kernel. Following is the code snippet for el1_sync function, defined in the file hyp_stub.s

8 el1_sync expects HVC_SET_VECTORS, HVC_SOFT_RESTART and HVC_RESET_VECTORS command from EL1. The register value of X0 determines which command needs to be processed. In case the register x0 is HVC_SET_VECTORS, the VBAR_EL2 register is reset to the new value passed with register x1. The Linux kernel exposes a function hyp_set_vectors, defined in file /kernel/hypstub.s, to install EL2_VBAR table. The Linux kernel code running in EL1, which initializes KVM, uses this interface to install KVM Hypervisor. The function hyp_set_vectors is defined as below. ) Once the EL2 hardware is configured and the stub vector table is installed, Linux kernel switches back to EL1 to perform normal Linux booting. KVM Initialization The Linux kernel begins initialization of KVM by invoking kvm_init function defined in the file linux\kvm\kvm_main.c. This function is called by arm_init function, which is defined in arm.c. The kvm_init function first checks if the CPU is booted in the EL2 mode. In case the CPU is not booted in El2 mode, it returns the following error and no further KVM initialization is done.

9 If CPU is booted in EL2, the function cpu_init_hyp_mode is invoked. This function initializes and installs KVM_Initilization_vector as a new vector table for EL2.The hyp_set_vectors interface is used to install KVM_Initilization_vector. KVM_Initialization_vector is defined as follow in the file hyp-init.s After KVM_Initialization_vector is installed as an exception vector table for EL2, the function do_hyp_init, defined at offset 0x400, is registered as handler for synchronous exception from 64-bit EL1 kernel. Further, after installing KVM_Initialization_vector, the cpu_init_hyp_mode function obtains the pointer for hypervisors page table, hypervisor stack, and the actual hypervisor vector table. Post this, the function cpu_init_hyp_mode(pgd_ptr, hyp_stack_ptr, vector_ptr) is invoked. This function makes HVC call to invoke the exception handler function do_hyp_init and passes the page table, stack, and actual hypervisor vector as parameters. Following is the implementation of cpu_init_hyp_mode function

10 do_hyp_init function is defined in the file Arch/arm64/kvm/hyp-init.s. The implementation is as follows : The function do_hyp_init enables MMU for hypervisor and sets EL2 stack pointer. It then installs actual KVM Hypervisors vector table kvm_hyp_vector. This vector table is defined in the file kvm/hyp/hyp-entry.s as follow

11 Once the actual Hypervisor vector table is installed as an exception vector table for EL2, the function el1_sync, defined at offset 0x400 in kvm_hyp_vector, is registered as a handler for synchronous exception originating from 64-bit EL1 kernel. Following is the code snippet for el1_sync, defined in the file hyp-entry.s. It invokes the function kvm_handle_stub_hvc if the value of x0 register is less than HVC_STUB_HCALL_NR.

12 Following is the code snippet for function kvm_handle_stub_hvc defined in hyp-init.s. If the value in x0 register is equal to #HVC_RESET_VECTORS, the function resets EL2_VBAR back to hyp_stub_vectors. This implies that once the actual hypervisor vector table is installed, it provides an interface to reset VBAR_EL2 back to the initial hypervisor stub. In addition, as discussed earlier, the hypervisor stub provides an interface to update VBAR_EL2 from EL1. So, combining these two commands provides an opportunity for an attacker to execute code in EL2 from EL1. An attacker can exploit this vulnerability and install a hypervisor rootkit that runs with more privileges than that of host kernel, or any security software running in the host kernel.

13

14 Exploit Assuming that an attacker has the execution privilege on host kernel EL1. In order to execute code in EL2, the attacker needs to do the following: 1. Create HVC_RESET_VECTORS exception request. This HVC call will invoke kvm_handle_stub_hvc in EL2, which in turn, will disable Hypervisor MMU and reset the VBAR_EL2 to hyp_stub_vectors. 2. The attacker then allocates a physical continuous memory in the kernel. Here, attacker needs to allocate physical continuous memory because MMU of EL2 is disabled. 3. Attacker embeds the shellcode to be executed in El2 at an offset 0x400 in allocated memory block. The offset 0x400 is set because exception handler for HVC originating from 64bit kernel is at this offset. 4. The attacker then creates HVC_SET_VECTORS HVC call and passes that physical address of the memory buffer allocated in step HVC_SET_VECTORS request will reset the attacker allocated buffer as new exception vector table for EL2. 6. Finally, the attacker can invoke HVC call, which will execute the attacker s shellcode in EL2. Note: Given the current design flaw in KVM, this is just one of many ways that might be used to execute code in EL2 form EL1. Conclusion This security issue was reported to Red Hat Security, who then escalated this issue to KVM team. It can be concluded from the KVM team s response that their threat model does not consider this as a security issue, and they don t care about this vulnerability that KVM adds into the privilege separation boundary. Their assumption may work in some case, but certainly will not work in all case. The attacker can use this design as a booster once they manage to get into the host kernel. They can gain more privileges and migrate to EL2. This provides attackers the following advantages: Attackers can run their code unreferenced by any code running in Linux EL1. Can configure EL2 to get code execution from various different places. Attackers code will run with higher privileges than the security software running in host kernel, and thus, will have an upper hand. Attackers can use it as a generic way to bypass security mechanisms implemented (like Linux Kernel Runtime Guard) in the kernel by escaping to EL2. Attackers can use this to target security monitoring software running in EL2. This design flaw gives attackers opportunity for Blue Pill for KVM on ARM. Mitigation For robust and secure design, the hypervisor initialization should be done first, and once the hypervisors initialization is complete, the controls should be switched back to EL1 to start kernel initialization. This requires a comprehensive design change in KVM. As an interim security improvement, make sure that Linux starts to boot in EL1 and this will disable KVM in your system.

15 References:

AArch64 Virtualization

AArch64 Virtualization Connect AArch64 User Virtualization Guide Version Version 0.11.0 Page 1 of 13 Revision Information The following revisions have been made to this User Guide. Date Issue Confidentiality Change 03 March

More information

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42 Lecture 5 KVM for ARM Christoffer Dall and Jason Nieh Operating Systems Practical 5 November, 2014 OSP Lecture 5, KVM for ARM 1/42 Contents Virtualization KVM Virtualization on ARM KVM/ARM: System architecture

More information

Hypervisors on ARM Overview and Design choices

Hypervisors on ARM Overview and Design choices Hypervisors on ARM Overview and Design choices Julien Grall Root Linux Conference 2017 ARM 2017 About me Working on ARM virtualization for the past 4 years With ARM since 2016 Co-maintaining

More information

EC H2020 dredbox: Seminar School at INSA Rennes

EC H2020 dredbox: Seminar School at INSA Rennes EC H2020 dredbox: Seminar School at INSA Rennes contact@virtualopensystems.com www.virtualopensystems.com Pierre LUCAS 2017-11-22 Open Part 1: Open Company Overview 2 OpenOpen Confidential & Proprietary

More information

Porting bhyve on ARM. Mihai Carabas, Peter Grehan BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016

Porting bhyve on ARM. Mihai Carabas, Peter Grehan BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016 Porting bhyve on ARM Mihai Carabas, Peter Grehan {mihai,grehan}@freebsd.org BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016 About me University POLITEHNICA of Bucharest PhD Student: virtualization

More information

KVM/ARM. Marc Zyngier LPC 12

KVM/ARM. Marc Zyngier LPC 12 KVM/ARM Marc Zyngier LPC 12 For example: if a processor is in Supervisor mode and Secure state, it is in Secure Supervisor mode ARM Architecture if a processor is Virtualization

More information

KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor

KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor Christoffer Dall Department of Computer Science Columbia University cdall@cs.columbia.edu Jason Nieh Department of Compouter Science Columbia

More information

ARMv8-A Software Development

ARMv8-A Software Development ARMv8-A Software Development Course Description ARMv8-A software development is a 4 days ARM official course. The course goes into great depth and provides all necessary know-how to develop software for

More information

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36 The Challenges of X86 Hardware Virtualization GCC- Virtualization: Rajeev Wankar 36 The Challenges of X86 Hardware Virtualization X86 operating systems are designed to run directly on the bare-metal hardware,

More information

Operating System Security

Operating System Security Operating System Security Operating Systems Defined Hardware: I/o...Memory.CPU Operating Systems: Windows or Android, etc Applications run on operating system Operating Systems Makes it easier to use resources.

More information

SFO17-403: Optimizing the Design and Implementation of KVM/ARM

SFO17-403: Optimizing the Design and Implementation of KVM/ARM SFO17-403: Optimizing the Design and Implementation of KVM/ARM Christoffer Dall connect.linaro.org Efficient, isolated duplicate of the real machine Popek and Golberg [Formal requirements for virtualizable

More information

Virtual Machine Security

Virtual Machine Security Virtual Machine Security CSE443 - Spring 2012 Introduction to Computer and Network Security Professor Jaeger www.cse.psu.edu/~tjaeger/cse443-s12/ 1 Operating System Quandary Q: What is the primary goal

More information

CSE543 - Computer and Network Security Module: Virtualization

CSE543 - Computer and Network Security Module: Virtualization CSE543 - Computer and Network Security Module: Virtualization Professor Trent Jaeger CSE543 - Introduction to Computer and Network Security 1 1 Operating System Quandary Q: What is the primary goal of

More information

64-bit ARM Unikernels on ukvm

64-bit ARM Unikernels on ukvm 64-bit ARM Unikernels on ukvm Wei Chen Senior Software Engineer Tokyo / Open Source Summit Japan 2017 2017-05-31 Thanks to Dan Williams, Martin Lucina, Anil Madhavapeddy and other Solo5

More information

Hypervisor security. Evgeny Yakovlev, DEFCON NN, 2017

Hypervisor security. Evgeny Yakovlev, DEFCON NN, 2017 Hypervisor security Evgeny Yakovlev, DEFCON NN, 2017 whoami Low-level development in C and C++ on x86 UEFI, virtualization, security Jetico, Kaspersky Lab QEMU/KVM developer at Virtuozzo 2 Agenda Why hypervisor

More information

CSE543 - Computer and Network Security Module: Virtualization

CSE543 - Computer and Network Security Module: Virtualization CSE543 - Computer and Network Security Module: Virtualization Professor Trent Jaeger CSE543 - Introduction to Computer and Network Security 1 Operating System Quandary Q: What is the primary goal of system

More information

Designing Security & Trust into Connected Devices

Designing Security & Trust into Connected Devices Designing Security & Trust into Connected Devices Eric Wang Sr. Technical Marketing Manager Tech Symposia China 2015 November 2015 Agenda Introduction Security Foundations on ARM Cortex -M Security Foundations

More information

ARMv8: The Next Generation. Minlin Fan & Zenon Xiu December 8, 2015

ARMv8: The Next Generation. Minlin Fan & Zenon Xiu December 8, 2015 ARMv8: The Next Generation Minlin Fan & Zenon Xiu December 8, 2015 1 Introducing Ourselves Minlin Fan Application Engineering Manager Zenon Xiu Application Engineering Software Team Lead 2 ARM Partner

More information

Xen on ARM ARMv7 with virtualization extensions

Xen on ARM ARMv7 with virtualization extensions Xen on ARM ARMv7 with virtualization extensions Stefano Stabellini Why? Why? smartphones: getting smarter Quad-core 1.4 GHz Cortex-A9 ARM Servers coming to market 4GB RAM, 4 cores per node 3 x 6 x 4 x

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

ARMv8 port of the Jailhouse hypervisor

ARMv8 port of the Jailhouse hypervisor Security Level: ARMv8 port of the Jailhouse hypervisor Antonios Motakis antonios.motakis@huawei.com Version: V1.0(20160321) Huawei Technologies Duesseldorf GmbH Acknowledgements Jan Kiszka, SIEMENS (Upstream

More information

CSE543 - Computer and Network Security Module: Virtualization

CSE543 - Computer and Network Security Module: Virtualization CSE543 - Computer and Network Security Module: Virtualization Professor Trent Jaeger CSE543 - Introduction to Computer and Network Security 1 Operating System Quandary Q: What is the primary goal of system

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

Tailoring TrustZone as SMM Equivalent

Tailoring TrustZone as SMM Equivalent presented by Tailoring TrustZone as SMM Equivalent Tony C.S. Lo Senior Manager American Megatrends Inc. UEFI Plugfest March 2016 www.uefi.org 1 Agenda Introduction ARM TrustZone SMM-Like Services in TrustZone

More information

Running Linux at EL2. Linaro Connect BKK16 Christoffer Dall

Running Linux at EL2. Linaro Connect BKK16 Christoffer Dall Running Linux at EL2 Linaro Connect BKK16 Christoffer Dall This Talk Technical Talk Assumes Familiarity with Operating Systems and the ARM architecture Make it interactive! Ask Questions! Virtualization

More information

Using a Separation Kernel to Protect against the Remote Exploitation of Unaltered Passenger Vehicles

Using a Separation Kernel to Protect against the Remote Exploitation of Unaltered Passenger Vehicles Safety & Security for the Connected World Using a Separation Kernel to Protect against the Remote Exploitation of Unaltered Passenger Vehicles 16 th June 2015 Mark Pitchford, Technical Manager, EMEA Today

More information

Operating Systems 4/27/2015

Operating Systems 4/27/2015 Virtualization inside the OS Operating Systems 24. Virtualization Memory virtualization Process feels like it has its own address space Created by MMU, configured by OS Storage virtualization Logical view

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

Privilege Escalation

Privilege Escalation Privilege Coleman Kane Coleman.Kane@ge.com February 9, 2015 Security Vulnerability Assessment Privilege 1 / 14 root, or Privilege or Elevation is the act of gaining access to resources which were intended

More information

Virtualization. Pradipta De

Virtualization. Pradipta De Virtualization Pradipta De pradipta.de@sunykorea.ac.kr Today s Topic Virtualization Basics System Virtualization Techniques CSE506: Ext Filesystem 2 Virtualization? A virtual machine (VM) is an emulation

More information

BUD17-301: KVM/ARM Nested Virtualization. Christoffer Dall

BUD17-301: KVM/ARM Nested Virtualization. Christoffer Dall BUD17-301: KVM/ARM Nested Virtualization Christoffer Dall Nested Virtualization VM VM VM App App App App App VM App Hypervisor Hypervisor Hardware Terminology Nested VM VM Nested VM L2 App App App App

More information

Securing IoT with the ARM mbed ecosystem

Securing IoT with the ARM mbed ecosystem Securing IoT with the ARM mbed ecosystem Xiao Sun / Senior Applications Engineer / ARM ARM mbed Connect / Shenzhen, China December 5, 2016 Lots of interest in IoT security Researchers are looking into

More information

Designing Security & Trust into Connected Devices

Designing Security & Trust into Connected Devices Designing Security & Trust into Connected Devices Eric Wang Senior Technical Marketing Manager Shenzhen / ARM Tech Forum / The Ritz-Carlton June 14, 2016 Agenda Introduction Security Foundations on Cortex-A

More information

To EL2, and Beyond! connect.linaro.org. Optimizing the Design and Implementation of KVM/ARM

To EL2, and Beyond! connect.linaro.org. Optimizing the Design and Implementation of KVM/ARM To EL2, and Beyond! Optimizing the Design and Implementation of KVM/ARM LEADING COLLABORATION IN THE ARM ECOSYSTEM Christoffer Dall Shih-Wei Li connect.linaro.org

More information

Virtualization. Dr. Yingwu Zhu

Virtualization. Dr. Yingwu Zhu Virtualization Dr. Yingwu Zhu Virtualization Definition Framework or methodology of dividing the resources of a computer into multiple execution environments. Types Platform Virtualization: Simulate a

More information

Scotch: Combining Software Guard Extensions and System Management Mode to Monitor Cloud Resource Usage

Scotch: Combining Software Guard Extensions and System Management Mode to Monitor Cloud Resource Usage Scotch: Combining Software Guard Extensions and System Management Mode to Monitor Cloud Resource Usage Kevin Leach 1, Fengwei Zhang 2, and Westley Weimer 1 1 University of Michigan, 2 Wayne State University

More information

Inline Reference Monitoring Techniques

Inline Reference Monitoring Techniques Inline Reference Monitoring Techniques In the last lecture, we started talking about Inline Reference Monitors. The idea is that the policy enforcement code runs with the same address space as the code

More information

Version:1.1. Overview of speculation-based cache timing side-channels

Version:1.1. Overview of speculation-based cache timing side-channels Author: Richard Grisenthwaite Date: January 2018 Version 1.1 Introduction This whitepaper looks at the susceptibility of Arm implementations following recent research findings from security researchers

More information

Cloud Computing Virtualization

Cloud Computing Virtualization Cloud Computing Virtualization Anil Madhavapeddy anil@recoil.org Contents Virtualization. Layering and virtualization. Virtual machine monitor. Virtual machine. x86 support for virtualization. Full and

More information

Designing Security & Trust into Connected Devices

Designing Security & Trust into Connected Devices Designing Security & Trust into Connected Devices Rob Coombs Security Marketing Director TechCon 11/10/15 Agenda Introduction Security Foundations on Cortex-M Security Foundations on Cortex-A Use cases

More information

Qiang Li && Zhibin Hu/Qihoo 360 Gear Team Ruxcon 2016

Qiang Li && Zhibin Hu/Qihoo 360 Gear Team Ruxcon 2016 Qiang Li && Zhibin Hu/Qihoo 360 Gear Team Ruxcon 2016 Who are we Security researcher in Qihoo 360 Inc(Gear Team) Vulnerability discovery and analysis Specialize in QEMU currently 50+ security issues, 33

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

New Approaches to Connected Device Security

New Approaches to Connected Device Security New Approaches to Connected Device Security Erik Jacobson Architecture Marketing Director Arm Arm Techcon 2017 - If you connect it to the Internet, someone will try to hack it. - If what you put on the

More information

Cross-architecture Virtualisation

Cross-architecture Virtualisation Cross-architecture Virtualisation Tom Spink Harry Wagstaff, Björn Franke School of Informatics University of Edinburgh Virtualisation Many of you will be familiar with same-architecture virtualisation

More information

T12: Virtualization: IT Audit and Security Perspectives Jason Chan, VMware

T12: Virtualization: IT Audit and Security Perspectives Jason Chan, VMware T12: Virtualization: IT Audit and Security Perspectives Jason Chan, VMware Virtualization: IT Audit and Security Perspectives Jason Chan Director of Security, VMware Agenda o Background and Disclaimers

More information

HW isolation for automotive environment BoF

HW isolation for automotive environment BoF HW isolation for automotive environment BoF Michele Paolino m.paolino@virtualopensystems.com AGL All Member Meeting 2016, 2016-09-07, Munich, Germany http://www.tapps-project.eu/ Authorship and sponsorship

More information

RA3 - Cortex-A15 implementation

RA3 - Cortex-A15 implementation Formation Cortex-A15 implementation: This course covers Cortex-A15 high-end ARM CPU - Processeurs ARM: ARM Cores RA3 - Cortex-A15 implementation This course covers Cortex-A15 high-end ARM CPU OBJECTIVES

More information

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand Introduction to Virtual Machines Nima Honarmand Virtual Machines & Hypervisors Virtual Machine: an abstraction of a complete compute environment through the combined virtualization of the processor, memory,

More information

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant.

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant. 24-vm.txt Mon Nov 21 22:13:36 2011 1 Notes on Virtual Machines 15-440, Fall 2011 Carnegie Mellon University Randal E. Bryant References: Tannenbaum, 3.2 Barham, et al., "Xen and the art of virtualization,"

More information

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems Lecture 7 Xen and the Art of Virtualization Paul Braham, Boris Dragovic, Keir Fraser et al. Advanced Operating Systems 16 November, 2011 SOA/OS Lecture 7, Xen 1/38 Contents Virtualization Xen Memory CPU

More information

Hardware OS & OS- Application interface

Hardware OS & OS- Application interface CS 4410 Operating Systems Hardware OS & OS- Application interface Summer 2013 Cornell University 1 Today How my device becomes useful for the user? HW-OS interface Device controller Device driver Interrupts

More information

Lec 22: Interrupts. Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University. Announcements

Lec 22: Interrupts. Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University. Announcements Lec 22: Interrupts Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University HW 3 HW4: due this Friday Announcements PA 3 out Nov 14 th Due Nov 25 th (feel free to turn it in early) Demos and

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

Lecture 5: February 3

Lecture 5: February 3 CMPSCI 677 Operating Systems Spring 2014 Lecture 5: February 3 Lecturer: Prashant Shenoy Scribe: Aditya Sundarrajan 5.1 Virtualization Virtualization is a technique that extends or replaces an existing

More information

Virtualization (II) SPD Course 17/03/2010 Massimo Coppola

Virtualization (II) SPD Course 17/03/2010 Massimo Coppola Virtualization (II) SPD Course 17/03/2010 Massimo Coppola The players The Hypervisor (HV) implements the virtual machine emulation to run a Guest OS Provides resources and functionalities to the Guest

More information

Virtualization. Starting Point: A Physical Machine. What is a Virtual Machine? Virtualization Properties. Types of Virtualization

Virtualization. Starting Point: A Physical Machine. What is a Virtual Machine? Virtualization Properties. Types of Virtualization Starting Point: A Physical Machine Virtualization Based on materials from: Introduction to Virtual Machines by Carl Waldspurger Understanding Intel Virtualization Technology (VT) by N. B. Sahgal and D.

More information

Performance Considerations of Network Functions Virtualization using Containers

Performance Considerations of Network Functions Virtualization using Containers Performance Considerations of Network Functions Virtualization using Containers Jason Anderson, et al. (Clemson University) 2016 International Conference on Computing, Networking and Communications, Internet

More information

Virtualization. ! Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often grossly underutilized

Virtualization. ! Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often grossly underutilized Starting Point: A Physical Machine Virtualization Based on materials from: Introduction to Virtual Machines by Carl Waldspurger Understanding Intel Virtualization Technology (VT) by N. B. Sahgal and D.

More information

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation Virtual Memory Topics (Chapter 9) Motivations for VM Address translation 1 Motivations for Virtual Memory Use Physical DRAM as a Cache for the Disk Address space of a process can exceed physical memory

More information

The Remote Exploitation of Unaltered Passenger Vehicles Revisited. 20 th October 2016 Mark Pitchford, Technical Manager, EMEA

The Remote Exploitation of Unaltered Passenger Vehicles Revisited. 20 th October 2016 Mark Pitchford, Technical Manager, EMEA The Remote Exploitation of Unaltered Passenger Vehicles Revisited 20 th October 2016 Mark Pitchford, Technical Manager, EMEA Today s hot topic A few years ago, Lynx presentations at events such as this

More information

Trustzone Security IP for IoT

Trustzone Security IP for IoT Trustzone Security IP for IoT Udi Maor CryptoCell-7xx product manager Systems & Software Group ARM Tech Forum Singapore July 12 th 2017 Why is getting security right for IoT so important? When our everyday

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

ARM Virtualization: Performance and Architectural Implications. Christoffer Dall, Shih-Wei Li, Jin Tack Lim, Jason Nieh, and Georgios Koloventzos

ARM Virtualization: Performance and Architectural Implications. Christoffer Dall, Shih-Wei Li, Jin Tack Lim, Jason Nieh, and Georgios Koloventzos ARM Virtualization: Performance and Architectural Implications Christoffer Dall, Shih-Wei Li, Jin Tack Lim, Jason Nieh, and Georgios Koloventzos ARM Servers ARM Network Equipment Virtualization Virtualization

More information

CS 537 Lecture 2 Computer Architecture and Operating Systems. OS Tasks

CS 537 Lecture 2 Computer Architecture and Operating Systems. OS Tasks CS 537 Lecture 2 Computer Architecture and Operating Systems Michael Swift OS Tasks What is the role of the OS regarding hardware? What does the OS need from hardware to perform this role? 1 Computer Hardware

More information

Virtual Memory Oct. 29, 2002

Virtual Memory Oct. 29, 2002 5-23 The course that gives CMU its Zip! Virtual Memory Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs class9.ppt Motivations for Virtual Memory Use Physical

More information

An Introduction to Platform Security

An Introduction to Platform Security presented by An Introduction to Platform Security Spring 2018 UEFI Seminar and Plugfest March 26-30, 2018 Presented by Brent Holtsclaw and John Loucaides (Intel) Legal Notice No computer system can be

More information

Chapter 5 C. Virtual machines

Chapter 5 C. Virtual machines Chapter 5 C Virtual machines Virtual Machines Host computer emulates guest operating system and machine resources Improved isolation of multiple guests Avoids security and reliability problems Aids sharing

More information

W11 Hyper-V security. Jesper Krogh.

W11 Hyper-V security. Jesper Krogh. W11 Hyper-V security Jesper Krogh jesper_krogh@dell.com Jesper Krogh Speaker intro Senior Solution architect at Dell Responsible for Microsoft offerings and solutions within Denmark Specialities witin:

More information

Secure Containers with EPT Isolation

Secure Containers with EPT Isolation Secure Containers with EPT Isolation Chunyan Liu liuchunyan9@huawei.com Jixing Gu jixing.gu@intel.com Presenters Jixing Gu: Software Architect, from Intel CIG SW Team, working on secure container solution

More information

Virtual machine architecture and KVM analysis D 陳彥霖 B 郭宗倫

Virtual machine architecture and KVM analysis D 陳彥霖 B 郭宗倫 Virtual machine architecture and KVM analysis D97942011 陳彥霖 B96902030 郭宗倫 Virtual machine monitor serves as an interface between hardware and software; no matter what kind of hardware under, software can

More information

Dan Noé University of New Hampshire / VeloBit

Dan Noé University of New Hampshire / VeloBit Dan Noé University of New Hampshire / VeloBit A review of how the CPU works The operating system kernel and when it runs User and kernel mode Device drivers Virtualization of memory Virtual memory Paging

More information

kguard++: Improving the Performance of kguard with Low-latency Code Inflation

kguard++: Improving the Performance of kguard with Low-latency Code Inflation kguard++: Improving the Performance of kguard with Low-latency Code Inflation Jordan P. Hendricks Brown University Abstract In this paper, we introduce low-latency code inflation for kguard, a GCC plugin

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

Xen Summit Spring 2007

Xen Summit Spring 2007 Xen Summit Spring 2007 Platform Virtualization with XenEnterprise Rich Persaud 4/20/07 Copyright 2005-2006, XenSource, Inc. All rights reserved. 1 Xen, XenSource and XenEnterprise

More information

ARM CORTEX-R52. Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture.

ARM CORTEX-R52. Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture. ARM CORTEX-R52 Course Family: ARMv8-R Cortex-R CPU Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture. Duration: 4 days Prerequisites and related

More information

Kernel Support for Paravirtualized Guest OS

Kernel Support for Paravirtualized Guest OS Kernel Support for Paravirtualized Guest OS Shibin(Jack) Xu University of Washington shibix@cs.washington.edu ABSTRACT Flexibility at the Operating System level is one of the most important factors for

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

G Xen and Nooks. Robert Grimm New York University

G Xen and Nooks. Robert Grimm New York University G22.3250-001 Xen and Nooks Robert Grimm New York University Agenda! Altogether now: The three questions! The (gory) details of Xen! We already covered Disco, so let s focus on the details! Nooks! The grand

More information

Linux and Xen. Andrea Sarro. andrea.sarro(at)quadrics.it. Linux Kernel Hacking Free Course IV Edition

Linux and Xen. Andrea Sarro. andrea.sarro(at)quadrics.it. Linux Kernel Hacking Free Course IV Edition Linux and Xen Andrea Sarro andrea.sarro(at)quadrics.it Linux Kernel Hacking Free Course IV Edition Andrea Sarro (andrea.sarro(at)quadrics.it) Linux and Xen 07/05/2008 1 / 37 Introduction Xen and Virtualization

More information

Xen and the Art of Virtualization

Xen and the Art of Virtualization Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield Presented by Thomas DuBuisson Outline Motivation

More information

Arsenal. Shadow-Box: Lightweight Hypervisor-Based Kernel Protector. Seunghun Han, Jungwhan Kang (hanseunghun

Arsenal. Shadow-Box: Lightweight Hypervisor-Based Kernel Protector. Seunghun Han, Jungwhan Kang (hanseunghun Arsenal Shadow-Box: Lightweight Hypervisor-Based Kernel Protector Seunghun Han, Jungwhan Kang (hanseunghun ultract)@nsr.re.kr Who are we? - Senior security researcher at NSR (National Security Research

More information

The Next Steps in the Evolution of Embedded Processors

The Next Steps in the Evolution of Embedded Processors The Next Steps in the Evolution of Embedded Processors Terry Kim Staff FAE, ARM Korea ARM Tech Forum Singapore July 12 th 2017 Cortex-M Processors Serving Connected Applications Energy grid Automotive

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

The Next Steps in the Evolution of ARM Cortex-M

The Next Steps in the Evolution of ARM Cortex-M The Next Steps in the Evolution of ARM Cortex-M Joseph Yiu Senior Embedded Technology Manager CPU Group ARM Tech Symposia China 2015 November 2015 Trust & Device Integrity from Sensor to Server 2 ARM 2015

More information

Virtualization for Embedded Systems

Virtualization for Embedded Systems Is an open source solution right for you? 6/26/2013 Julia Keffer Page i Table of Contents Table of Contents Introduction... 1 What is Virtualization?... 1 Virtualization Applications... 2 Operating Systems

More information

OS Security IV: Virtualization and Trusted Computing

OS Security IV: Virtualization and Trusted Computing 1 OS Security IV: Virtualization and Trusted Computing Chengyu Song Slides modified from Dawn Song 2 Administrivia Lab2 More questions? 3 Virtual machine monitor +-----------+----------------+-------------+

More information

Lecture 2: September 9

Lecture 2: September 9 CMPSCI 377 Operating Systems Fall 2010 Lecture 2: September 9 Lecturer: Prashant Shenoy TA: Antony Partensky & Tim Wood 2.1 OS & Computer Architecture The operating system is the interface between a user

More information

System Call. Preview. System Call. System Call. System Call 9/7/2018

System Call. Preview. System Call. System Call. System Call 9/7/2018 Preview Operating System Structure Monolithic Layered System Microkernel Virtual Machine Process Management Process Models Process Creation Process Termination Process State Process Implementation Operating

More information

I/O and virtualization

I/O and virtualization I/O and virtualization CSE-C3200 Operating systems Autumn 2015 (I), Lecture 8 Vesa Hirvisalo Today I/O management Control of I/O Data transfers, DMA (Direct Memory Access) Buffering Single buffering Double

More information

Secure In-VM Monitoring Using Hardware Virtualization

Secure In-VM Monitoring Using Hardware Virtualization Secure In-VM Monitoring Using Hardware Virtualization Monirul Sharif Georgia Institute of Technology Atlanta, GA, USA msharif@cc.gatech.edu Wenke Lee Georgia Institute of Technology Atlanta, GA, USA wenke@cc.gatech.edu

More information

Version:2.1. Overview of speculation-based cache timing side-channels

Version:2.1. Overview of speculation-based cache timing side-channels Date: May 2018 Version 2.1 Introduction This whitepaper looks at the susceptibility of Arm implementations following recent research findings from security researchers at Google on new potential cache

More information

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy COMPUTER ARCHITECTURE Virtualization and Memory Hierarchy 2 Contents Virtual memory. Policies and strategies. Page tables. Virtual machines. Requirements of virtual machines and ISA support. Virtual machines:

More information

Real-time Monitoring, Inventory and Change Tracking for. Track. Report. RESOLVE!

Real-time Monitoring, Inventory and Change Tracking for. Track. Report. RESOLVE! Real-time Monitoring, Inventory and Change Tracking for Track. Report. RESOLVE! Powerful Monitoring Tool for Full Visibility over Your Hyper-V Environment VirtualMetric provides the most comprehensive

More information

Virtualization Device Emulator Testing Technology. Speaker: Qinghao Tang Title 360 Marvel Team Leader

Virtualization Device Emulator Testing Technology. Speaker: Qinghao Tang Title 360 Marvel Team Leader Virtualization Device Emulator Testing Technology Speaker: Qinghao Tang Title 360 Marvel Team Leader 1 360 Marvel Team Established in May 2015, the first professional could computing and virtualization

More information

Motivations for Virtual Memory Virtual Memory Oct. 29, Why VM Works? Motivation #1: DRAM a Cache for Disk

Motivations for Virtual Memory Virtual Memory Oct. 29, Why VM Works? Motivation #1: DRAM a Cache for Disk class8.ppt 5-23 The course that gives CMU its Zip! Virtual Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs Motivations for Virtual Use Physical DRAM as a Cache

More information

CS 550 Operating Systems Spring Introduction to Virtual Machines

CS 550 Operating Systems Spring Introduction to Virtual Machines CS 550 Operating Systems Spring 2018 Introduction to Virtual Machines 1 How to share a physical computer Operating systems allows multiple processes/applications to run simultaneously Via process/memory

More information

ARM Security Solutions and Numonyx Authenticated Flash

ARM Security Solutions and Numonyx Authenticated Flash ARM Security Solutions and Numonyx Authenticated Flash How to integrate Numonyx Authenticated Flash with ARM TrustZone* for maximum system protection Introduction Through a combination of integrated hardware

More information

Do as I Say not as I Do Stealth Modification of Programmable Logic Controllers I/O by Pin Control Attack

Do as I Say not as I Do Stealth Modification of Programmable Logic Controllers I/O by Pin Control Attack Do as I Say not as I Do Stealth Modification of Programmable Logic Controllers I/O by Pin Control Attack ALI ABBASI SYSSEC GROUP, RUHR UNIVERSITY BOCHUM, GERMANY & SCS GROUP UNIVERSITY OF TWENTE, NETHERLANDS

More information

Cortex-A15 MPCore Software Development

Cortex-A15 MPCore Software Development Cortex-A15 MPCore Software Development Course Description Cortex-A15 MPCore software development is a 4 days ARM official course. The course goes into great depth and provides all necessary know-how to

More information

Virtualization. Virtualization

Virtualization. Virtualization Virtualization Virtualization Memory virtualization Process feels like it has its own address space Created by MMU, configured by OS Storage virtualization Logical view of disks connected to a machine

More information