Verification of a Separation Kernel Inzemamul Haque Indian - - PowerPoint PPT Presentation

verification of a separation kernel
SMART_READER_LITE
LIVE PREVIEW

Verification of a Separation Kernel Inzemamul Haque Indian - - PowerPoint PPT Presentation

Introduction Muen Intel Virtualization Support Challenges Approach Verification of a Separation Kernel Inzemamul Haque Indian Institute of Science, Bangalore 17 July 2017 Introduction Muen Intel Virtualization Support Challenges


slide-1
SLIDE 1

Introduction Muen Intel Virtualization Support Challenges Approach

Verification of a Separation Kernel

Inzemamul Haque

Indian Institute of Science, Bangalore

17 July 2017

slide-2
SLIDE 2

Introduction Muen Intel Virtualization Support Challenges Approach

Outline

1

Introduction

2

Muen

3

Intel Virtualization Support

4

Challenges

5

Approach

slide-3
SLIDE 3

Introduction Muen Intel Virtualization Support Challenges Approach

Motivation

Defense and aerospace applications need to run security-critical programs along with untrusted programs, on the same machine. Commercial O/Ss have many vulnerabilities which make them unsuitable for this task. A Separation Kernel provides such a solution. Would like to prove certain security properties of a separation kernel. Formal verification gives highest level of assurance that a system satisfies a required property.

slide-4
SLIDE 4

Introduction Muen Intel Virtualization Support Challenges Approach

Separation Kernel

App App Security−Critical S e c u r i t y − C r i t i c a l Processor / Hardware Linux Kernel Security−Critical S e c u r i t y − C r i t i c a l Processor / Hardware Separation Kernel Guest OS Guest OS App App

slide-5
SLIDE 5

Introduction Muen Intel Virtualization Support Challenges Approach

Objective

Goal To give a machine-checked proof of correctness of a separation ker- nel. How does it address the security concern? Security is part of the abstract model.

slide-6
SLIDE 6

Introduction Muen Intel Virtualization Support Challenges Approach

Methodology

Define an abstract model which captures the correct behaviour of the separation kernel. To show that for every execution in the concrete there is a corresponding execution in the abstract. Inductive proof by defining an abstraction relation.

Abstract Concrete

. . . . . .

init init init init Abstract init init Concrete

= ⇒ ρ

Abstract Concrete

ρ ρ = ⇒ ρ

slide-7
SLIDE 7

Introduction Muen Intel Virtualization Support Challenges Approach

Muen Separation Kernel

Build Policy File (in XML)

Processor

Intel VT−x EPT Intel VT−d Subject 1 Subject 2 Subject 3 Shared Resources

Muen Separation Kernel

Muen Other normal processor features Tool−chain Muen

slide-8
SLIDE 8

Introduction Muen Intel Virtualization Support Challenges Approach

Example Policy File

slide-9
SLIDE 9

Introduction Muen Intel Virtualization Support Challenges Approach

Intel VT-x

Ring 1 Ring 2 Ring 0 Ring 3 (User applications) (Operating System)

Privilege Rings VMX root mode (VMM)

Ring 1 Ring 2 Ring 3 Ring 0

VMX non−root mode

(Operating System) (User applications)

slide-10
SLIDE 10

Introduction Muen Intel Virtualization Support Challenges Approach

Life-cycle of a VMM

slide-11
SLIDE 11

Introduction Muen Intel Virtualization Support Challenges Approach

Life-cycle of a VMM

How to manage states during VM-entry and VM-exit?

slide-12
SLIDE 12

Introduction Muen Intel Virtualization Support Challenges Approach

Virtual Machine Control Structure (VMCS)

slide-13
SLIDE 13

Introduction Muen Intel Virtualization Support Challenges Approach

VMCS Data

Fields in VMCS can be classified as following: Guest state area - mainly register state of the guest Host state area - processor state to be loaded at VM exits VM-execution control fields - fields like external interrupt exiting, CR3 load exiting, etc. VM-entry control fields - fields which tell what to be saved during VM entry. VM-exit control fields - fields which tell what to be saved during VM exit. VM-exit information fields

slide-14
SLIDE 14

Introduction Muen Intel Virtualization Support Challenges Approach

Causes of VM-Exit

Instructions causing unconditional exits

INVD, CPUID, etc.

Instructions causing conditional exits

HLT, if HLT-exiting field is set Mov from CR3, if CR3-exiting field is set

External interrupts if external interrupt exiting field is set. VMX preemption timer counts to zero.

slide-15
SLIDE 15

Introduction Muen Intel Virtualization Support Challenges Approach

Extended Page Tables

slide-16
SLIDE 16

Introduction Muen Intel Virtualization Support Challenges Approach

Extended Page Tables

slide-17
SLIDE 17

Introduction Muen Intel Virtualization Support Challenges Approach

Muen Separation Kernel

BIOS Bootloader Initialize VM Launcher VM−entry Subject VM−exit handler Processor reset running VM−exit

slide-18
SLIDE 18

Introduction Muen Intel Virtualization Support Challenges Approach

Challenges

Dealing with the mixture of assembly and Ada. Proof for a general policy Reasoning about the invariants involved

slide-19
SLIDE 19

Introduction Muen Intel Virtualization Support Challenges Approach

Abstract Model

Our model is a state transition system. Policy also specifies number of CPUs and order of execution

  • f subjects.

Every subject runs on a standalone machine according to the schedule specified in the policy.

slide-20
SLIDE 20

Introduction Muen Intel Virtualization Support Challenges Approach

Abstract Model

S0 S1 CPU 0 CPU 2 S4 S3 S2 S5 CPU 3 S6 S7 CPU 1

Time S0 S1 end of major frame end of major frame S0 S1 S2 S3 S5 S4 S7 S6 S7 S6 S5 S4 S3 S2

slide-21
SLIDE 21

Introduction Muen Intel Virtualization Support Challenges Approach

State in the Model

slide-22
SLIDE 22

Introduction Muen Intel Virtualization Support Challenges Approach

Transitions in the Model

Tick Local operation - memory accessed by the subjects External interrupt Events Read channel Write channel

slide-23
SLIDE 23

Introduction Muen Intel Virtualization Support Challenges Approach

AdaCore SPARK

Tool to prove certain properties of Ada programs like

satisfiability of pre- and post-conditions for a program. checking assertions at certain points in the program. absence of run-time errors like division by zero, dangling pointers.

Carried out small exercise to verify virtual memory translator.

slide-24
SLIDE 24

Introduction Muen Intel Virtualization Support Challenges Approach

Dealing with mixture of assembly and Ada code

Writing the assembly instructions as Ada functions. e.g. a 64-bit register as a 64-bit modular datatype in Ada

slide-25
SLIDE 25

Introduction Muen Intel Virtualization Support Challenges Approach

Conclusion

Giving a machine checked proof of correctness of a separation kernel We have modelled the Muen separation kernel Focusing on correctness of initialization part of the kernel as

  • f now.

Initially working on a fixed policy