Why open source firmware is important Jessie Frazelle - @jessfraz - - PowerPoint PPT Presentation

why open source firmware is important
SMART_READER_LITE
LIVE PREVIEW

Why open source firmware is important Jessie Frazelle - @jessfraz - - PowerPoint PPT Presentation

Why open source firmware is important Jessie Frazelle - @jessfraz Points of View 1. Security 2. Usability 3. Visibility First Point of View: Security... Software Software Operating System Kernel Firmware Hardware Software Software


slide-1
SLIDE 1

Why open source firmware is important

Jessie Frazelle - @jessfraz

slide-2
SLIDE 2

Points of View

  • 1. Security
  • 2. Usability
  • 3. Visibility
slide-3
SLIDE 3

First Point of View: Security...

slide-4
SLIDE 4

Hardware Firmware Operating System Kernel Software Software

slide-5
SLIDE 5

Hardware Software Software Software Software

slide-6
SLIDE 6

Hardware Software Software Software Software

💪 💪 💪 💪 💪

slide-7
SLIDE 7

Ring -3: Management Engine Ring -2: SMM, UEFI kernel Ring -1: Hypervisor Ring 0: Kernel Ring 3: User space

slide-8
SLIDE 8

Ring -3: Management Engine Ring -2: SMM, UEFI kernel The code we don’t know about...

slide-9
SLIDE 9

Ring -2: SMM, UEFI kernel System Management Mode

  • Originally used for power management
  • System hardware control
  • Proprietary designed code
  • Place where vendors add new features
  • Handle system events like memory or

chipset errors

  • ½ kernel
slide-10
SLIDE 10

Ring -2: SMM, UEFI kernel UEFI Kernel

  • Extremely complex
  • Millions of lines of code
  • UEFI applications are active after boot
  • Security from obscurity
  • A bajillion features, extremely complex
slide-11
SLIDE 11

Ring -3: Management Engine Management Engine

  • Networking management
  • KVM management
  • Intel proprietary features
  • Can reimage your device even if it’s

powered off

  • Can turn on node invisibly
  • Minux
  • SO MUCH MORE
slide-12
SLIDE 12
slide-13
SLIDE 13

That’s just one example of a bad attack but if you google you can easily find

  • thers...
slide-14
SLIDE 14
slide-15
SLIDE 15

This is bad.

slide-16
SLIDE 16

It gets even worse.

slide-17
SLIDE 17

Intel Boot Guard

slide-18
SLIDE 18

Ring -3: Management Engine Ring -2: SMM, UEFI kernel Adds up to: 2½ other kernels/OSes…

  • They each have their own networking

stacks, web servers (wtf)

  • The code can modify itself and persist

across power cycles and reinstalls

slide-19
SLIDE 19

Ring -3: Management Engine Ring -2: SMM, UEFI kernel Adds up to: 2½ other kernels/OSes…

  • They are all incredibly and

unnecessarily complex

  • THEY ALL HAVE EXPLOITS!
slide-20
SLIDE 20

Second Point of View: Usability...

slide-21
SLIDE 21
slide-22
SLIDE 22

The results

slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26

29.2%

Mentioned Firmware as a Pain Point

slide-27
SLIDE 27

So at what scale is firmware a pain?

slide-28
SLIDE 28
slide-29
SLIDE 29

My hypothesis...

slide-30
SLIDE 30

Once you need to deal with the firmware it becomes a pain...

slide-31
SLIDE 31

Third Point of View: Visibility...

slide-32
SLIDE 32

Conway’s Law

slide-33
SLIDE 33

From the perspective of hardware engineers...

slide-34
SLIDE 34

“You’d be crazy to think hardware was ever intended to be used for isolating multiple users safely..”

slide-35
SLIDE 35

Spectre and Meltdown proved this to be true as well.

slide-36
SLIDE 36

From the perspective of firmware and kernel engineers…

slide-37
SLIDE 37

They want vendors to make their firmware do less, or give up the control to them.

slide-38
SLIDE 38

Vendors can rarely debug firmware issues…

slide-39
SLIDE 39

Oversights and lack of communication leads to...

slide-40
SLIDE 40
slide-41
SLIDE 41

How did no one think about the BMC when building softlayer?

slide-42
SLIDE 42

I’ve personally seen these miscommunications happen in the container ecosystem as well...

slide-43
SLIDE 43
slide-44
SLIDE 44

Miscommunications at various layers of the stack lead to bugs in the intersecting layers, based off incorrect assumptions.

slide-45
SLIDE 45

Hardware Software Software Software Software

💪 💪 💪 💪 💪

slide-46
SLIDE 46

How do we fix these things?

  • 1. Security
  • 2. Usability
  • 3. Visibility
slide-47
SLIDE 47

Open Source Firmware

slide-48
SLIDE 48

NERF: Non-Extensible Reduced Firmware

slide-49
SLIDE 49

NERF Goals

  • Make firmware less capable of doing harm
  • Make its actions more visible
  • Remove all runtime components
  • With ME we can’t remove all but we

can take away the web server and IP stack

  • Remove UEFI IP stack and other drivers
  • Remove ME/UEFI self-reflash capability
  • Let linux manage flash updates
slide-50
SLIDE 50

Ring -3: Management Engine Ring -2: SMM, UEFI kernel Ring -1: Hypervisor Ring 0: Kernel Ring 3: User space

slide-51
SLIDE 51

Ring -3: Management Engine Ring -2: SMM, UEFI kernel Ring -1: Hypervisor Ring 0: Kernel Ring 3: User space

slide-52
SLIDE 52

Ring -2:

SMM disabled Reduced UEFI ROM Linux kernel and Minimal userland

Ring -3: Minimized Management Engine Ring -1: Hypervisor

slide-53
SLIDE 53
slide-54
SLIDE 54

u-boot or coreboot

silicon and DRAM initialization

linuxboot

device drivers, network stack, multi-user/tasking environment

u-root

userspace tools and bootloader, initramfs

slide-55
SLIDE 55

Why linux?

  • Single kernel works for several boards
  • Already quite vetted and has a lot of

eyes on it since it is used quite extensively

  • Single, open source kernel versus the 2½
  • ther kernels that were all different

and most closed off

  • Improves boot reliability by replacing

lightly-tested firmware drivers with hardened Linux drivers.

slide-56
SLIDE 56

Other wins

  • Firmware devs can build in tools they

already know

  • When they need to write logic for

signature verification, disk decryption, etc it’s in a language that is modern, easily auditable, maintainable, and readable

  • Memory safety wins as well since the

language can be higher level

slide-57
SLIDE 57

Makes boot time 20x faster.

slide-58
SLIDE 58

Through open source, visibility, minimalism, and open communication we can push computing to a better, more secure place from the hardware up.

slide-59
SLIDE 59

We can’t keep building

  • n top of 💪. We

really need to care about the base we build on.

slide-60
SLIDE 60

Huge thanks to the firmware community for all their work

  • n this!
slide-61
SLIDE 61

Ron Minnich Trammel Hudson Chris Koch Rick Altherr Zaolin

slide-62
SLIDE 62

Thanks for having me!