Efficient Software Based Fault Isolation Author: Robert Wahobe,Steven Lucco,Thomas E Anderson, Susan L Graham Presenter: Maitree kanungo Date:02/17/2010.

Slides:



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

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.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks Feng Qin, Cheng Wang, Zhenmin Li, Ho-seop Kim, Yuanyuan.
OS Spring’03 Introduction Operating Systems Spring 2003.
Early OS security Overview by: Greg Morrisett Cornell University, Edited (by permission) for CSUS CSc250 by Bill Mitchell.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
OS Spring’04 Introduction Operating Systems Spring 2004.
Efficient Software-Based Fault Isolation—sandboxing Presented by Carl Yao.
System Calls 1.
Protection and the Kernel: Mode, Space, and Context.
Secure Execution of Untrusted Code
CS533 Concepts of Operating Systems Jonathan Walpole.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
CS533 Concepts of Operating Systems Jonathan Walpole.
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Efficient Software-Based Fault Isolation Robert Wahbe, Steven Lucco Thomas E. Anderson, Susan L. Graham J. Garrett Morris, presenter.
Joonwon Lee Process and Address Space.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
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.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Efficient Software-Based Fault Isolation By Robert Wahbe, Steven Lucco, Thomas E. Anderson, and Susan L. Graham Presented by Pehr Collins.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
Efficient Software-based Fault Isolation Robert Wahbe, Steven Lucco, Thomas E. Anderson & Susan L. Graham Presented By Tony Bock.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Processes and Threads.
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 Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Efficient Software-Based Fault Isolation Authors: Robert Wahbe Steven Lucco Thomas E. Anderson Susan L. Graham Presenter: Gregory Netland.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
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.
Memory Protection: Kernel and User Address Spaces Andy Wang Operating Systems COP 4610 / CGS 5765.
Efficient Software-Based Fault Isolation
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Memory Protection: Kernel and User Address Spaces
Chapter 9: Virtual Memory
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
Chapter 9: Virtual-Memory Management
Computer-System Architecture
Module 2: Computer-System Structures
Memory Management Tasks
Operating Systems Lecture 3.
Module 2: Computer-System Structures
System calls….. C-program->POSIX call
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Memory Protection: Kernel and User Address Spaces
Presentation transcript:

Efficient Software Based Fault Isolation Author: Robert Wahobe,Steven Lucco,Thomas E Anderson, Susan L Graham Presenter: Maitree kanungo Date:02/17/2010

Overview  Background  Software Fault Isolation  Efficient software encapsulation  Fast communication across fault domains  Performance Result Analysis

Why Software fault isolation:   Hardware-based Fault Isolation   Run modules in separate address spaces   Communicate via Remote Procedure Call   Switch to kernel mode   Copy arguments   Save/Restore registers   Switch address spaces   Return to user mode Context switches are expensive

Software Fault Isolation Virtual address segments Each segment share a unique upper bits called segment identifier Each segment share a unique upper bits called segment identifier Distrusted module can jump to or write to the same upper bit pattern (segment identifier) Distrusted module can jump to or write to the same upper bit pattern (segment identifier)

Techniques of Fault Isolation 2 techniques for software based fault-isolation.  Segment matching  Sandboxing

Techniques of Fault Isolation  This technique involves modifying the software binary to prevent stores or jumps from leaving a certain range of addresses.  All addresses used in store or jump locations are either checked or modified to enforce this.  Straight modification without checking (i.e., by bit substitution) is "sandboxing",  checking and error reporting is "segment matching"

Fault Domain … … … Segment (code)Segment (data) Fault Domain Each segment has unique pattern of upper bits called“ segment identifier”

What is Segment Matching  Static verification: Target address is known at compiling time  Unsafe instruction: Jumps & stores instruction which cannot be statically verified to be correct segment until at runtime. It could corrupt permanent data.  Segment matching  Insert checking code before every unsafe instruction. The checking code determines whether the unsafe instruction’s target address has the correct segment identifier.

Example of segment matching   Say an unsafe instruction is located in segment 101, but wants to write to segment 100. Initially, target address= ;   segment-reg=101; shift-reg=5 (or 101); dedicated-reg = dedicated-reg>>shift-reg = 100, so scratch-reg = 100 segment-reg=101; scratch-reg=100; not equal! A trap is generated to trigger a system error routine outside the distrusted module’s fault domain. If they match, then we know the target address is indeed inside the same segment, so we can run: store value, dedicated-reg

Segment Matching  Requires 4 dedicated registers to hold:  address in data segment  address in code segment  segment shift amount  segment identifier

Address Sandboxing  Segment matching can pinpoint the offending instruction.  Sandboxing reduces runtime overhead further, at the cost of providing no info about the source of faults.  Before each unsafe instruction we simply insert code that sets the upper bits of the target address to the correct segment ID.

Pseudo code for Address Sandboxing Again say an unsafe instruction is located in segment 101, but wants to write to segment 100. Initially, target-reg= ; segment-reg=101; and-mask- reg= ; target-reg&and-mask-reg = so dedicated-reg= segment-reg | dedicated-reg = so dedicated-reg = store value, dedicated-reg Now instead of writing to the intended unsafe location , sandboxing changed the target address to , which is in the same fault domain of the writing instruction. In this case may be this fault domain will be corrupt, but it does not affect other fault domains..

Guard Zone Optimization  RISC architectures include a register-plus-offset instruction mode.  Take instruction “store value, offset(reg)”.  To avoid calculating reg+offset,  we directly sandbox the reg, at the expense of creating guard zones at the top and bottom of each segment.  Avoid sandboxing the use of stack pointer by sandboxing the dedicated register which significantly improves performance.

Cross Fault Domain Communication  Control escapes a distrusted fault domain only via a jump table (to stub instruction).  A call-stub and a return-stub are created for each pair of fault domains.  The stub is also responsible for managing machine states and registers.  Fatal errors are handled by UNIX signal facility. Trusted modules may use a timer facility to interrupt execution or determinate a call.

Jump Table  Allows a fault domain to safely call the a trusted stub routine outside its domain; that stub then safely calls into the destination domain.  Each jump table entry is a control transfer instruction whose target address is a legal entry point outside the domain.  Because the table is kept in the (read-only) code segment in the fault domain, it can only be modified by a trusted module.

Performance result

Conclusion  Despite of the 4% overhead in sandboxing technique in executing distrusted code, this method yields best application performance.  whole approach does not enforce the privacy aspect of security, since addresses used in load instructions are not checked or sandboxed, because to do so would be prohibitively expensive.

References Tom Burkleaux ‘ s Slides for Fault domain and cross fault domain communication (figs) on Efficient software based isolation Carl Yao’s slides for Examples of segment matching and address sandboxing Slides on efficient software based isolation-Sandboxing SFI-Risc.pdf