Verification of the Session Management Protocol Masters Project in - - PowerPoint PPT Presentation

verification of the session management protocol
SMART_READER_LITE
LIVE PREVIEW

Verification of the Session Management Protocol Masters Project in - - PowerPoint PPT Presentation

Verification of the Session Management Protocol Masters Project in Computer Science Karl Palmskog Supervisor: Mads Dam Examiner: Johan H astad Commissioned by Yuri Ismailov at Ericsson AB 2006-11-08 Karl Palmskog Verification of the


slide-1
SLIDE 1

Verification of the Session Management Protocol

Master’s Project in Computer Science Karl Palmskog Supervisor: Mads Dam Examiner: Johan H˚ astad Commissioned by Yuri Ismailov at Ericsson AB 2006-11-08

Karl Palmskog Verification of the Session Management Protocol

slide-2
SLIDE 2

Session Layer Resurgence

Problem situation

◮ Demand for new network services ◮ Aging Internet architecture ◮ Need to handle mobility and nomadicity ◮ Lots of extensions of TCP/IP: MIP, HIP, IPSec, . . .

Proposed solution

◮ Adopt a more flexible view of the protocol stack ◮ Introduce new functionality at the session layer ◮ Use event-driven reconfiguration and state management

Karl Palmskog Verification of the Session Management Protocol

slide-3
SLIDE 3

Session Layer Resurgence

Karl Palmskog Verification of the Session Management Protocol

slide-4
SLIDE 4

Session Layer Resurgence

Session layer components

◮ Event collector/dispatcher ◮ Preferences/rules database ◮ Socket rebind extension ◮ Session API ◮ TCP state controller ◮ Session Management Protocol (SMP)

Karl Palmskog Verification of the Session Management Protocol

slide-5
SLIDE 5

Session Layer Resurgence

Session-enabled application Session-enabled application Legacy application Session Management API Session Management Protocol Event collector and dispatcher Rebind-enhanced socket API TCP state controller Preferences and rules database Transport layer protocols Network layer protocols Rebind across the stack Karl Palmskog Verification of the Session Management Protocol

slide-6
SLIDE 6

Session Layer Resurgence

Session Management Protocol

◮ Data integrity for sessions ◮ Keep track of communication state ◮ Send and and receive context updates

Background

◮ Developed as a part of an earlier master’s project ◮ Proof-of-concept implementation in the Linux kernel ◮ Vital part of the session layer

Karl Palmskog Verification of the Session Management Protocol

slide-7
SLIDE 7

Problem and aim

Problem

◮ SMP correctness is critical ◮ Data integrity must be preserved ◮ Design must be deadlock-free

Aim

  • 1. Understand SMP and describe it formally
  • 2. Specify the correctness of the protocol
  • 3. Prove that the protocol satisfies the specification

Karl Palmskog Verification of the Session Management Protocol

slide-8
SLIDE 8

Method

Model checking

◮ Provide system model M, specification Φ ◮ Check automatically whether M satisfies Φ ◮ Use abstraction to reduce state space

Choices

◮ Modelling language: Promela ◮ Specification language: Linear Temporal Logic ◮ Model checker: Spin

Karl Palmskog Verification of the Session Management Protocol

slide-9
SLIDE 9

Session Management Protocol

SMP service provisions

◮ Provide reliable data transfer between endpoints... ◮ ...despite intermittent connectivity in both space and time

SMP channels and message types

◮ Data channel

◮ data — application data ◮ checkpoint — communication state data

◮ Control channel

◮ resume — request session resumption ◮ resume ok — confirm session resumption ◮ resume denied — deny session resumption ◮ suspend — sender has suspended Karl Palmskog Verification of the Session Management Protocol

slide-10
SLIDE 10

Session Management Protocol

State machine

SENT_RESUME ACTIVE SUSPENDED READY_RESUME T3 T1 T4 T2 T19 T10 T11 T6 T5 T7 T9 T8 T12 T13 T17 T16 T18 T15 T14 T1: Network lost T2: User suspends; send suspend T3: Received resume; rebind T4: Received suspend T5: User suspends T6: Received resume T7: Network changed T8: Received resume; send resume_denied T9: User resumes T10: Sent resume_ok; rollback T11: Failed to send resume_ok T12: Sent resume T13: Failed to send resume T14: Received resume_ok T15: Received resume_denied T16: Network changed; rebind T17: Received resume; initiator T18: Received resume; not initiator T19: Network lost; change interface

Karl Palmskog Verification of the Session Management Protocol

slide-11
SLIDE 11

Results

Verification of the checkpoint mechanism

◮ Lets network endpoints agree on resumeable states ◮ Endpoints send checkpoint messages when buffers fill up ◮ Cannot create new checkpoint until other endpoint responds ◮ Specification: processes always have a common checkpoint

Design flaw

◮ A checkpoint request can be interpreted as a response ◮ Possible to get ambiguously defined states in some situations ◮ Solution: only allow one endpoint to send checkpoint requests

Karl Palmskog Verification of the Session Management Protocol

slide-12
SLIDE 12

Results

Noninitiator:2 23 Initiator:1 34 37 2!data,0,0 44 50 2!data,0,0 62 69 1!data,0,0 75 84 2!cp,2,2 87 104 1!data,0,0 107 115 2!data,0,0 122 1!cp,2,2

Karl Palmskog Verification of the Session Management Protocol

slide-13
SLIDE 13

Results

State machine correctness

◮ Safety: if a session is resumed, it is resumed properly ◮ Liveness: there are no deadlocks

State machine model

◮ Add control channels and states to checkpoint model ◮ Use Promela’s channel over channel feature for mobility ◮ Protocol changes due to changes in the checkpoint mechanism

Verification results

◮ Exhaustively verified for some parameters ◮ Many partial state-space searches

Karl Palmskog Verification of the Session Management Protocol

slide-14
SLIDE 14

Conclusions and future work

Conclusions

◮ Produced unambiguous specification of the protocol ◮ Detection and correction of a design flaw ◮ SMP reliability has increased

Future work

◮ Implement changes and test them ◮ Verify other parts of the session layer design ◮ Investigate SMP/TCP interaction

“Every protocol should be considered incorrect until the

  • pposite is proven.”

—Gerard J. Holzmann, author of Spin

Karl Palmskog Verification of the Session Management Protocol

slide-15
SLIDE 15

More information

Protocol models and thesis available at: http://www.palmskog.net/exjobb Session Layer Resurgence: Towards Mobile, Disconnection- and Delay-tolerant Communication. Accepted to the 4th European Conference on Universal Multiservice Networks (ECUMN’2007), February 2007. http://www.irit.fr/ecumn07

Karl Palmskog Verification of the Session Management Protocol