Tailoring TrustZone as SMM Equivalent

Similar documents
ARM Trusted Firmware ARM UEFI SCT update

UEFI updates, Secure firmware and Secure Services on Arm

ARM Server s Firmware Security

Standardized Firmware for ARMv8 based Volume Servers

Manufacturing Tools in the UEFI Secure Boot Environment

Designing Security & Trust into Connected Devices

UEFI What is it? Spring 2017 UEFI Seminar and Plugfest March 27-31, 2017 Presented by Dong Wei (ARM) presented by. Updated

Designing Security & Trust into Connected Devices

System Prep Applications A Powerful New Feature in UEFI 2.5

PreBoot Provisioning Solutions with UEFI

Designing Security & Trust into Connected Devices

The Role UEFI Technologies Play in ARM Platform Architecture

General Firmware Overview of Recommendations for Window OS

An Introduction to Platform Security

AMD Security and Server innovation

Beyond TrustZone Security Enclaves Reed Hinkel Senior Manager Embedded Security Market Develop

UEFI in Arm Platform Architecture

HW isolation for automotive environment BoF

UEFI Plugfest March

Trustzone Security IP for IoT

UEFI ARM Update. UEFI PlugFest March 18-22, 2013 Andrew N. Sloss (ARM, Inc.) presented by

Attacking and Defending the Platform

ARM Trusted Firmware From Embedded to Enterprise. Dan Handley

ARM Trusted Firmware Evolution HKG15 February Andrew Thoelke Systems & Software, ARM

UEFI and the Security Development Lifecycle

UEFI ARM Update. Presented by Mitch Ishihara. UEFI Plugfest October presented by

UEFI and IoT: Best Practices in Developing IoT Firmware Solutions

Beyond TrustZone PSA Reed Hinkel Senior Manager Embedded Security Market Development

Past, Present, and Future Justin Johnson Senior Principal Firmware Engineer

How to protect Automotive systems with ARM Security Architecture

The TPM 2.0 specs are here, now what?

Trusted Execution Environments (TEE) and the Open Trust Protocol (OTrP) Hannes Tschofenig and Mingliang Pei 16 th July IETF 99 th, Prague

HOW TO INTEGRATE NFC FRONTENDS IN LINUX

ARM Security Solutions and Numonyx Authenticated Flash

System Firmware and Device Firmware Updates using Unified Extensible Firmware Interface (UEFI) Capsules

Beyond TrustZone PSA. Rob Coombs Security Director. Part1 - PSA Tech Seminars Arm Limited

Dynamic secure firmware configuration. Dan Handley (Arm)

UEFI Test Tools For Linux Developers

Firmware Implementation Techniques to Achieve Windows 8 Fast Boot

A New Security Platform for High Performance Client SoCs

Implementing Secure Boot: A Refresher on Key & Database Configuration

Reliability, Availability, and Serviceability (RAS) on AArch64. Fu Wei (Linaro LEG) Supreeth Venkatesh (ARM)

Beyond TrustZone Part 1 - PSA

O p t i m i z e d U E F I I m p l e m e n t a t i o n o n I n t e l X e o n B a s e d O C P P l a t f o r m

Non-Trusted. software. data. hardware. Open Source Secure World Software Trusted Firmware. Trusted. software. data. Update October 2018

SIERRAWARE SIERRATEE FOR MIPS OMNISHIELD

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

OP-TEE Using TrustZone to Protect Our Own Secrets

Digging Into The Core of Boot

Embedded Base Boot Requirements. Dong Wei

Comparison on BIOS between UEFI and Legacy

Strengthening the Chain of Trust. Kevin Lane HP Jeff Bobzin Insyde Software

Debugging under Unified Extensible Firmware Interface (UEFI): Addressing DXE Driver Challenges

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

"Last Mile" Barriers to Removing Legacy BIOS

Microsoft UEFI Certification Authority

Trusted Firmware Deep Dive. Dan Handley Charles Garcia-Tobin

ServerReady and Open Standards Accelerating Delivery

A Developer's Guide to Security on Cortex-M based MCUs

Reliability, Availability, and Serviceability(RAS) on ARM64. Wei Fu

Leveraging Windows Update to Distribute Firmware Updates Model Based Servicing (MBS)

Using the UEFI Shell. October 2010 UEFI Taipei Plugfest Insyde Software

UEFI Security Response Team (USRT)

Windows IoT Security. Jackie Chang Sr. Program Manager

The Next Steps in the Evolution of ARM Cortex-M

The Next Steps in the Evolution of Embedded Processors

New Approaches to Connected Device Security

Securing IoT with the ARM mbed ecosystem

UEFI Forum Update. UEFI Spring Plugfest March 29-31, 2016 Presented by Dong Wei (The UEFI Forum)

Enabling Advanced NVMe Features Through UEFI

OS Security IV: Virtualization and Trusted Computing

Komodo: Using Verification to Disentangle Secure-Enclave Hardware from Software

Spring 2018 UEFI Plugfest

Arm Server Ready. Dong Wei

Resilient IoT Security: The end of flat security models

Engineering UEFI Firmware for Windows: Best Practices and Pitfalls to Avoid

Intel Transparent Computing

Implementing MicroPython as a UEFI Test Framework

UEFI, SecureBoot, DeviceGuard, TPM a WHB (un)related technologies

Introduction to Standards based approach to Server

UEFI Porting Update for ARM Platforms

ARMv8-A Software Development

QSEE TrustZone Kernel Integer Overflow Vulnerability

Firmware Test Suite - Uses, Development, Contribution and GPL

Microsoft Sample Code on GitHub and Walkthrough on Firmware Updates to Windows Update (WU)

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

UEFI State of the Union Ecosystem enabling update

UEFI and PCI bootkits. Pierre Chifflier PacSec 2013

Mark Tuttle, Lee Rosenbaum, Oleksandr Bazhaniuk, John Loucaides, Vincent Zimmer Intel Corporation. August 10, 2015

ARM64 Server RAS Solutions. Jonathan (Zhixiong) Zhang Cavium Inc.

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

Lessons Learned from Implementing a Wi-Fi and BT Stack

UEFI Manageability and REST Services

Smart Antennas and Hypervisor: Enabling Secure Convergence. July 5, 2017

HOW TO INTEGRATE NFC CONTROLLERS IN LINUX

Introduction to Intel Boot Loader Development Kit (Intel BLDK) Intel SSG/SSD/UEFI

IoT It s All About Security

Fundamentals of HW-based Security

ACRN: A Big Little Hypervisor for IoT Development

Designing Interoperability into IA-64 Systems: DIG64 Guidelines

Transcription:

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 Summary UEFI Plugfest March 2016 www.uefi.org 2

Introduction UEFI Plugfest March 2016 www.uefi.org 3

Introduction System Management Mode (SMM) was introduced on IA over 20 years ago Initially developed to handle power management and system critical events, it has evolved SMM is used as a OS agnostic runtime firmware execution environment Many OEM proprietary features require SMM SMM is required to implement UEFI SecureBoot and NIST 800-147 secure flash on IA SMM is even isolated from operating system access UEFI Plugfest March 2016 www.uefi.org 4

Moving to New Architectures As OEMs look to move to other architectures like ARMv8-A, how do they create a secure platform feature set? Solution needs to be as flexible as SMM and offer the same or higher level of security When possible, solution should leverage high-level PI SMM interfaces to simplify porting to new architectures A working solution can be built on top of ARM TrustZone UEFI Plugfest March 2016 www.uefi.org 5

ARM TrustZone UEFI Plugfest March 2016 www.uefi.org 6

ARM TrustZone technology is available for many years. Various security applications on top of it: Key protection DRM Electronic Payment PIN Code Verification The ARM TrustZone architecture provides a hardware based security isolation enabling a secure world for Trusted Code Secure Interrupts Secure Peripherals UEFI Plugfest March 2016 www.uefi.org 7

Exception Levels Definitions EL0: The lowest exception level. Used to execute user application in Non-secure state. EL1: Privileged exception level. Used to execute operating systems, in Non-secure state. EL2: Hypervisor exception level. Used to execute hypervisor code, in Non-secure state. EL3: Secure Monitor exception level. Used to execute secure monitor code, which handles the transitions between Non-secure and Secure states. EL3 is in Secure state. S-EL0: Used to execute trusted application code in Secure state. S-EL1: Used to execute Trusted OS code in Secure state. UEFI Plugfest March 2016 www.uefi.org 8

TrustZone Software ARM Trusted Firmware (ARM TF) is an open source reference implementation for EL3 software ARM TF intends to reduce duplicate effort by providing a single framework with: EL3 Software Multi Stage Authenticated Boot PSCI (Power State Coordination Interface) Trusted OS Interface UEFI Plugfest March 2016 www.uefi.org 9

OP-TEE (Open Source Portable - TEE) OP-TEE is an open source TrustZone based TEE solution OP-TEE act as one Secure Operating System which provides various API in secure world for trusted applications Available on GitHub UEFI Plugfest March 2016 www.uefi.org 10

Typical Boot Sequence Normal World Secure World OS Runtime Normal World OS Boot Secure World Init Normal World Bootloader Prepare/Load Image Secure Monitor Init Power On UEFI Plugfest March 2016 www.uefi.org 11

Exception Levels Similar to IA, ARM provides different execution privilege levels Traditional IA offers Ring 0 (Most Privileged) to Ring 3 (Least privileged) ARMv8-A provides EL0 (Least Privileged) to EL3 (Most Privileged) Firmware and OS designers should make use of these ELs to isolate critical code from attacks by malicious software UEFI Plugfest March 2016 www.uefi.org 12

Typical System Block Diagram Normal World Guest OS Guest OS EL0 App App App App Secure World Trusted Execution Environment Trusted App Trusted App Trusted App S-EL0 EL1 OS Kernel OS Kernel Trusted OS Kernel S-EL1 Trusted Drivers EL2 Hypervisor EL3 PSCI Core Interface SMC Dispatcher ARM System IP library S-EL1 Payload Dispatch World-Switch Library ARM Trusted Firmware PSCI Platform SoC SMC calls SoC Specific Firmware UEFI Plugfest March 2016 www.uefi.org 13

Normal/Secure World Communication Normal world applications need a way to communicate with the secure world in certain cases Normal world application can generate exceptions to transfer control to monitor mode software, which performs context switching to switch to secure world The exceptions can be hardware or software based SMC (Secure Monitor Call) is a software based exception UEFI Plugfest March 2016 www.uefi.org 14

UEFI Security Implementation Samples UEFI NVRAM Services are a runtime service that are trusted and secure services TrustZone offers the opportunity for firmware developers to protect services like NVRAM TrustZone offers the opportunity for hardware developers to limit access to critical hardware like SPI controllers by non TrustZone code To further secure platforms, each TrustZone piece of code should be developed to work at the lowest possible Exception Level Only use EL3 when necessary, try to keep all code as S-EL1 or lower UEFI Plugfest March 2016 www.uefi.org 15

SMM-Like Services in TrustZone UEFI Plugfest March 2016 www.uefi.org 16

ARM vs IA Secure Memory Blocks TrustZone Secure Memory Region SMM SMRAM Secure Mode EL3/S-EL1/S-EL0 SMM Enter Secure Mode via SMC or Secure Interrupt SMI Secure Memory Region: Can be one or multiple blocks. SMC: Secure Monitor Call Secure State: Exception Level of CPU UEFI Plugfest March 2016 www.uefi.org 17

SMM Core/Services Integration On IA, once SMM is initialized, there needs to be a way to add code to this region Many different OEM methods exist that make use of SW SMIs On ARM we need an equivalent! Add SW provisioning interface within ARM TF to load SMM-like core/services UEFI Plugfest March 2016 www.uefi.org 18

UEFI SMM Drivers/Protocols UEFI SMM Drivers/Protocols need TrustZone approaches: UEFI SMM Drivers SMM Core SMM IPL UEFI SMM Protocols SMM Access SMM Control UEFI Plugfest March 2016 www.uefi.org 19

SMM as a Secure Payload Normal World SMM-Like Environment RAS Secure Driver Power Secure Driver BMC Secure Driver S-EL1/0 SMST Secure Foundation SMC ARM TF SMC Dispatch Interrupt Forwarding Secure Monitor EL3 Hardware Interrupts UEFI Plugfest March 2016 www.uefi.org 20

Requirements UEFI SMI Services should be registered through SmiHandleRegister function of SMST (System Management System Table) Secure memory region of TrustZone is protected before giving control to UEFI The only way to access the secure memory region during UEFI is by switching to Secure World UEFI Plugfest March 2016 www.uefi.org 21

Secure FW UEFI SMM Services Invocation UEFI SMM Communication Protocol provides a way for UEFI drivers to invoke secure services in TrustZone. UEFI App/Driver UEFI Communication Protocol SMC ARM TF UEFI Plugfest March 2016 www.uefi.org 22

OS Interface On IA systems, SMM is invoked by writing to an IO port On some ARM based systems, an MMIO location can be used to invoke TrustZone services The UEFI specification was extended in 2.6 to include support non-io based invocation of secure services On ARM, SMM-like TrustZone Services can be invoked by OS agent UEFI Plugfest March 2016 www.uefi.org 23

Secure FW Invocation Path UEFI ACPI Table adds one new field Invocation register for Secure Services invocation. ACPI Tables OS Application ACPI Table ACPI Table UEFI ACPI Communication Table ACPI Table ARM TF SMC UEFI Plugfest March 2016 www.uefi.org 24

Summary UEFI Plugfest March 2016 www.uefi.org 25

Summary Despite the differences between SMM and TrustZone architectures, similarities allow TrustZone to be used as PI secure environment PIWG and ABST are the main groups that work on specifications regarding these topics Interested parties are encouraged to join the conversation in PIWG and ABST! OEMs should pay attention to make sure their features easily migrate to new architectures UEFI Plugfest March 2016 www.uefi.org 26

References UEFI Specification 2.6 UEFI Platform Initialization Specification 1.4 ARM Trusted Firmware ARM Security Technology Building a Secure System using TrustZone Technology Trusted Base System Architecture (TBSA) Trusted Board Boot Requirements (TBBR) TrustZone Media Protection Architecture (TZMP) UEFI Plugfest March 2016 www.uefi.org 27

Q&A UEFI Plugfest March 2016 www.uefi.org 28

Thanks for attending the UEFI Spring Plugfest 2016 For more information on the Unified EFI Forum and UEFI Specifications, visit http://www.uefi.org presented by UEFI Plugfest March 2016 www.uefi.org 29