uefi secure boot - linuxtag · uefi secure boot: the story behind and where linux stands dr. udo...

35
UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

Upload: others

Post on 04-Feb-2020

47 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

UEFI Secure Boot: The story behind and where Linux stands

Dr. Udo SeidelLinux-Strategy @ Amadeus

Page 2: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 2

To my Mum

Page 3: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 3

Agenda

● Introduction● Keys and Signatures● Linux and Opportunities● What else?● Summary

Page 4: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 4

Introduction

Page 5: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 5

Me ;-)

● Teacher of mathematics & physics● PhD in experimental physics● Started with Linux in 1996● Linux/UNIX trainer● Solution engineer in HPC and CAx environment● Head of the Linux Strategy team @Amadeus

Page 6: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 6

Basic Input Output System

● Around for a while● Insecure

● Easy to hack● Executes anything

● Problems with big disks

Page 7: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 7

(U)EFI

● Unified Extensible Firmware Interface● First version called EFI

● HP Itanium systems● UEFI kind of EFI NG

● Replaces BIOS● Emulates BIOS ● See talk from Thorsten Leemhuis

Page 8: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 8

Secure Boot

● Part of UEFI Specification v2.2+● Addresses BIOS security issues● Mandate by Microsoft

● For Windows 8● Not only x86

● See keynote from Matthew Garrett

Page 9: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 9

Keys and Signatures

Page 10: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 10

Trust

● Parties● Platform● Firmware● Operating System

● Technique● Asymmetric keys● Public one part of implementation

Page 11: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 11

Key master

● Platform Key (PK)● Key Exchange Key (PK)● Signature database (db)● Forbidden signature database (dbx)● Signed EFI executables

Page 12: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 12

EFI instead of ELF

● Subset of PE32 specification● Portable Executable (PE)● See also Common Object File Format (COFF)● PE/COFF header

● Optional part● List of pointers

● Signatures tailing file

Page 13: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 13

Firmware

● Legacy (CSM)● UEFI

● Without Secure Boot

OR● With Secure Boot

– Setup modus– User modus

Page 14: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 14

Typical scenario

● Since last autumn ● UEFI Secure Boot

● Enabled if not even forced● Microsoft 'keys' implemented

Linux locked out ?!?

Page 15: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 15

Linux: Options and Opportunities

Page 16: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 16

Options

● Setup modus● Replace keys● MS signed Linux bootloader

Page 17: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 17

Option I – Setup modus

● Insecure● Not always possible● Facing backward

Page 18: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 18

Option II – Replace keys

● Linux distribution ...● ... specific● ... independent

● 3rd party support needed● Tools needed

Page 19: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 19

Replacing keys – more details

● X.509 certificates● Generation via openssl● Tools for EFI binary signing● Multi O/S configuration tricky

Page 20: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 20

Replacing keys – tools

● pesign● sbsigntools● efitools

Page 21: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 21

Option III – MS signed bootloader

● MS support needed● Again: Linux distribution ...

● ... specific● ... independent

● Bootloader maintenance?

Page 22: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 22

MS signed bootloader - Idea

● Phased bootloader● Small & static● Between UEFI and Linux bootloader

Page 23: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 23

MS signed bootloader – Loader.efi

● Linux Foundation● To enable ALL Linux bootloaders● No additional security● Recently reworked● Helper tools

● Preloader.efi● Hashtool.efi

Page 24: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 24

MS signed bootloader – the SHIM

● Originally RedHat'ish● First version quite static● Does not support all bootloaders

● Yes: eLILO, GRUB, GRUB2● No: Gummiboot, efilinux

Page 25: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 25

Machine Owner

● Originally from SUSE● Machine Owner Keys (MOK)● Integrated in SHIMv2

Page 26: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 26

Extending SB trust chain

● Several certificates● Microsoft● Linux distribution

● Signed bootloader● Signed kernel core binary● Signed kernel modules● ..?!?

Page 27: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 27

Distributor approaches

● Enterprise● In place: Ubuntu LTS● Announced: SUSE● Unknown: RedHat, Oracle

● Community● In place: Ubuntu, Fedora, openSUSE, ...● Announced: ...● Unknown: Debian and derivatives

Page 28: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 28

What else?

Page 29: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 29

ARM

● UEFI Forum since 2008● More strict Microsoft mandate● UEFI ARM boards available but ...

Page 30: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 30

Problems

● Samsung: firmware death● Toshiba: Missing keys● Lenovo: Only Windows 8 and RHEL● Microsoft: leaked keys

Page 31: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 31

Summary

Page 32: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 32

Take aways

● Linux almost ready● In general● Enterprise sector

● Opportunity not pain● Homework to be done

Page 33: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 33

References

● http://www.uefi.org● http://mjg59.dreamwidth.org● http://blog.hansenpartnership.com● http://www.sxc.hu

Page 34: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 34

Thank you!

Page 35: UEFI Secure Boot - LinuxTag · UEFI Secure Boot: The story behind and where Linux stands Dr. Udo Seidel Linux-Strategy @ Amadeus

LinuxTag 2013 35

UEFI Secure Boot:The story behind and where Linux stands

Dr. Udo SeidelLinux-Strategy @ Amadeus