Efficient Memory Safety for TinyOS 2.1

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

NesC Prepared for the Multimedia Networks Group University of Virginia.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Sensor Network Platforms and Tools
Extensibility, Safety and Performance in the SPIN Operating System Department of Computer Science and Engineering, University of Washington Brian N. Bershad,
Static Analysis of Embedded C Code John Regehr University of Utah Joint work with Nathan Cooprider.
Vertically Integrated Analysis and Transformation for Embedded Software John Regehr University of Utah.
1 Efficient Memory Safety for TinyOS Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing † Intel Research.
How to Code on TinyOS Xufei Mao Advisor: Dr. Xiang-yang Li CS Dept. IIT.
Incremental Network Programming for Wireless Sensors NEST Retreat June 3 rd, 2004 Jaein Jeong UC Berkeley, EECS Introduction Background – Mechanisms of.
1 TinyOS 2.1: Deploying Memory Safety Nathan Cooprider Yang Chen Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing †
Random Testing of Interrupt-Driven Software John Regehr University of Utah.
Generic Sensor Platform for Networked Sensors Haywood Ho.
Static Analysis of Embedded C John Regehr University of Utah Joint work with Nathan Cooprider.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Generic Sensor Platform for Networked Sensors Haywood Ho.
1 Efficient Memory Safety for TinyOS 2.1 Yang Chen Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing.
Extensibility, Safety and Performance in the SPIN Operating System Dave Camarillo.
High-Level Optimizations for Low-Level Software John Regehr University of Utah.
2008EECS Embedded Network Programming nesC, TinyOS, Networking, Microcontrollers Jonathan Hui University of California, Berkeley.
A Static Analysis Framework For Embedded Systems Nathan Cooprider John Regehr's Embedded Systems Group.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Lecture 1.
Chapter 1- Introduction Lecture 1 Ready, fire, aim (the fast approach to software development). Ready, aim, aim, aim, aim... (the slow approach to software.
The University of Iowa. Copyright© 2005 A. Kruger 1 Introduction to Wireless Sensor Networks TinyOS Overview 10 February 2005.
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
Shahin Farshchi, Member, IEEE, Aleksey Pesterev, Paul Nuyujukian, Eric Guenterberg, Istvan Mody, and Jack W. Judy, Senior Member, IEEE, ” Structure of.
Surviving Sensor Network Software Faults Yang Chen, John Regehr (U. Utah) Omprakash Gnawali (USC) Maria Kazandjieva, Philip Levis (Stanford)
Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006.
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.
Rapid Development and Flexible Deployment of Adaptive Wireless Sensor Network Applications Chien-Liang Fok, Gruia-Catalin Roman, Chenyang Lu
1 Efficient Type and Memory Safety for Tiny Embedded Systems John Regehr Nathan Cooprider Will Archer Eric Eide University of Utah School of Computing.
OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Writing Systems Software in a Functional Language An Experience Report Iavor Diatchki, Thomas Hallgren, Mark Jones, Rebekah Leslie, Andrew Tolmach.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
Tool Working Group Report John Regehr. 2 Tool WG Agenda Technology transfer: Move software tools from research into practical use for TinyOS 2.x developers.
1 Splint: A Static Memory Leakage tool Presented By: Krishna Balasubramanian.
A Tool for Pro-active Defense Against the Buffer Overrun Attack D. Bruschi, E. Rosti, R. Banfi Presented By: Warshavsky Alex.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
Thinking in Parallel – Implementing In Code New Mexico Supercomputing Challenge in partnership with Intel Corp. and NM EPSCoR.
1 Software Reliability in Wireless Sensor Networks (WSN) -Xiong Junjie
Chapter 1- Introduction Lecture 1. Topics covered  Professional software development  What is meant by software engineering.  Software engineering.
Software Architecture of Sensors. Hardware - Sensor Nodes Sensing: sensor --a transducer that converts a physical, chemical, or biological parameter into.
Language-Based Security: Overview of Types Deepak Garg Foundations of Security and Privacy October 27, 2009.
Sabrina Wilkes-Morris CSCE 548 Student Presentation
What Do Computers Do? A computer system is
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code
Types for Programs and Proofs
Operating System for Sensor Network
Chapter 1- Introduction
Safe TinyOS.
David Gay Intel Research Berkeley
Discussion and Conclusion
CMPE419 Mobile Application Development
Chapter 3: Windows7 Part 1.
Introduction to Computers
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Improving software quality using Visual Studio 11 C++ Code Analysis
Title of Poster Site Visit 2017 Introduction Results
Black Box Software Testing Fall 2004
Chapter 7 –Implementation Issues
Comparison to existing state of security experimentation
Title of Poster Site Visit 2018 Introduction Results
CMPE419 Mobile Application Development
This material is based upon work supported by the National Science Foundation under Grant #XXXXXX. Any opinions, findings, and conclusions or recommendations.
Presentation transcript:

Efficient Memory Safety for TinyOS 2.1 Yang Chen, Nathan Cooprider, Will Archer, Eric Eide, David Gay§, John Regehr School of Computing, University of Utah §Intel Research, Berkeley {chenyang, coop, warcher, eeide, regehr}@cs.utah.edu david.e.gay@intel.com Wireless Sensor Network Safe TinyOS Tool Chain Wireless Sensor Network Annotate Safe TinyOS code run modified nesC compiler enforce safety using Deputy compress error messages app Modify TinyOS to work with Deputy Enforce Deputy’s safety model Reduce overhead Introduction Background The Benefits of Safety Reliable sensor network software is difficult to create: applications are concurrent and distributed hardware-based memory protection is unavailable severe resource constraints necessitate the use of unsafe, low-level languages. TinyOS. TinyOS 2 is the dominant system for programming wireless sensor network devices. A programmer writes a few custom components and links them with components from the TinyOS library. Components are written in nesC, a dialect of C. for (i = 0; i < NUM_BUFFERS; i++) { if (m_pool[i].msg == NULL) break; } if (m_pool[i].msg == NULL) { m_pool[i].msg = _msg; Array Out-of-bounds Deputy. Deputy is a source-to-source compiler for ensuring type and memory safety for c code. A programmer must inform the compiler of this previously implicit information using type annotations. Code compiled by Deputy relies on a mix of compile- and run-time checks to ensure that these annotations are respected, and hence that type and memory safety are respected. Bug Confirmed! Array Out-of-bounds Reboot Normal TinyOS Safe Rebuild Soft state Normal TinyOS: 0% average availability Safe TinyOS: 95% average Array Out-of-bounds Practical Safety for TinyOS interface ReadStream<val_t> { command error_t postBuffer(val_t* buf, uint16_t n); command error_t read(uint32_t usPeriod); event void bufferDone(error_t result, val_t* buf, uint16_t n); event void readDone(error_t result, uint32_t usActualPeriod); } /* code from TinyOS 2.1 */ Null Pointer Dereference Our Goal: Catch all pointer and array bounds errors before they corrupt states; Put wireless sensor network software development on a solid foundation make mica2 safe Increased Availability! Conclusion and Future Work interface ReadStream<val_t> { command error_t postBuffer(val_t* COUNT_NOK(n) buf, uint16_t n); command error_t read(uint32_t usPeriod); event void bufferDone(error_t result, val_t* COUNT_NOK(n) buf, uint16_t n); event void readDone(error_t result, uint32_t usActualPeriod); } /* annotated code */ Our effort shows that Safe TinyOS is a practical system for the development of reliable sensor network software We are currently deploying and actively working on Safe TinyOS. In the near future we plan to: Support platforms other than Mica2, Micaz, and TelosB Integrate Safe TinyOS with a stack depth analysis tool to avoid stack overflows Solve the problem of unsafe accesses to pointers to dead stack frames – these are not covered by Deputy and make safe execution the default for TinyOS Our contributions: extending the nesC language and compiler to support safety annotations; finding previously unknown bugs; and showing that safety can be exploited to increase the availability of sensor networks applications even when memory errors are left unfixed. Visit Safe TinyOS homepage to know more information! Acknowledgments This material is based upon work supported by the National Science Foundation under Grant Nos. 0448047, 0410285, and 0615367.  Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. http://www.cs.utah.edu/~coop/safetinyos