the problem - elinux...cloud-native app same owner xen no multi-tenancy only run cloud-native apps...

51

Upload: others

Post on 28-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 2: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

The Problem

Page 3: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 4: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 5: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 6: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Packaging vs. Runtime

OCI Image Spec vs. OCI Runtime Spec

Page 7: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Linux Kernel

Linux Namespaces

Docker Registry

Linux Namespaces

Cloud-Native App

Linux Namespaces

Cloud-Native App

App binaries

App librariesCloud Native App

(rootfs + manifest)

App binaries

App libraries

Docker

Page 8: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 9: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

The problem withLinux namespaces

Page 10: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native App

Cloud-native App

Linux kernel

POSIX

Cloud-native App

Page 11: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native App

Cloud-native App

Linux kernel

POSIX

Large surface of attack

On average, 3 privilege escalation vulnerabilities per Linux release!

Cloud-native App

Page 12: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native AppMalicious App

Linux kernel

POSIX

Cloud-native App

Large surface of attack

On average, 3 privilege escalation vulnerabilities per Linux release!

Page 13: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native AppMalicious App

Linux kernel

POSIX

Cloud-native App

Large surface of attack

On average, 3 privilege escalation vulnerabilities per Linux release!

Page 14: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native AppMalicious App

Linux kernel

POSIX

Cloud-native App

Large surface of attack

On average, 3 privilege escalation vulnerabilities per Linux release!

Page 15: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native AppMalicious App

Linux kernel

POSIX

Cloud-native App

Large surface of attack

On average, 3 privilege escalation vulnerabilities per Linux release!

Page 16: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 17: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 18: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 19: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 20: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

App (Container)

same owner

App (Container)

same owner

Linux kernel

App (Container)

same owner

Cloud-native App

same owner

Cloud-native App

same owner

Linux kernel

POSIX

Cloud-native App

same owner

Xen

● No multi-tenancy

● Only run cloud-native apps from the same user on the same host

● Use VMs (or bare-metal) as security boundary

● Need to handle both VMs provisioning and Cloud-Native app provisioning

Virtual interface, on average:

Xen PV: 1 priv escalation vuln / year KVM: 4 priv escalation vuln / year

Page 21: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 22: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 23: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 24: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Run

Page 25: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Virtualizationas container runtime

Page 26: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 27: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 28: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

On R

Page 29: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 30: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Yes but,Does it run containers?

Page 31: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native App

Cloud-native App

Linux

Cloud-native App

Embedded Hypervisor

POSIX

Linux Linux

VMX

VM● 1 container app <--> 1 VM

● Secure by default

● Mix and match traditional VMs and container apps on a single platform

● Support mixed criticality workloads

● Support real time apps

● Support device assignment

Page 32: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

How do we do it?

Page 33: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Linux Kernel

Linux Namespaces

Docker Registry

Linux Namespaces

Cloud-Native App

Linux Namespaces

Cloud-Native App

App binaries

App librariesCloud-Native

App

App binaries

App libraries

Docker

This is justrootfs + manifest

Page 34: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 35: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 36: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 37: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Xen

VM

Docker Registry

VM

Cloud-Native App

VM

Cloud-Native App

App binaries

App librariesCloud-Native

App

App binaries

App libraries

CoreOS rkt

Page 38: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 39: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

PVCalls

Page 40: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 41: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Cloud-native App

Linux DomU

Xen

POSIX

PV Interface

VM

Each app is run in a small separate Xen VM for isolation.

POSIX calls are confined within the VM, “emulated” by the guest kernel.

Few selected syscalls are handled securely by Dom0 (filesystem and socket syscalls primarily).

Dom0

PV Calls

Page 42: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Dom0Cloud-native app

XenPV Interface

VM

Syscall backend

Syscallfrontend

PV CallsAll othersyscalls

Linux DomU internals

Page 43: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 44: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Considerations on Meltdown

Page 45: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 46: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 47: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Linux 4.15no fix

Linux 4.15fix

Linux 4.15On Xen

CompileBench, Higher is Better

Native Native Xen VM

Page 48: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 49: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary
Page 50: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Demo

Page 51: The Problem - eLinux...Cloud-native App same owner Xen No multi-tenancy Only run cloud-native apps from the same user on the same host Use VMs (or bare-metal) as security boundary

Stefano Stabellinisstabellini AT kernel.orgtwitter.com/stabellinist