Jeremy Morse, Mikhail Ramalho, Lucas Cordeiro, Denis Nicole, Bernd Fischer ESBMC 1.22 (Competition Contribution)

Slides:



Advertisements
Similar presentations
Sml2java a source to source translator Justin Koser, Haakon Larsen, Jeffrey Vaughan PLI 2003 DP-COOL.
Advertisements

Dataflow Analysis for Datarace-Free Programs (ESOP 11) Arnab De Joint work with Deepak DSouza and Rupesh Nasre Indian Institute of Science, Bangalore.
Garbage Collection in the Next C++ Standard Hans-J. Boehm, Mike Spertus, Symantec.
Bounded Model Checking of Concurrent Data Types on Relaxed Memory Models: A Case Study Sebastian Burckhardt Rajeev Alur Milo M. K. Martin Department of.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Pointers.
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
Question Bank. Explain the syntax of if else statement? Define Union Define global and local variables with example Concept of recursion with example.
Teaching: Secure Systems Presentation to HP Denis A Nicole
1 Symbolic Execution Kevin Wallace, CSE
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
Synthesis, Analysis, and Verification Lecture 04c Lectures: Viktor Kuncak VC Generation for Programs with Data Structures “Beyond Integers”
The C ++ Language BY Shery khan. The C++ Language Bjarne Stroupstrup, the language’s creator C++ was designed to provide Simula’s facilities for program.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 2: Data types and addressing modes dr.ir. A.C. Verschueren.
© Janice Regan, CMPT 128, February CMPT 128: Introduction to Computing Science for Engineering Students Pointers.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
SPLINT STATIC CHECKING TOOL Sripriya Subramanian 10/29/2002.
Rational XL C/C++ Compiler Development © 2007 IBM Corporation Identifying Aliasing Violations in Source Code A Points-to Analysis Approach Ettore Tiotto,
1/20 Generalized Symbolic Execution for Model Checking and Testing Charngki PSWLAB Generalized Symbolic Execution for Model Checking and Testing.
1 Dependent Types for Termination Verification Hongwei Xi University of Cincinnati.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Assembly Code Verification Using Model Checking Hao XIAO Singapore University of Technology and Design.
Compiler Construction
Atomicity in Multi-Threaded Programs Prachi Tiwari University of California, Santa Cruz CMPS 203 Programming Languages, Fall 2004.
Lazy-CSeq A Lazy Sequentialization Tool for C Omar Inverso University of Southampton, UK Ermenegildo Tomasco University of Southampton, UK Bernd Fischer.
C. FlanaganSAS’04: Type Inference Against Races1 Type Inference Against Races Cormac Flanagan UC Santa Cruz Stephen N. Freund Williams College.
1 1 Lecture 4 Structure – Array, Records and Alignment Memory- How to allocate memory to speed up operation Structure – Array, Records and Alignment Memory-
Pointer. Warning! Dangerous Curves C (and C++) have just about the most powerful, flexible and dangerous pointers in the world. –Most other languages.
Partial Order Reduction for Scalable Testing of SystemC TLM Designs Sudipta Kundu, University of California, San Diego Malay Ganai, NEC Laboratories America.
1 Type Type system for a programming language = –set of types AND – rules that specify how a typed program is allowed to behave Why? –to generate better.
May 9, 2001OSQ Retreat 1 Run-Time Type Checking for Pointers and Arrays in C Wes Weimer, George Necula Scott McPeak, S.P. Rahul, Raymond To.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
Alleviating False Alarm Problem of Static Buffer Overflow Analysis Youil Kim
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Model Checking Embedded Systems
CS 11 C track: lecture 5 Last week: pointers This week: Pointer arithmetic Arrays and pointers Dynamic memory allocation The stack and the heap.
1 VeriSoft A Tool for the Automatic Analysis of Concurrent Reactive Software Represents By Miller Ofer.
Types(1). Lecture 52 Type(1)  A type is a collection of values and operations on those values. Integer type  values..., -2, -1, 0, 1, 2,...  operations.
1 Splint: A Static Memory Leakage tool Presented By: Krishna Balasubramanian.
1 Model Checking of Robotic Control Systems Presenting: Sebastian Scherer Authors: Sebastian Scherer, Flavio Lerda, and Edmund M. Clarke.
Motivation  Parallel programming is difficult  Culprit: Non-determinism Interleaving of parallel threads But required to harness parallelism  Sequential.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Theory-Aided Model Checking of Concurrent Transition Systems Guy Katz, Clark Barrett, David Harel New York University Weizmann Institute of Science.
© 2006 Carnegie Mellon University Introduction to CBMC: Part 1 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie Gurfinkel,
Lecture 13.
Prof. Necula CS 164 Lecture 171 Operational Semantics of Cool ICOM 4029 Lecture 10.
© 2006 Carnegie Mellon University Introduction to CBMC: Part 1 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie Gurfinkel,
Bernd Fischer RW714: SAT/SMT-Based Bounded Model Checking of Software.
Bernd Fischer RW714: SAT/SMT-Based Bounded Model Checking of Software.
© Anvesh Komuravelli Spacer Model Checking with Proofs and Counterexamples Anvesh Komuravelli Carnegie Mellon University Joint work with Arie Gurfinkel,
Content Coverity Static Analysis Use cases of Coverity Examples
Ch 2. Getting Started with the Kernel
SS 2017 Software Verification Bounded Model Checking, Outlook
Types for Programs and Proofs
Semantic Analysis Type Checking
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
C Basics.
Amir Kamil and Katherine Yelick
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
ESBMC: bounded model checking for C & C++ Denis A Nicole
Lazy Sequentialization Unbounded Concurrent Programs
Covering CWE with Programming Languages and Tools
Introduction to Static Analyzer
Introduction to Data Structure
Amir Kamil and Katherine Yelick
Presentation transcript:

Jeremy Morse, Mikhail Ramalho, Lucas Cordeiro, Denis Nicole, Bernd Fischer ESBMC 1.22 (Competition Contribution)

ESBMC: SMT-based BMC of single- and multi-threaded software exploits SMT solvers and their background theories: –optimized encodings for pointers, bit operations, unions and arithmetic over- and underflow –efficient search methods (non-chronological backtracking, conflict clauses learning) supports verifying multi-threaded software that uses pthreads threading library –interleaves only at “visible” instructions –lazy exploration of the reachability tree –optional context-bound derived from CBMC (v2.9) and has inherited its object- based memory model

ESBMC verification support built-in properties: –arithmetic under- and overflow –pointer safety –array bounds –division by zero –memory leaks –atomicity and order violations –deadlocks –data races user-specified assertions (__ESBMC_assume, __ESBMC_assert) built-in scheduling functions (__ESBMC_atomic_begin, __ESBMC_atomic_end, __ESBMC_yield)

Differences to ESBMC 1.20 ESBMC 1.22 is largely a bugfixing release: –memory handling –replaced CBMC’s string-based accessor functions → increased ESBMC’s speed by 2x improved memory model for precision, performance, and stability produces a smaller number of false results –more errors detected (+109), fewer unexpected (-15) and missed (-157) errors

ESBMC’s memory model statically tracks possible pointer variable targets (objects) –dereferencing a pointer leads to the construction of guarded references to each potential target C is very liberal about permitted dereferences SAT: immediate access to bit-level representation struct foo { uint16_t bar[2]; uint8_t baz; }; struct foo qux; char *quux = &qux; quux++; *quux; pointer and object types do not match

ESBMC’s memory model statically tracks possible pointer variable targets (objects) –dereferencing a pointer leads to the construction of guarded references to each potential target C is very liberal about permitted dereferences SMT: sorts must be repeatedly unwrapped struct foo { uint16_t bar[2]; uint8_t baz; }; struct foo qux; char *quux = &qux; quux++; *quux; pointer and object types do not match

Byte-level data extraction in SMT access to underlying data bytes is complicated –requires manipulation of arrays / tuples problem is magnified by nondeterministic offsets supporting all legal behaviors at SMT layer difficult –extract (unaligned) 16bit integer from *fuzz experiments showed significantly increased memory consumption uint16_t *fuzz; if (nondet_bool()) { fuzz = &qux.bar[0]; } else { fuzz = &qux.baz; } ─ chooses accessed field nondeterministically ─ requires a byte_extract expression ─ handles the tuple that encoded the struct

“Aligned” Memory Model framework cannot easily be changed to SMT-level byte representation (a la LLBMC) push unwrapping of SMT data structures to dereference enforce C alignment rules –static analysis of pointer alignment eliminates need to encode unaligned data accesses → reduces number of behaviors that must be modeled –add alignment assertions (if static analysis not conclusive) –extracting 16-bit integer from *fuzz : –offset = 0: project bar[0] out of foo –offset = 1: “unaligned memory access” failure –offset = 2: project bar[1] out of foo –offset = 3: “unaligned memory access” failure –offset = 4: “access to object out of bounds” failure

Strengths: Weaknesses: all unexpected results are caused by –bounding the programs (Recursive) –differences in the memory models (MemorySafety) → ESBMC detects an unchecked dereference of a pointer to a freshly allocated memory chunk robust context-bounded model checker for C programs improved memory model to handle pointer arithmetic –greater accuracy and faster verification