Combining Sequential and Concurrent Verification - The SMTP Case Study -



Similar documents
VSE II - Hybrid Automata to Express Realtime Properties

A New Approach to Enhance Performance Through SMTP Protocol

CS 164 Winter 2009 Term Project Writing an SMTP server and an SMTP client (Receiver-SMTP and Sender-SMTP) Due & Demo Date (Friday, March 13th)

Middleware Lou Somers

accf_smtp: FreeBSD kernel protection measures against SMTP DDoS and DoS attacks

Emacs SMTP Library. An Emacs package for sending mail via SMTP. Simon Josefsson, Alex Schroeder

Secure Interaction with an Client

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

& text message (SMS) relaying using Talk2M

Chakchai So-In, Ph.D.

Client/Server and Distributed Computing

RUNNING TRACKER ON A TERMINAL SERVER

Concurrent Programming

Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.

Chapter 11 Distributed File Systems. Distributed File Systems

Formal Verification and Linear-time Model Checking

Introduction. What is an Operating System?

Socket Programming in the Data Communications Laboratory

Chapter 2: OS Overview

smtplib SMTP protocol client

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Automated Theorem Proving - summary of lecture 1

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.

File Transfer And Access (FTP, TFTP, NFS) Chapter 25 By: Sang Oh Spencer Kam Atsuya Takagi

SMTP Best Practices, Configurations and Troubleshooting on Lotus Domino.

Large-Scale TCP Packet Flow Analysis for Common Protocols Using Apache Hadoop

A Comparison of Distributed Systems: ChorusOS and Amoeba

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Real Time Programming: Concepts

Last Class: Communication in Distributed Systems. Today: Remote Procedure Calls

Model Checking of Software

M-BOX V Product Profile

Des Moines Area Community College

University of Dayton Department of Computer Science Undergraduate Programs Assessment Plan DRAFT September 14, 2011

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

B) Using Processor-Cache Affinity Information in Shared Memory Multiprocessor Scheduling

CHAPTER 15: Operating Systems: An Overview

MailEnable Scalability White Paper Version 1.2

Chapter 16 Distributed Processing, Client/Server, and Clusters

Electronic Mail

Distributed File Systems

Networking Operating Systems (CO32010)

Division of Mathematical Sciences

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

Protocols and Architecture. Protocol Architecture.

A Database-based System

PRODUCTIVITY ESTIMATION OF UNIX OPERATING SYSTEM

Exokernel : An Operating System Architecture for Application-Level Resource Management. Joong Won Roh

A Smart Telephone Answering Machine with Voice Message Forwarding Capability

Computer and Information Sciences

Chapter 13 Embedded Operating Systems

Lecture 2. Internet: who talks with whom?

New SMTP client for sending Internet mail

How To Write A Network Operating System For A Network (Networking) System (Netware)

A Heterogeneous Internetworking Model with Enhanced Management and Security Functions

Chapter 6, The Operating System Machine Level

Cloud Computing. Up until now

RHODOS A Microkernel based Distributed Operating System: An Overview of the 1993 Version *

Mail system components. Electronic Mail MRA MUA MSA MAA. David Byers

UNISOL SysAdmin. SysAdmin helps systems administrators manage their UNIX systems and networks more effectively.

Network Attached Storage. Jinfeng Yang Oct/19/2015

Trust but Verify: Authorization for Web Services. The University of Vermont

Stateful Inspection Technology

The Win32 Network Management APIs

, SNMP, Securing the Web: SSL

QMAIL & SMTP: A Secure Application for an Unsecure Protocol. Orr Dunkelman. orrd@vipe.technion.ac.il. January 27, 2004 SMTP and QMAIL Slide 1

Distributed Systems [Fall 2012]

Monitoring and Troubleshooting Microsoft Exchange Server 2007 (5051A) Course length: 2 days

Chapter 2: Remote Procedure Call (RPC)

Software Engineering

Object Oriented Database Management System for Decision Support System.

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Operating System Engineering: Fall 2005

ICECCS 08/Workshop «UML&AADL 2008», April, 2, 2008

Operating System Components and Services

1 Organization of Operating Systems

Chapter 11 I/O Management and Disk Scheduling

Lecture 1: Introduction

Distributed Objects and Components

Mail Avenger. David Mazières New York University

Introduction to Formal Methods. Các Phương Pháp Hình Thức Cho Phát Triển Phần Mềm

Towards Verified Automotive Software

The Role of Computers in Synchronous Collaborative Design

Introduction. -- some basic concepts and terminology -- examples for attacks on protocols -- main network security services

A distributed system is defined as

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

EAL4+ Security Target

Project management integrated into Outlook

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

Lesson Plans Configuring Exchange Server 2007

# Constructors $smtp = Net::SMTP->new('mailhost'); $smtp = Net::SMTP->new('mailhost', Timeout => 60);

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Verification of Network Management System Configurations

SMTP Servers. Determine if an message should be sent to another machine and automatically send it to that machine using SMTP.

Overview of CS 282 & Android

Introducing Formal Methods. Software Engineering and Formal Methods

DoS/DDoS Attacks and Protection on VoIP/UC

SYSTEM ecos Embedded Configurable Operating System

Workflow Configuration on R12/R11. High Level Steps. SENDMAIL configuration mostly done by System Administrator Workflow configuration for R12

Transcription:

Deutsches Forschungszentrum für f r Künstliche K Intelligenz Combining Sequential and Concurrent Verification - The SMTP Case Study - Bruno Langenstein, Werner Stephan (DFKI GmbH) Saarbrücken, Germany

VERISOFT Planned for 4 + 4 years Now: first half of first phase (2 years over)

VERISOFT : Overall Goals Pervasive Verification complete verification of real systems tractable academic system, automotive, biometric access control, hardware general methods for the organization of stacked verification Integration of Verification Techniques (Tools) Interactive Systems Automatic Theorem Proving Special Purpose Systems

The Academic System application level

Verification of Concurrent Applications second phase p 1 p n spec first phase Temporal Logic Dynamic Logic Hoare Logic formalization in TLA integration of sequential programming soundness of rules Application-Level Concurrency C0 - Semantics hierachy of models compiler correctness OS System Model CVM Compiler

Sequential Programs C0: subset of C in Verisoft sequential flow of control pointers resource limitations (guards) Semantic definitions in Isabelle Hoare-Logic (VCG) in Isabelle shallow embedding Dynamic Logic in VSE [α]φ : If α terminates φ holds afterwards. soundness of proof rules (for sequential programs) specification of state transitions by E-Theories

A Hierarchy of Models Work in progress UdS: W. Paul S. Bogan E. Alkassar S. Knapp SOS*+Com SOS* VAMOS+SOS VAMOS*/C0 VAMOS* application level concurrency DFKI: W. Stephan B. Langenstein A. Nonnengart G. Rock +(simple) operating system C0 program execution abstraction from scheduler CVM+VAMOS CVM +kernel: interrupts, scheduler communicating virtual machines

Architecture client C0 C0 server send-c receive-r interface send-r receive-c mapping mapping resout[i] resin[j] OS cin[i] cout[j] abstract mediator functionality (of OS)

Internal Structure of C0-Components Components Instantiation: Fixed communication schemes are programmed by using concrete low-level primitives Abstraction: Communication is modelled by abstract actions. communication e-call(τ 1,, τ n,send-c) local C0-state shared data local C0-state send-call receive-result correctness proof C0-statements wait-answer(x, receive-r)

Communication Mechanisms External (procedure) calls client-server Remote Procedure Calls based on ipc used in the example Communication over pipes File system Other solutions can be added

C0 Statements Local state from C0 semantics transformation into small-step semantics

Generic Communication Statements Interface state s ife for communication shared variables manipulated by communication statements data type of interface: lists of messages emptylist means free.

System of Processes for the MTA Processes: email Queue, SMTP-Server, SMTP-Client TCP/IP commands SMTP-Server SendMail TCP/IP TCP/IP GetMail email Queue email Queue GetMail email-client email-client TCP/IP commands SMTP-Client SMTP-Client SendMail SendMail

email-server for SMTP Tasks of the Message Transfer Agent Interaction with the email client getmail sendmail Local storage of emails Communication over the net via SMTP receiving sending

Processes Mail Queue: Storage Interface to email-client SMTP-Sever: Reception of emails via TCP/IP SMTP-Client: Sending emails via TCP/IP Why several processes? SMTP-Server forks can handle several incoming connections Separation of RPC-Servers and RPC-Clients RPC and several TCP/IP connections run concurrently

Communication in the email Server RPC Remote Procedure Calls Similar to local procedure calls procedure name parameters Executed by foreign process RPC-Servers email Queue TCP/IP RPC-Clients SMTP Server SMTP Client email Client TCP/IP commands TCP/IP TCP/IP TCP/IP commands GetMail SMTP- SMTP- Client Client SMTP- Server SendMail email email Queue GetMail Queue SendMail SendMail email-client email-client

Communication in the email Server RPC Remote Procedure Calls Similar to local procedure calls procedure name parameters Executed by foreign process RPC-Servers email Queue TCP/IP RPC-Clients SMTP Server SMTP Client email Client TCP/IP commands TCP/IP TCP/IP TCP/IP commands GetMail SMTP- SMTP- Client Client SMTP- Server SendMail email email Queue GetMail Queue SendMail SendMail email-client email-client

SMTP Server Protocol idle idle connect ack quit data data data ok rcpt to <recipient> ok rcpt rcpt quit quit connect greeting quit lines of mail text store mail, ok rcpt to <recipient> ok quit start start ehlo ok ehlo ehlo mail from <sender> ok mail mail

Example SMTP-Server Server Process SMTPServer tcpip.listen(smtpport); WHILE true DO tcpip.accept(); FORK smtpserverprotocol:init(); WHILE smtpserverprotocol:running DO answer = smtpprotocol:generateanswer(); tcpip.send(answer); cmd = tcpip.read(); smtpserverprotocol:handlecommand(cmd); IF smtpserverprotocol:mailavailable() THEN mail = smtpserverprotocol:getmail(); emailqueue.sendmail (mail) FI OD; KROF OD ProcessEnd RPC

Sequential Parts No communication statements Internal computations of components (processes) State of the sequential part is local local state variables specified as (atomic) operations by E-Theories including pointer structures refined into C0 (sequential) programs thereby simplifying reasoning about communication free computations Examples in the SMTP-Server parsing SMTP commands incl. e-mail addresses handling of incoming (from TCP/IP) commands

Communication RPC calls to other components send wait scheme (in general) local proofs use assumptions about the environment Examples initializing the communication (with TCP/IP) requests/answers (from/to TCP/IP) delivering mails to queue (sendmail )

Complete Components Sequential flow of control But: mixture of sequential computations and communication statements Specification in TLA actions for communications E-Theory transitions for sequential parts

Example SMTP-Server Server Process SMTPServer tcpip.listen(smtpport); WHILE true DO tcpip.accept(); FORK smtpserverprotocol:init(); WHILE smtpserverprotocol:running DO answer = smtpprotocol:generateanswer(); tcpip.send(answer); cmd = tcpip.read(); smtpserverprotocol:handlecommand(cmd); IF smtpserverprotocol:mailavailable() THEN mail = smtpserverprotocol:getmail(); emailbag.send(mail) FI OD; KROF OD ProcessEnd

Formalization in VSE TLA Temporal Logic φ: always φ ; φ eventually φ Systems specified by actions (state transitions) primed and unprimed variables interface to E-Theory refinements by certain actions structured into components in VSE modeling the (sequential) flow of control special form of program counters

Formalization in VSE ADT/E-Theory refinement Specification of sequential computations by a combination of Abstract Data Types and Dynamic Logic (DL) [α]φ: If α terminates φ holds afterwards. hαiφ: α terminates with φ. Refinements lead to proof obligations in DL Common subset First Order Logic correctness proofs for sequential programs

SMTP Server ETheory ETheory smtpserver USING ThSmtpServer DATA stage, stage0: tstage = idle; sender, sender0: taddress = addressinvalid; PREDICATES handlecommand: stage, sender, recipients, body, answer, IN chars.list PROCEDURES PROCEDURE handlecommand PARAMS stage;sender;recipients;body; cmdline: IN chars.list BODY handlecommand0(parse(cmdline)) PROCEDUREEND AXIOMS stage = start -> <handlecommand0(cmdehlo(host))> stage = ehlo AND answer = ok; stage = ehlo -> <handlecommand0(cmdmail(r))> stage = mail AND sender = r AND answer = ok;... ETHEORYEND

Processes in TLA Abstract program counter Initialize program counter (in general for families) pc = here; α TLA actions for each kind of program counter Example:

Processes in TLA (Another Example) RPC call Send call to server Get result

Call to Sequential Procedures in TLA E-Theory operations as specified in DL are exported as first order predicates. with additional places for the primed variables (results) example: handling of commands where f p is the predicate belonging to p:f and s are the state variables of the E-Theory p.

Properties of SMTP Server and Client The SMTP Client only sends mails it has received via getmail: If the SMTP Server receives a mail via SMTP it will eventually forward this mail:

Conclusion The example SMTP exhibits the need for structured formal system model on different levels of abstraction integration of different deductive approaches grounded in the system model. The SMTP case study is based on verification techniques developed in Verisoft and VSE: C0 verification (including pointer verification) verification of concurrent programs