01/05/2015Leiden Institute of Advanced Computer Science 1 The Open Kernel Environment - spinning Linux - Herbert Bos Bart Samwel

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Emmett Witchel Krste Asanović MIT Lab for Computer Science Hardware Works, Software Doesn’t: Enforcing Modularity with Mondriaan Memory Protection.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Mobile Code Security Aviel D. Rubin, Daniel E. Geer, Jr. MOBILE CODE SECURITY, IEEE Internet Computing, 1998 Minkyu Lee
Binary Component Adaptation Ralph Keller and Urs Hölzle Dept. of Computer Science University of California, Santa Barbara 1998.
The Open Kernel Environment (opening up all levels of the processing hierarchy in a 'safe' manner) Herbert Bos Bart Samwel Leiden University
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM B. Bershad, S. Savage, P. Pardyak, E. G. Sirer, D. Becker, M. Fiuczynski, C. Chambers,
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
INF 212 ANALYSIS OF PROG. LANGS Type Systems Instructors: Crista Lopes Copyright © Instructors.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, David Becker, Marc.
Topic 9 – Introduction To Arrays. CISC105 – Topic 9 Introduction to Data Structures Thus far, we have seen “simple” data types. These refers to a single.
Type-Safe Programming in C George Necula EECS Department University of California, Berkeley.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Pointer. Warning! Dangerous Curves C (and C++) have just about the most powerful, flexible and dangerous pointers in the world. –Most other languages.
Extensibility, Safety and Performance in the SPIN Operating System Bershad et al Presentation by norm Slides shamelessly “borrowed” from Stefan Savage’s.
1 Hybrid Resource Control for Active Extensions Parveen Patel Jay Lepreau University of Utah.
Programmability with Proof-Carrying Code George C. Necula University of California Berkeley Peter Lee Carnegie Mellon University.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Extensibility, Safety and Performance in the SPIN Operating System Dave Camarillo.
Catriel Beeri Pls/Winter 2004/5 environment 68  Some details of implementation As part of / extension of type-checking: Each declaration d(x) associated.
Figure 1.1 Interaction between applications and the operating system.
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
Introduction To C++ Programming 1.0 Basic C++ Program Structure 2.0 Program Control 3.0 Array And Structures 4.0 Function 5.0 Pointer 6.0 Secure Programming.
Buffer Overflow Attacks. Memory plays a key part in many computer system functions. It’s a critical component to many internal operations. From mother.
Compiled by Benjamin Muganzi 3.2 Functions and Purposes of Translators Computing 9691 Paper 3 1.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Secure Virtual Architecture John Criswell, Arushi Aggarwal, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve University of Illinois at Urbana-Champaign.
CS533 Concepts of Operating Systems Jonathan Walpole.
Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006.
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
Native Client: A Sandbox for Portable, Untrusted x86 Native Code
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan.
Looping and Counting Lecture 3 Hartmut Kaiser
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Kernel Locking Techniques by Robert Love presented by Scott Price.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
Intermediate 2 Computing Unit 2 - Software Development.
School of Computer Science & Information Technology G6DICP - Lecture 6 Errors, bugs and debugging.
 Programming - the process of creating computer programs.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
Semantic Analysis II Type Checking EECS 483 – Lecture 12 University of Michigan Wednesday, October 18, 2006.
Lecture 4 Page 1 CS 111 Online Modularity and Memory Clearly, programs must have access to memory We need abstractions that give them the required access.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
CSE 351 Caches. Before we start… A lot of people confused lea and mov on the midterm Totally understandable, but it’s important to make the distinction.
DDC 2223 SYSTEM SOFTWARE DDC2223 SYSTEM SOFTWARE.
Introduction to Operating Systems
Types for Programs and Proofs
Presentation by Omar Abu-Azzah
Ik-Soon Kim December 18, 2010 Embedded Software Platform Team
Modularity and Memory Clearly, programs must have access to memory
CSCI/CMPE 3334 Systems Programming
Introduction to Operating Systems
Security in Java Real or Decaf? cs205: engineering software
The Design & Implementation of Hyperupcalls
Outline Chapter 2 (cont) OS Design OS structure
Chapter 29: Program Security
RUN-TIME STORAGE Chuen-Liang Chen Department of Computer Science
1.3.7 High- and low-level languages and their translators
Presentation transcript:

01/05/2015Leiden Institute of Advanced Computer Science 1 The Open Kernel Environment - spinning Linux - Herbert Bos Bart Samwel

01/05/2015Leiden Institute of Advanced Computer Science 2 Outline Goals + motivation Architecture code loader compiler access to kernel POC Current work Conclusion

01/05/2015Leiden Institute of Advanced Computer Science 3 What do we want to do? allow unprivileged users to load native code in Linux kernel in a safe manner security resource control crashes Why? Performance network monitoring/filtering active networks

01/05/2015Leiden Institute of Advanced Computer Science 4 Components Safe code loader "who is allowed to load what modules?" ” Extensible compiler "which programmer is allowed to do what?" ” Accessing kernel resources safely "how do we make sure the kernel ’ s integrity is preserved?" ” Make rules for extensible compiler Legislator

01/05/2015Leiden Institute of Advanced Computer Science 5 “ SPIN ” Extensible OS "protection is a language issue" allows modules to be loaded in the kernel extensibility based on exported interfaces based on safety properties of Modula-3 type safety, auto storage mgmt, interfaces

01/05/2015Leiden Institute of Advanced Computer Science 6 SPIN kernel resources referenced by capabilities pointer to block of mem, type declared in I/F cannot be used inconsistent with type unforgeable, statically checked Protection domain: set of accessible names normally: VM SPIN: explicit namespaces supported by language Code signed by Modula-3 compiler

01/05/2015Leiden Institute of Advanced Computer Science 7 The OKE non-privileged users load native code in krnl make resources available depending on “ role ” many different privileges/roles not: separate language for each class of users don ’ t rely on interpreted language "elastic" compiler/language compiler applies extra rules depending on authorisation so: language is customised based on credentials

01/05/2015Leiden Institute of Advanced Computer Science 8 OKE Code Loader extend insmod/rmmod CL security policy based on trust mgmt CL has set of policies accepts blob of code + set of credentials checks credentials match: load module no match: reject implemented using KeyNote

01/05/2015Leiden Institute of Advanced Computer Science 9 OKE Code Loader module A module B user kernel CODE LOADER module C S credentials user "who is allowed to load what?"

01/05/2015Leiden Institute of Advanced Computer Science 10 What are we allowed to do? "why should safe code not be allowed to run in the kernel?" ” we want to restrict access to resources limit number of modules, amount of memory, number of cycles, etc. dependent on users! yet another safe language for specific purpose? restricts towards lowest common denominator instead: one language that is restricted depending on role

01/05/2015Leiden Institute of Advanced Computer Science 11 Compiler: elastic languages depending on who the code-loading party is more or less access is given to language constructs resources (incl. kernel functions + data structures) extra checks or functions may be added trivial example: looping • no loops (students) • limited loops (staff) • unrestricted loops (sysadmin) other example: cycle counting • hard max (students) • growing max (staff)  don ’ t count (sysadmin)

01/05/2015Leiden Institute of Advanced Computer Science 12 Compiler: elastic languages many potential dangers can be spotted at source level after construction of AST at intermediate code level elastic language = normal language ("C") on which arbitrary restrictions can be placed based on credentials conceptually: separate languages (subsets) restrict at very early stage

01/05/2015Leiden Institute of Advanced Computer Science 13 Bygwyn compiler "you can ’ t always get what you want, but you get what you need" compiler is Trusted extensible (extra rules may customise language) customisation depends on authorisation

01/05/2015Leiden Institute of Advanced Computer Science 14 Bygwyn issues: object code should be tamperfree user ’ s authorisation should be checked use KeyNote to convey and check authorisation at coarse granularity "role" or user class ” triggers compiler to load extra rules

01/05/2015Leiden Institute of Advanced Computer Science 15 Bygwyn compiler BYGWYN my code credentials user extra rules for user (given credentials and policies) module C S "once loaded, who is allowed to do what?" "compile and sign"

01/05/2015Leiden Institute of Advanced Computer Science 16 Access to kernel module B foo*(arg) foo(arg) bar(arg) via interface (similar to SPIN) wrapped on the module code by compiler exceptions

01/05/2015Leiden Institute of Advanced Computer Science 17 The Legislator Who creates these extra rules? Legislators customisation tools for target language example: the OKE legislator GUI based tick boxes, fill in forms no knowledge of compiler internals needed

01/05/2015Leiden Institute of Advanced Computer Science 18 Simple prototype Pascal (friendly grammar) customise almost anything e.g. disallow pointers, restrict pointers, array bounds checks, etc. give “ safe ’ access to kernel packet filtering example between 3 and 5 times faster than BPF often leads to toy languages ” and/or need lot of runtime checks

01/05/2015Leiden Institute of Advanced Computer Science 19 Example: array bound checking option 1: don ’ t check option 2: check thoroughly CMP, JMP terminate (e.g. throw exception) option 3: fast check make sure index is always in range: a[i%N] errors are programmer's problem % is slow boundary at power of 2 and chop off high bits: 1 AND which check is used depends on the user ’ s credentials and/or preferences char a[N]; a[i] = x; &

01/05/2015Leiden Institute of Advanced Computer Science 20 Tough problems Namespace Pointers NULL dereferences dangling pointers pointer arithmetic, etc. Sharing datastructures with the kernel who frees the data? Recursion

01/05/2015Leiden Institute of Advanced Computer Science 21 Tough problems How can we interrupt a module? what if module just obtained a kernel lock? what if deadlock occurs? what if it leaves kernel in inconsistent state? As for the latter issue: if there is danger of that, module should not have received the authorisation to do so encapsulate better for certain users: provide timeouts on locks, etc.

01/05/2015Leiden Institute of Advanced Computer Science 22 We really want something like C so we now use modified "Cyclone" Crash-free "C" ” different types of pointer runtime checks (but only where needed) region based protection however, we needed more (+ less) share memory with kernel interrupt modules CPU usage extensibility

01/05/2015Leiden Institute of Advanced Computer Science 23 Conclusions simple prototype is a dead end unprivileged users are allowed to load code in kernel can be very fast very much like C Cyclone is very good but needs many changes much work to be done