Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.

Slides:



Advertisements
Similar presentations
Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Advertisements

Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM B. Bershad, S. Savage, P. Pardyak, E. G. Sirer, D. Becker, M. Fiuczynski, C. Chambers,
Memory Management Questions answered in this lecture: How do processes share memory? What is static relocation? What is dynamic relocation? What is segmentation?
Lightweight Remote Procedure Call BRIAN N. BERSHAD THOMAS E. ANDERSON EDWARD D. LAZOWSKA HENRY M. LEVY Presented by Wen Sun.
Chapter 6 Limited Direct Execution
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
“Efficient Software-Based Fault Isolation” (1993) by: Robert Wahbe, Steven Lucco, Thomas E. Anderson, Susan L. Graham PRESENTED BY DAVID KENNEDY.
CS 153 Design of Operating Systems Spring 2015
OmniVM Efficient and Language- Independent Mobile Programs Ali-Reza Adl-Tabatabai, Geoff Langdale, Steven Lucco and Robert Wahbe from Carnegie Mellon University.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Kumar R., Singhania A., Castner A., Kohler E Proceedings of Design Automation Conference Pages: June /7/13.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
Efficient Software-Based Fault Isolation—sandboxing Presented by Carl Yao.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Protection and the Kernel: Mode, Space, and Context.
CSC 501 Lecture 2: Processes. Process Process is a running program a program in execution an “instantiation” of a program Program is a bunch of instructions.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Cosc 4010 Sandboxing. Last lecture Last time, we covered chroot, which is a method to "sandbox" a problem. –Not full proof by any means. Many simple mistakes.
Native Client: A Sandbox for Portable, Untrusted x86 Native Code
CS533 Concepts of Operating Systems Jonathan Walpole.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Chapter 4 Memory Management Virtual Memory.
11 World-Leading Research with Real-World Impact! ZeroVM Backgroud Prosunjit Biswas Institute for Cyber Security University of Texas at San Antonio April.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Efficient Software-Based Fault Isolation Robert Wahbe, Steven Lucco Thomas E. Anderson, Susan L. Graham J. Garrett Morris, presenter.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Efficient Software-Based Fault Isolation By Robert Wahbe, Steven Lucco, Thomas E. Anderson, and Susan L. Graham Presented by Pehr Collins.
Efficient Software Based Fault Isolation Author: Robert Wahobe,Steven Lucco,Thomas E Anderson, Susan L Graham Presenter: Maitree kanungo Date:02/17/2010.
Efficient Software-based Fault Isolation Robert Wahbe, Steven Lucco, Thomas E. Anderson & Susan L. Graham Presented By Tony Bock.
1 "Efficient Software-based Fault Isolation" by R. Wahbe, S. Lucco, T. E. Anderson, and S. L. Graham. Presenter: Tom Burkleaux.
Efficient Software-Based Fault Isolation Robert Wahbe, Steven Lucco, Thomas E. Anderson, Susan L. Graham.
Efficient Software-Based Fault Isolation Authors: Robert Wahbe Steven Lucco Thomas E. Anderson Susan L. Graham Presenter: Gregory Netland.
CS533 Concepts of Operating Systems Jonathan Walpole.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Chapter 6 Limited Direct Execution Chien-Chung Shen CIS/UD
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Computer Security: Chapter 5 Operating Systems Security.
Memory Protection: Kernel and User Address Spaces Andy Wang Operating Systems COP 4610 / CGS 5765.
Efficient Software-Based Fault Isolation
Kernel Design & Implementation
Introduction to Operating Systems
Chapter 8: Main Memory.
Memory Protection: Kernel and User Address Spaces
Protection and OS Structure
Mechanism: Limited Direct Execution
Memory Protection: Kernel and User Address Spaces
Introduction to Operating Systems
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
O.S Lecture 13 Virtual Memory.
Operating Systems Lecture November 2018.
Module IV Memory Organization.
Module 2: Computer-System Structures
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Architectural Support for OS
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
Lecture 7: Flexible Address Translation
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Architectural Support for OS
CS703 - Advanced Operating Systems
Module 2: Computer-System Structures
Memory Protection: Kernel and User Address Spaces
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros

Motivation Extensibility is desirable  Integration of independently developed software modules Faults in extension code  entire software system is unreliable  Bugs in third party code  Need to protect distrusted modules from corrupting application data  Allow cooperation

First Solution Hardware solution:  Place each module in its own address space  Automatic boundary protection  Use cross-address-space RPC for cooperation between modules – lots of context switches  HIGH PERFORMANCE COST  Maybe a software solution is better

Insight!!! Only a relatively small portion of code is distrusted Should only protect against distrusted code!!

Second Solution Software approach:  Handle fault isolation within one address space  Segment an address space into fault domains One segment for code, and one for data Segment identifiers One fault domain for each task  Software Encapsulation – distrusted object code must: Jump only to targets in its code segment Write only to addresses within its data segment 0x3AB x3ABFFFFF 0x3AC x3ACFFFFF Virtual Address Space

Segment Matching Handling unsafe instructions:  Jump/store to an address that cannot be statically verified to be in the correct segment  insert checking code before unsafe instructions  four instructions and four dedicated registers (used only by inserted code)  If check fails, trap to system error routine pinpoint offending instruction Target AddressSegment ID ==

Address Sandboxing Reduce overhead further Insert code to overwrite the upper bits (segment identifier) of target address  Requires only two instructions  Does not catch illegal addresses  Verifiable  Needs 5 registers Target Address Segment ID

Process Resources Same virtual address space  Resources allocated per-address-space basis can still be corrupted (e.g. close files) Solution: distrusted code cannot make system calls directly  cross-fault-domain RPC  trusted arbitration code handles system calls on behalf of the distrusted code  arbitration code can make system calls directly, if the operations are deemed safe

Data Sharing Read sharing  easy Write sharing  lazy pointer swizzling  map shared memory region into all segments that need access – at the same offset in each segment 0x3AB x3ABFFFFF 0x3AC x3ACFFFFF Virtual Address Space 0x3AB12ABC 0x3AC12ABC

Implementation details Software Encapsulation:  could use a compiler to generate encapsulated code for distrusted modules  the system can directly modify object code at load time Binary patching – not possible at the time

Fast Cross-Fault-Domain RPC Jump table – control transfer  only way to escape a fault domain  only modifiable by trusted segment Customized call and return stubs  copy cross-domain arguments  manage machine state

Fast Cross-Fault-Domain RPC Robustness  uses the UNIX signal facilities to catch errors  notifies the caller’s fault domain  trusted modules can use timers to interrupt execution and determine line of action

Performance Software encapsulation provides substantial savings over using native OS services

Performance Much cheaper than traditional context switches

Summary Software fault isolation  Constrain jumps and writes to be within fault domain  Restrict direct access to system calls Cross-fault-domain RPC == jump instructions Need extra instructions and registers, but there is an overall performance improvement

Discussion I think limitations of binary patching could be resolved by adding hardware support in terms of new dedicated registers for that purpose (of course this could be done in away to keep the architecture backward compatible). Haven’t that been tried out or got implemented in any systems? Are these fault isolation techniques used in current systems in the first place?

Discussion What determines the partitioning of the target address to yield the ideal segment identifier size? What impacts/influences this decision? Is it difficult to find a contiguous region of memory to be used as a fault domain?

Discussion Why would programs with "a significant percentage of floating point operations" or which "perform significant amounts of I/O" incur less overhead?

Discussion If this method is so effective, why is it not used in place of microkernels? How might this compare to lightweight microkernel approaches such as L3/L4 or LRPC?

Discussion What criteria would one use to determine if a software package needs sandboxing or not? The author keeps making reference to "distrusted modules", but why would you be running modules you distrust / the reverse, can you trust anything?