By Gene Novark, Emery D. Berger and Benjamin G. Zorn Presented by Matthew Kent Exterminator: Automatically Correcting Memory Errors with High Probability.

Slides:



Advertisements
Similar presentations
DieHard: Memory Error Fault Tolerance in C and C++ Ben Zorn Microsoft Research In collaboration with Emery Berger and Gene Novark, Univ. of Massachusetts.
Advertisements

System Integration and Performance
Lectures on File Management
Introduction to Memory Management. 2 General Structure of Run-Time Memory.
Kernel memory allocation
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Michael Bond Kathryn McKinley The University of Texas at Austin Presented by Na Meng Most of the slides are from Mike’s original talk. Many thanks go to.
Fast and Safe Performance Recovery on OS Reboot Kenichi Kourai Kyushu Institute of Technology.
Computer Organization and Architecture
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science 2007 Exterminator: Automatically Correcting Memory Errors with High Probability Gene.
DIEHARDER: SECURING THE HEAP. Previously in DieHard…  Increase Reliability by random positioning of data  Replicated Execution detects invalid memory.
Ben Livshits Based in part of Stanford class slides from and slides from Ben Zorn’s talk slides.
Hastings Purify: Fast Detection of Memory Leaks and Access Errors.
CPSC 388 – Compiler Design and Construction
Chapter 8 Runtime Support. How program structures are implemented in a computer memory? The evolution of programming language design has led to the creation.
On the limits of partial compaction Anna Bendersky & Erez Petrank Technion.
Chapter 15 : Attacking Compiled Applications Alexis Kirat - International Student.
By Emery D. Berger and Benjamin G. Zorn Presented by: David Roitman.
Continuously Recording Program Execution for Deterministic Replay Debugging.
More on protocol implementation Packet parsing Memory management Data structures for lookup.
EECC722 - Shaaban #1 Lec # 10 Fall Conventional & Block-based Trace Caches In high performance superscalar processors the instruction fetch.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science PLDI 2006 DieHard: Probabilistic Memory Safety for Unsafe Programming Languages Emery.
1.1 CAS CS 460/660 Introduction to Database Systems File Organization Slides from UC Berkeley.
Quarantine: A Framework to Mitigate Memory Errors in JNI Applications Du Li , Witawas Srisa-an University of Nebraska-Lincoln.
EECC722 - Shaaban #1 Lec # 9 Fall Conventional & Block-based Trace Caches In high performance superscalar processors the instruction fetch.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science 2006 Exterminator: Automatically Correcting Memory Errors Gene Novark, Emery Berger.
University of Washington CSE 351 : The Hardware/Software Interface Section 5 Structs as parameters, buffer overflows, and lab 3.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
Address Space Layout Permutation
Model Bank Testing Accelerators “Ready-to-use” test scenarios to reduce effort, time and money.
Survey “Intrusion Detection: Systems and Models” “A Stateful Intrusion Detection System for World-Wide Web Servers”
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
CH2 System models.
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
Computer Security and Penetration Testing
BLENDED ATTACKS EXPLOITS, VULNERABILITIES AND BUFFER-OVERFLOW TECHNIQUES IN COMPUTER VIRUSES By: Eric Chien and Peter Szor Presented by: Jesus Morales.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt In ACM CCS’05.
Presentation of Failure- Oblivious Computing vs. Rx OS Seminar, winter 2005 by Lauge Wullf and Jacob Munk-Stander January 4 th, 2006.
Computer Science and Software Engineering University of Wisconsin - Platteville 2. Pointer Yan Shi CS/SE2630 Lecture Notes.
DieHard: Probabilistic Memory Safety for Unsafe Languages Emery D. Berger and Benjamin G. Zorn PLDI'06 Presented by Uri Kanonov
Storage Management. The stack and the heap Dynamic storage allocation refers to allocating space for variables at run time Most modern languages support.
Computing Infrastructure for Large Ecommerce Systems -- based on material written by Jacob Lindeman.
SEC835 Runtime integrity and resource control. Application based Denial of Service Application can crash for many reasons and at any time due to programming.
Memory Management during Run Generation in External Sorting – Larson & Graefe.
Copyright © Lopamudra Roychoudhuri
CISC Machine Learning for Solving Systems Problems Presented by: Suman Chander B Dept of Computer & Information Sciences University of Delaware Automatic.
Author: Gene Novark, Emery D. Berger University of Massachusetts Amherst DieHarder: Securing the Heap ACM CCS’10.
CNIT 127: Exploit Development Ch 8: Windows Overflows Part 2.
Concurrency Properties. Correctness In sequential programs, rerunning a program with the same input will always give the same result, so it makes sense.
Group 9. Exploiting Software The exploitation of software is one of the main ways that a users computer can be broken into. It involves exploiting the.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 11, 2011.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
Pinpoint: Problem Determination in Large, Dynamic Internet Services Mike Chen, Emre Kıcıman, Eugene Fratkin {emrek,
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
Improve Embedded System Stability and Performance through Memory Analysis Tools Bill Graham, Product Line Manager Development Tools November 14, 2006.
Self Recovery in Server Programs The University of California, Riverside Vijay Nagarajan Dennis JeffreyRajiv Gupta International Symposium on Memory Management.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Presented by: Daniel Taylor
YAHMD - Yet Another Heap Memory Debugger
Joseph JaJa, Mike Smorul, and Sangchul Song
Storage Management.
Real-time Software Design
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Jihyun Park, Changsun Park, Byoungju Choi, Gihun Chang
CETS: Compiler-Enforced Temporal Safety for C
Presentation transcript:

By Gene Novark, Emery D. Berger and Benjamin G. Zorn Presented by Matthew Kent Exterminator: Automatically Correcting Memory Errors with High Probability

Contents Overview Target memory errors Modes of operation Components of Exterminator Heap architecture Debugging allocator Error isolation Error correction Results found Conclusion

Overview Manual memory management in C and C++ results in vulnerability to various memory errors. In particular Dangling-Pointers, Buffer Overflows. Traditional debugging methods are costly and time consuming. Symantec: avg time between discovery and patch deployment for an exploitable bug is 28 days. The author presents Exterminator, a runtime system that detects, isolates & corrects two classes of memory error.

Target Memory Errors Dangling pointers and Buffer- overflow errors are the most commonly exploited memory errors. Previous works could detect and tolerate these. Exterminator aims to correct them.

Modes of Operation Iterative mode: – Sequentially replays the program, each time with the same input but using different random-seeds. Replicated mode : – Monitors concurrent executions with different random-seeds. Cumulative mode: – Gradually builds up statistical data over normal runs of the program.

Components of Exterminator Exterminator features 3 core components: Probabilistic debugging allocator. Probabilistic error isolation algorithm. Correcting memory allocator. The Probabilistic Debugging allocator: Ensures the heap is always M times larger than max ‘needed’ (1/M ratio). Does this using ‘mini-heaps’. Randomised Bitmaps tests allow for O(1) allocation/de-allocation. Ensures: Probable that overflows go into free space. Probable that freed objects aren’t immediately reused.

Heap Architecture Object ID's are sequential (an ID of n indicates the object as the nth object allocated). 'Site' information fields capture the calling contexts. Canary bit indicates if the object location was filled with canaries. This data persists from allocation, until an object is allocated in its place. This adds a memory overhead of 16 bytes and 2 bits per allocated object.

Debugging Allocator 32bit randomised canary padding:  Buffer overflows detected when canary ‘fence-posts’ are overrun.  Dangling pointers detected when canaries are read, and the program throws an error.  May match true data values; in 'cumulative mode' Exterminator only sets canaries with probability P.  When Exterminator allocates memory it checks canary integrity (based on bit-set).  If not intact then it signals an error and isolates this memory.  When Exterminator de-allocates memory, it also checks neighbours. If free it performs the same canary-check.

Error Isolation In Iterative and Replicated modes Buffer overflows: Compare objects across heaps (by Object ID). They should be identical. If they are not identical, they are considered a candidate 'victim' of an overflow. Some exceptions (pointers, handles). For each candidate-victim found Exterminator then examines heap images to find a matching 'culprit' object. Must be the same distance  from the victim within each heap-image. Once a culprit has been deduced, overflow size is recorded as max-victim-  Dangling pointers: Under these modes, only read & write dangling pointers are found. Would require >20 replicas for read only dangling pointers. When a freed object is overwritten with the same values across all heap- images, classified as a dangling pointer error.

Error Isolation In Cumulative mode Approach is to consider exceptional program events (crashes) and generate statistics. Dangling pointers: To force different runs to respond differently, de-allocated objects are only filled with canaries with a probability P. The choice of P reflects a trade-off between dangling pointer isolation, and buffer overflow isolation (converse effects). Buffer overflows: Identifies corruption by looking for overwritten canary values. For each allocation site, computes probability that the 'culprit' is within. Combines these independent statistics from each run to deduce sites that consistently appear as candidates for housing the culprit. Deduces the culprit from these sites.

Error Correction Buffer overflow correction – Runtime patch contains allocation-site hash and amount of padding needed to contain the overflow (  + size of the overflow). If a patch for the allocation site already exists, the Max is used. Dangling Pointer Correction – Runtime patch contains allocation/de-allocation-site hash and amount of time by which to delay de-allocation: Let  be the recorded de-allocation time of this object. T be the time at which the program crashed or corruption was detected. Delay will be: 2 x (T -  ) + 1.

Results Found Exterminator degrades performance by from 0% to 132%. Overall geometric mean of 25.1%. Most extensive across allocation-intensive suite (81.2% geometric mean). Less pronounced across SPECint2000 suite (7.2% g.m.).

Results Found Test TypeIterations TakenFalse-negative rate Buffer-overflows30% Test TypeSuccessful RunsIterations Taken Dangling Ptr. (iterative-mode)4/101 Dangling Ptr. (cumulative-mode) N/A22-30 SoftwareProblemResult Squid Web CacheInput-dependant overflow Leads to crash 6-byte pad generated Error corrected Mozilla FirefoxOverflow Cumulative mode only 23 runs with quick-trigger 34 runs with prolonged trigger Error corrected Injected Errors Real Errors

Conclusion Exterminator automatically detects and corrects runtime heap-based memory errors in C/C++ programs, to a high probability. Consists of: – Probabilistic debugging allocator. – Probabilistic error isolation algorithm. – Correcting memory allocator. Provably low false-positive and false-negative rates. Runtime patches are generated that the correcting-memory-allocator corrects memory errors with. Exterminator is useful during testing and in deployed applications.