Static Provenance Verification for Message Passing Programs Rupak Majumdar Roland MeyerZilong Wang MPI-SWSTU KaiserslauternMPI-SWS.

Slides:



Advertisements
Similar presentations
Formal Methods and Testing Goal: software reliability Use software engineering methodologies to develop the code. Use formal methods during code development.
Advertisements

Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Advanced topics in touchdevelop privacy transparent privacy control via information flow analysis Disclaimer: This document is provided “as-is”. Information.
Expand, Enlarge, and Check for Branching Vector Addition Systems Rupak Majumdar Zilong Wang MPI-SWS.
Global States.
Techniques to analyze workflows (design-time)
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Based on: Petri Nets and Industrial Applications: A Tutorial
What’s Decidable for Asynchronous Programs? Rupak Majumdar Max Planck Institute for Software Systems Joint work with Pierre Ganty, Michael Emmi, Fernando.
Timed Automata.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
From Monotonic Transition Systems to Monotonic Games Parosh Aziz Abdulla Uppsala University.
Tonight’s JavaScript Topics 1 Conditional Statements: if and switch The Array Object Looping Statements: for, while and do-while.
Software Reliability CIS 640 Adapted from the lecture notes by Doron Pelel (
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture 05.
1 Spin Model Checker Samaneh Navabpour Electrical and Computer Engineering Department University of Waterloo SE-464 Summer 2011.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Simulation of Spiking Neural P Systems Using Pnet Lab Authors Padmavati Metta Kamala Krithivasan Deepak Garg.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
CSC 402 Requirements Engineering 1 Requirements Techniques, cont. Formal requirements analysis techniques include: – DFD (covered) – ERD (covered) – Finite.
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
A 14← department of mathematics and computer science PROSE Checking Properties of Adaptive Workflow Nets K. van Hee, I. Lomazova, O. Oanea,
Requirements Techniques, cont. Brief review Formal Requirements Techniques –Finite State Machines –Petri Nets.
PRIAM: PRivate Information Access Management on Outsourced Storage Service Providers Mark Shaneck Karthikeyan Mahadevan Jeff Yongdae Kim.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Sage CRM Developers Course
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
W. Sliwinski – eLTC – 7March08 1 LSA & Safety – Integration of RBAC and MCS in the LHC control system.
JavaScript, Fourth Edition
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
M1G Introduction to Database Development 6. Building Applications.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Author: Graham Hughes, Tevfik Bultan Computer Science Department, University of California, Santa Barbara, CA 93106, USA Source: International Journal.
Dynamic Analysis of Multithreaded Java Programs Dr. Abhik Roychoudhury National University of Singapore.
Basic & Advanced Reporting in TIMSNT ** Part Two **
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Accessing Your MySQL Database from the Web with PHP (Ch 11) 1.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Windows Workflow Foundation Ruwan Wijesinghe.
Model 3: Message-Passing Text We saw –Diagrams –Shared-variables text Now –Message-passing text (like CSP)
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
CS294, Yelick Consensus revisited, p1 CS Consensus Revisited
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Programming Paradigms By Tyler Smith. Event Driven Event driven paradigm means that the program executes code in reaction to events. The limitation of.
1 Distributed BDD-based Model Checking Orna Grumberg Technion, Israel Joint work with Tamir Heyman, Nili Ifergan, and Assaf Schuster CAV00, FMCAD00, CAV01,
IS2802 Introduction to Multimedia Applications for Business Lecture 8: JavaScript and Cookies Rob Gleasure
Quick Test Professional 9.2. Testing Process Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting.
Merger By Dave Doulton University of Southampton.
Parallel Computation of Skyline Queries Verification COSC6490A Fall 2007 Slawomir Kmiec.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
Algorithms and Decision Procedures for Regular Languages Chapter 9.
Abstraction and Abstract Interpretation. Abstraction (a simplified view) Abstraction is an effective tool in verification Given a transition system, we.
Lawson Mid-America User Group Spring 2016 Meeting.
Turing Machine Model Are there computations that no “reasonable” computing machine can perform? –the machine should not store the answer to all possible.
Requirements Techniques, cont.
Sequentializing Parameterized Programs
Async or Parallel? No they aren’t the same thing!
Clockless Computing COMP
Summary.
Over-Approximating Boolean Programs with Unbounded Thread Creation
CSCI1600: Embedded and Real Time Software
Petri Net :Abstract formal model of information flow Major use:
CIS825 Lecture 5 1.
Presentation transcript:

Static Provenance Verification for Message Passing Programs Rupak Majumdar Roland MeyerZilong Wang MPI-SWSTU KaiserslauternMPI-SWS

Motivation: Taint Analysis “All data from sources must be sanitized before a sink.” otherwise sanitizer source sink data source. sanitizer

Provenance Information about the source and access history of an object Databases: What rows were used to compute a query? Workflows: Which information was used for a result? Program Analysis: what can we do?

Provenance Verification for Concurrent Programs Questions: Can we statically track provenance information in a concurrent program model? Can we verify interesting provenance properties? Main results: A model of asynchronous message passing program with provenances Static provenance verification is decidable (with finite data domains)

Message Passing Program Principals run in parallel – Local variables – Operations: control flow, send(ch, x), recv(ch, x) Channels – Unbounded but unordered Messages – Finite domain

Provenance on Messages Provenance of a message = Principals who have sent the message chronologically Provenance domain = Strings over principal names

ch0 Medical Example PC1 PC2 PC3 ch2 principal patient { var p1, p2, p3; while(true) { choose :: p1 = HQ; send(ch0, p1); :: p1 = AR; send(ch0, p1); :: recv(ch1, p2); if (p2 == HA) p3 = p2;}} ch1 principal secretary { var s1, s2; while(true) { recv(ch0, s1); if (s1 == HQ) send(ch2, s1); else { s2 = AA(s1); send(ch1, s2);}}} principal doctor { var d1, d2; while(true) { recv(ch2, d1); d2 = HA(d1); choose :: send(ch2, d2); :: send(ch1, d2);}} HQ HQ, patient HQ, patient HA HA, patient.secretary.doctor.doctor HA, patient.secretary.doctor.doctor HQ, patient.secretary HQ, patient.secretary HA, patient.secretary.doctor HA, patient.secretary.doctor

ch0 Medical Example PC1 PC2 PC3 principal patient { var p1, p2, p3; while(true) { choose :: p1 = HQ; send(ch0, p1); :: p1 = AR; send(ch0, p1); :: recv(ch1, p2); if (p2 == HA) p3 = p2; } ch2 ch1 principal secretary { var s1, s2; while(true) { recv(ch0, s1); if (s1 == HQ) send(ch2, s1); else { s2 = AA(s1); send(ch1, s2); } principal doctor { var d1, d2; while(true) { recv(ch2, d1); d2 = HA(d1); choose :: send(ch2, d2); :: send(ch1, d2);}} HQ HA, patient.secretary.doctor.doctor HA, patient.secretary.doctor.doctor Requirement: Every health answer received by a patient must be seen by a doctor at least once. Requirement: Every health answer received by a patient must be seen by a doctor at least once. Provenance problem: Are provenances of messages in p3 always in the regular set along all executions?

Provenance Verification Problem Given a message passing program P, a variable x, and a regular set R of provenances, are provenances of all messages stored in x always in the set R along all executions of P?

Verification Challenge Infinite state space: 1.Unboundedly many messages in a channel 1.Unboundedly many provenances

ch0 Unbounded Messages in a Channel PC1 principal patient { var p1, p2, p3; while(true) { choose :: p1 = HQ; send(ch0, p1); :: p1 = AR; send(ch0, p1); :: recv(ch1, p2); if (p2 == HA) p3 = p2;}} ch1 ch2 principal secretary { var s1, s2; while(true) { recv(ch0, s1); if (s1 == HQ) send(ch2, s1); else { s2 = AA(s1); send(ch1, s2);}}} principal doctor { var d1, d2; while(true) { recv(ch2, d1); d2 = HA(d1); choose :: send(ch2, d2); :: send(ch1, d2);}} HQ

Verification Challenge Infinite state space: 1.Unboundedly many messages in a channel 1.Unboundedly many provenances

ch0 Unboundedly Many Provenances PC3 principal patient { var p1, p2, p3; while(true) { choose :: p1 = HQ; send(ch0, p1); :: p1 = AR; send(ch0, p1); :: recv(ch1, p2); if (p2 == HA) p3 = p2;}} ch1 ch2 principal secretary { var s1, s2; while(true) { recv(ch0, s1); if (s1 == HQ) send(ch2, s1); else { s2 = AA(s1); send(ch1, s2);}}} principal doctor { var d1, d2; while(true) { recv(ch2, d1); d2 = HA(d1); choose :: send(ch2, d2); :: send(ch1, d2);}} HA HA, ….doctor.doctor HA, ….doctor.doctor

Unbounded Messages: Petri Net Finite set of places Finite set of transitions Places marked with tokens Fire transitions An infinite state system Coverability problem is decidable. Is a given place markable in some execution?

B A Program to a Bisimilar Petri Net A transition for each operation in a program 1.A place for each control location 2.A place (x, m): for each variable x and each message value m 3.A place (ch, m): for each channel ch and each message value m

Unboundedly many provenances  unboundedly many places! Consider Provenances

Provenance Automata Provenance problem: Are provenances of all messages stored in x always in the regular set R of provenances along all executions of P? A regular set of provenances  DFA The answer to the problem depends on the states of DFA, not on individual provenances. Equivalence classes w.r.t. states: Two provenances are equivalent if they let DFA go to the same state.

ch2 ch0 PC1 PC2 PC3 principal patient { var p1, p2, p3; while(true) { choose :: p1 = HQ; send(ch0, p1); :: p1 = AR; send(ch0, p1); :: recv(ch1, p2); if (p2 == HA) p3 = p2;}} ch1 principal secretary { var s1, s2; while(true) { recv(ch0, s1); if (s1 == HQ) send(ch2, s1); else { s2 = AA(s1); send(ch1, s2);}}} principal doctor { var d1, d2; while(true) { recv(ch2, d1); d2 = HA(d1); choose :: send(ch2, d2); :: send(ch1, d2);}} q0 q1 P q2 q3 S D D a HA HA, patient.secretary. doctor HA, patient.secretary. doctor HA,q3 Track States, not Provenances

ch2 ch0 PC1 PC2 principal patient { var p1, p2, p3; while(true) { choose :: p1 = HQ; send(ch0, p1); :: p1 = AR; send(ch0, p1); :: recv(ch1, p2); if (p2 == HA) p3 = p2; } ch1 principal secretary { var s1, s2; while(true) { recv(ch0, s1); if (s1 == HQ) send(ch2, s1); else { s2 = AA(s1); send(ch1, s2); } q0 q1 P q2 q3 S D D HQ,q2 HA,q3 a Provenance problem: Are provenances of messages in p3 always in the regular set along all executions? Coverability problem: Is one of the places (p3,*,q1),(p3,*,q2) and (p3,*,sink) markable along some execution? Provenance problem: Are provenances of messages in p3 always in the regular set along all executions? Coverability problem: Is one of the places (p3,*,q1),(p3,*,q2) and (p3,*,sink) markable along some execution? Track States, not Provenances

Program + Provenance DFA ➔ poly Petri net Provenance verification problem = Coverability problem of Petri nets Reduction

Provenance verification problem for message passing programs is decidable and is EXPSPACE-complete. Main Theorem

Application: Firefox Extensions Database service: mozlStorageService async APIs Private mode in Firefox No restrictions for extensions in private mode Question: can extensions save user data into databases in the private mode?

Extensions and Channels DB PubEx PriEx ch0 ch1 ch2 ch0: for temporary files ch1, ch2: for database async API calls Are provenances of all messages received by DB always in the set PubEx * along all executions?

Tool 1.Use Javascript analyzer JSure to obtain the control flow of extensions 2.Perform data flow abstraction to obtain Petri net models 3.Run a coverability checker

Experimental Results  Nine extensions using mozlStorageService  Five extensions save user information to databases in private mode -Amazon price history -Facebook chat history manager -FVD Speed Dial -Privad privacy-aware ad server -Shopping assistant

Summary  Provenance verification problem in concurrent message passing programs -Coverability problem of Petri nets  Firefox extensions may save user data in private mode (Be careful!)

Questions?