Integrity-checked block devices with device mapper. Mandeep Baines Will Drewry

Similar documents
Android Bootloader and Verified Boot

Surviving in the wilderness integrity protection and system update. Patrick Ohly, Intel Open Source Technology Center Preliminary version

Protecting your system from the scum of the universe

Virtualization and Performance

Secure Boot from A to Z

Protecting your system from the scum of the universe

LSS 2017: linux-integrity subsystem update Mimi Zohar

Big and Bright - Security

ABOUT ZEPCAM SOFTWARE INSTALLATION MANAGEMENT AND BACKUPS. Description What is it Installation requirement Server requirement

v5: How to restore a backup image

OP-TEE Using TrustZone to Protect Our Own Secrets

TUX : Trust Update on Linux Kernel

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

Name: Instructions. Problem 1 : Short answer. [48 points] CMU / Storage Systems 20 April 2011 Spring 2011 Exam 2

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

Enabling DM_Crypt Functionality in SDK release 5.07

Paperspace. Architecture Overview. 20 Jay St. Suite 312 Brooklyn, NY Technical Whitepaper

Interconnecting Components

CSC 5930/9010 Cloud S & P: Virtualization

Secure Storage with Encrypted file systems

I Don't Want to Sleep Tonight:

Demonstration Lecture: Cyber Security (MIT Department) Trusted cloud hardware and advanced cryptographic solutions. Andrei Costin

OVAL + The Trusted Platform Module

Capturing RAM. Alex Applegate. Mississippi State University Digital Forensics 1

Performance Analysis for Crawling

Chrome/OS Security 2014

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

CSPN Security Target. HP Sure Start HW Root of Trust NPCE586HA0. December 2016 Reference: HPSSHW v1.3 Version : 1.3

BITLOCKER MEETS GPUS BITCRACKER

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

CS3600 SYSTEMS AND NETWORKS

Confessions of a security hardware driver maintainer

VerifyFS in Btrfs Style (Btrfs end to end Data Integrity)

LSS-EU 2018: Overview and Recent Developments Linux Integrity Subsystem

Computer Performance

This line defines Therefore, if your windows entry on the GRUB menu is 8 you should set this value to 7.

jvpfs: Adding Robustness to a Secure Stacked File System with Untrusted Local Storage Components

Authenticated Storage Using Small Trusted Hardware Hsin-Jung Yang, Victor Costan, Nickolai Zeldovich, and Srini Devadas

CS 310: Memory Hierarchy and B-Trees

Using Linux as a Secure Boot Loader for OpenPOWER Servers

Cryptographic Hash Functions

Verified Boot: Surviving in the Internet of Insecure Things. Randall Spangler Chrome OS Firmware Lead

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

Isolating Operating System Components with Intel SGX

Hashes, MACs & Passwords. Tom Chothia Computer Security Lecture 5

Jonathan M. McCune. Carnegie Mellon University. March 27, Bryan Parno, Arvind Seshadri Adrian Perrig, Michael Reiter

Extending the Linux Integrity Subsystem for TCB Protection. David Safford, Mimi Zohar,

SHRD: Improving Spatial Locality in Flash Storage Accesses by Sequentializing in Host and Randomizing in Device

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

Advanced UNIX File Systems. Berkley Fast File System, Logging File System, Virtual File Systems

Virtualization Overview NSRC

Recommendations for TEEP Support of Intel SGX Technology

Breaking Kernel Address Space Layout Randomization (KASLR) with Intel TSX. Yeongjin Jang, Sangho Lee, and Taesoo Kim Georgia Institute of Technology

Command Line Parameters Linux Check Disk Space Windows 7

File System Implementation

Control Center Planning Guide

Monitoring Hypervisor Integrity at Runtime. Student: Cuong Pham PIs: Prof. Zbigniew Kalbarczyk, Prof. Ravi K. Iyer ACC Meeting, Oct 2015

Manually Mount Usb Flash Drive Linux Command Line Redhat

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Android System Development Training 4-day session

CSCE 548 Building Secure Software Entity Authentication. Professor Lisa Luo Spring 2018

Filesystem Performance on FreeBSD

Important new NVMe features for optimizing the data pipeline

Optimizing and Enhancing VM for the Cloud Computing Era. 20 November 2009 Jun Nakajima, Sheng Yang, and Eddie Dong

e2 factory the emlix Embedded Build Framework

Dan Noé University of New Hampshire / VeloBit

Cryptography for Software and Web Developers

File System Performance (and Abstractions) Kevin Webb Swarthmore College April 5, 2018

6.857 L17. Secure Processors. Srini Devadas

SNS COLLEGE OF ENGINEERING

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know:

Storage encryption... what about data integrity?

Properly Sizing Processing and Memory for your AWMS Server

Productizing Linux Applications. What We ll Cover

A New Model for Image Distribution

OP-TEE Using TrustZone to Protect Our Own Secrets

Flavors of Memory supported by Linux, their use and benefit. Christoph Lameter, Ph.D,

Name: Instructions. Problem 1 : Short answer. [48 points] CMU / Storage Systems 20 April 2011 Spring 2011 Exam 2

CprE Virtualization. Dr. Yong Guan. Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University

Open-source library and tools to support the OVF.

FILE SYSTEMS, PART 2. CS124 Operating Systems Fall , Lecture 24

The benefits and costs of writing a POSIX kernel in a high-level language

Oasis: An Active Storage Framework for Object Storage Platform

The LILO Configuration Handbook. Virgil J. Nisly

Proceedings of the Linux Symposium. July 13th 17th, 2009 Montreal, Quebec Canada

I/O Topology. Martin K. Petersen Oracle Abstract. 1 Disk Drives and Block Sizes. 2 Partitions

Virtualization. Michael Tsai 2018/4/16

Name: Instructions. Problem 1 : Short answer. [48 points] CMU / Storage Systems 25 Feb 2009 Spring 2010 Exam 1

Embedded System Security Mobile Hardware Platform Security

Hash-based Signatures

Control Center Planning Guide

Embedded System Security Mobile Hardware Platform Security

Aerie: Flexible File-System Interfaces to Storage-Class Memory [Eurosys 2014] Operating System Design Yongju Song

Application of Virtualization Technologies & CernVM. Benedikt Hegner CERN

Arch Linux Grub You Need To Load The Kernel First

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

-Device. -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, device)

Alternatives To Microsoft Windows Operating System

Security for the Xen Hypervisor Status Quo & Perspective 2006

Netfilter: Making large iptables rulesets scale. OpenSourceDays 2008 d.4/

Transcription:

Integrity-checked block devices with device mapper Mandeep Baines Will Drewry

Huh? We'll talk about our efficient device mapper target that provides read-only access to blocks from another block device that are cryptographically hashed and checked against a known good "manifest" prior to use.

Why? General examples: /boot or / is unmodified since last boot Boot off a usb key Xen hypervisor root and Intel's tboot Downloaded fs image is right (gpg sig over a hash) USB stick is unmodified Chrome OS case: all mountpoints are W^X Root partition needs to be integrity assured kernel & its parameters are signed (verified boot flow) <2 second boot budget with Atom processors minimize untrusted data parsing during boot

Existing options (circa 2009) linux-ima was per-file, full code hashing prior to exec tpm-rooted guarantees were slow fuse implementation same idea, but slow(er) custom initramfs/initrd for checking the root filesystem (assuming a signed, checked kernel) slow boot. at least linear with check code/config size ditto, but checking only specific files filesystem parsing attacks and complexity were concerns

Introducing dm-verity We needed something... fast... we could configure from the kernel commandline*... we could boot directly to... with cryptographic assurances... with minimal attack surface Enter device-mapper Can intercept every block request to our root partition Benefits from caching layers Minimizes copying Now, how can we speed it up?

Hash trees (or are they tries...) Hash trees (Merkle trees) are well-known. Provide a tree of hashes where the leaf nodes are the real data. Minimal data is needed to verify data with a hash tree: the "root node" hash how to configure the tree: data source, block size, tree depth,... Configuring a device mapper target only really needs a data source Fiddly but gets us a 1.6 second boot on an Atom processor, SSD and ~700 megabyte root filesystem. Enter the hash tries.

Hash tries Hash tries, or prefix (hash) tree, or... Provide a standard mechanisms for indexing and organizing the tree Tree depth and number of nodes per leaf stop being options Use a "block id" to determine the path from root to leaf Allows short-circuiting neighboring verifications Now we're at ~1.2s boot time on the same hardware but with ~800 megabyte root filesystem. Yeah!

Other architectural points Lock-free Tree nodes use an atomic_t enum for state that can only progress: UNALLOCATED... VERIFIED Allows for parallelizing the workload Parallel processing one workqueue per cpu one crypto context per cpu Error (hash mismatch) behavior is configurable: only return EIO, panic, or... use a registered handler via the notifier subsystem Salting A long-lived block may keep the same hash for a while Add a configurable salt and rotate on-demand

Where does that leave us? 1.2s boot with a 891 megabyte root filesystem Assuming no I/O bottlenecks, the same system would take 9 seconds to pre-verify the whole filesystem with SHA1 Platform and "user" configurable error handling "dd" bandwidth of 25.5 MB/s (on a Samsung Chromebook) Cached ~ 377 MB/s We could still do better.

Moar speed Copying SHA1 from git into the kernel: Saves another 300 milliseconds Any suggestions?

Example dm table Setup /dev/sda3 with an integrity-checking overlay with the pregenerated hash tree appended after the verified data: "0 1740800 verity payload=/dev/sda3 hashtree=/dev/sda3 hashstart=1740800 alg=sha1 root_hexdigest=716277..."

Boot-time integration Chrome OS Speed matters to us Added do_mount_dm.c (no initramfs+klibc) (sent but not pulled; will resend) Just like md="" we added dm="" The root node hash ends up in dm="" Chrome OS firmware/bootloader checks the signature over our kernel and kernel parameters. Chromium OS Intel's tboot could be used to get a verified root block device in the same fashion Or just a USB stick you carry in your pocket :)

Questions? Comments?