FROM SAFETY TO SECURITY SOFTWARE ASSESSMENTS AND GUARANTEES FLORENT KIRCHNER (LIST)



Similar documents
LEVERAGING DEDUCTIVE VERIFICATION IN INDUSTRIAL CONTEXTS

Applications of formal verification for secure Cloud environments at CEA LIST

Static Program Transformations for Efficient Software Model Checking

Certification of a Scade 6 compiler

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation

Introduction of ISO/DIS (ISO 26262) Parts of ISO ASIL Levels Part 6 : Product Development Software Level

The Road from Software Testing to Theorem Proving

Rigorous Software Engineering Hoare Logic and Design by Contracts

Why Do Software Assurance Tools Have Problems Finding Bugs Like Heartbleed?

Specification and Analysis of Contracts Lecture 1 Introduction

Towards practical reactive security audit using extended static checkers 1

Automated Theorem Proving - summary of lecture 1

Abstract Interpretation-based Static Analysis Tools:

Formal Verification and Linear-time Model Checking

Rigorous Software Development CSCI-GA

Zabin Visram Room CS115 CS126 Searching. Binary Search

CS Standards Crosswalk: CSTA K-12 Computer Science Standards and Oracle Java Programming (2014)

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

Industrial case study: Zero defect secure software for the National Security Agency

Combining Static Analysis and Test Generation for C Program Debugging

The Course.

R214 SPECIFIC REQUIREMENTS: INFORMATION TECHNOLOGY TESTING LABORATORY ACCREDITATION PROGRAM

How To Develop A Static Analysis System For Large Programs

Algorithmic Software Verification

The Model Checker SPIN

Formal Verification of Software

CS Master Level Courses and Areas COURSE DESCRIPTIONS. CSCI 521 Real-Time Systems. CSCI 522 High Performance Computing

Advances in Programming Languages

Software Engineering using Formal Methods

Parameters for Efficient Software Certification

How Safe does my Code Need to be? Shawn A. Prestridge, Senior Field Applications Engineer

Oracle Solaris Studio Code Analyzer

Software Engineering Reference Framework

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

Safety Verification of the Small Aircraft Transportation System Concept of Operations

Effective Software Verification for Medical Devices

Runtime Verification - Monitor-oriented Programming - Monitor-based Runtime Reflection

Rigorous Methods for Software Engineering (F21RS1) High Integrity Software Development

Lecture Notes on Linear Search

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland

Software security assessment based on static analysis

Big Data, Physics, and the Industrial Internet! How Modeling & Analytics are Making the World Work Better."

Chair of Software Engineering. Software Verification. Assertion Inference. Carlo A. Furia

i. Node Y Represented by a block or part. SysML::Block,

Fundamentals of Software Engineering

SAFECode Security Development Lifecycle (SDL)

Certification Authorities Software Team (CAST) Position Paper CAST-13

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

Frequently Asked Questions

Standard for Software Component Testing

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

Software Verification and Authentication in a Gaming Device

MEng, BSc Applied Computer Science

Introducing Formal Methods. Software Engineering and Formal Methods

Embedded/Real-Time Software Development with PathMATE and IBM Rational Systems Developer

Minimizing code defects to improve software quality and lower development costs.

IKOS: A Framework for Static Analysis based on Abstract Interpretation (Tool Paper)

Testing LTL Formula Translation into Büchi Automata

Introduction to Static Analysis for Assurance

Model Checking: An Introduction

Modernized and Maintainable Code. Frank Weil, Ph.D. UniqueSoft, LLC

Testing static analyzers with randomly generated programs

CS510 Software Engineering

Software testing. Objectives

Towards a Framework for Generating Tests to Satisfy Complex Code Coverage in Java Pathfinder

Computer Programming I

Analysis of Binary Search algorithm and Selection Sort algorithm

How To Write A Program Verification And Programming Book

Automated Program Behavior Analysis

F-22 Raptor. Agenda. 1. Motivation

Anwendung von Polyspace im Software Entwicklungsprozess nach IEC München, , Dr.-Ing. Jörg Barrho

What is a life cycle model?

FUZZY CLUSTERING ANALYSIS OF DATA MINING: APPLICATION TO AN ACCIDENT MINING SYSTEM

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

DEPLOYMENT ARCHITECTURE FOR JAVA ENVIRONMENTS

MANAGING THE CONFIGURATION OF INFORMATION SYSTEMS WITH A FOCUS ON SECURITY

Best Practices for Verification, Validation, and Test in Model- Based Design

DO-178B compliance: turn an overhead expense into a competitive advantage

How To Improve Software Quality

On Demand Loading of Code in MMUless Embedded System

Reaping the benefits of Reusable Software Components

Comprehensive Static Analysis Using Polyspace Products. A Solution to Today s Embedded Software Verification Challenges WHITE PAPER

INF5140: Specification and Verification of Parallel Systems

A framework for creating custom rules for static analysis tools

Machineontwerp volgens IEC 62061

Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers

MEng, BSc Computer Science with Artificial Intelligence

WORKFLOW ENGINE FOR CLOUDS

Software Testing. Quality & Testing. Software Testing

Datavetenskapligt Program (kandidat) Computer Science Programme (master)

Transcription:

FROM SAFETY TO SECURITY SOFTWARE ASSESSMENTS AND GUARANTEES FLORENT KIRCHNER (LIST)

M loc 12 ONBOARD SOFTWARE SIZE 10 Volt (2011) F-35 (2012) 8 6 787 (2010) F-35 (2010) 4 2 F-22 (2005) 0

WHY DO WE TRUST (OUR) SOFTWARE?

DO-178C FOR AEROSPACE SAFETY

EN 50128 FOR RAIL SAFETY

IEC 60880 FOR NUCLEAR INSTALLATIONS

IEC 62304 FOR MEDICAL EQUIPMENT

ISO 26262 FOR ROAD VEHICLES

WHY DO WE TRUST (OUR) SOFTWARE?

Component 1 Component 2 Component 3 Component 4 Component 5 Component 6 Component 7 Event

CHALLENGE LARGE-SCALE SOFTWARE TRUST

APPROACHES TO SOFTWARE RELIABILITY

?

Software is quite unlike other human artifacts roads, power lines, jet engines even microcontrollers and circuit boards Follows a clean set of rules in a defined environment 0101 XOR 0011 0110

INTERMISSION PEG SOLITAIRE PAGE 18

Empty slot Occupied slot Aim Reach the following final state. Initial state One move

TRY AND PLAY There are many possible pegs and moves to consider It is hard to get a global vision for how to get to a given final state

3-WORD VOCABULARY WORD 1: REMOVE A LINE Empty 1 slot Master peg 2 3 One can jump directly from 1 to 4 4 The three pegs are gone

3-WORD VOCABULARY WORDS 2 AND 3

BACK TO A SIMPLE PUZZLE This formalism has resulted in a more manageable problem, and guided us toward the solution. Semantics The three words Algorithm The sequence of words used to solve the puzzle

A GENERIC FORMALISM USED TO SOLVE ANY PUZZLE

A FORMALISM FOR SOFTWARE VALIDATION Specifies logical behaviors int max (int x, int y) { } return (x > y)? x : y; Mathematical universe /*@ ensures \result >= x && \result >= y; ensures \result == x \result == y; */ Computational universe Frame the computational universe using logics Modifies transistor states on micro-chips during execution

A FORMALISM FOR SOFTWARE VALIDATION Specifies logical behaviors Mathematical universe prop_surete = IMPLIQUE(ouvert, not(en_route)); en_route = if (ouvert or abandon) then false else if demarrage then true else (false -> pre(en_route)); Computational universe Frame the computational universe using logics Models transistor states on micro-chips during execution

FORMAL SPECIFICATION... Properties are formalized using unequivocal specifications \forall a, i ; \valid(a+(0..n-1)) ==> 0 <= i < N ==> a[i] <= C Software systems are treated as sets of rules Transforming the system state Satisfying certain properties AND PROOFS Formal methods are used to prove that some software properties hold or to provide insight on why other properties do not.

TOOLS FOR HIGH CONFIDENCE SOFTWARE & SYSTEMS

! % Conflict during interval [B,T] conflict_2d?(s,v) : bool = EXISTS (t: Lookahead): sqv(s+t*v) < sq(d) % 2-D Conflict Detection (cd2d) cd2d?(s,v) : bool = horizontal_los?(s+b*v) OR omega_vv(s)(v) < 0 % THEOREM: cd2d is correct and complete cd2d : THEOREM conflict_2d?(s,v) IFF cd2d?(s,v) FORMAL METHODS MODELS

! /*@ requires -1000 <= x <= 1000; ensures \result >= 0; */ int abs(int x) { int r; if (x >= 0) r = x; else r = - x; return r; } int abs(int x) { int r; if (x >= 0) r = x; else r = - x; return r; }

Component 1 Component 2 Component 3 Component 4 Component 5 Component 6 Component 7 Event DEFENSE IN DEPTH SECURITY

A SOURCE CODE ANALYSIS PLATFORM Formal mathematical specification language with ACSL Software computations in ANSI / ISO C 99 Modular verifiers following varied approaches

FRAMA-C AN EXTENSIBLE PLATFORM Frama-C Kernel Frama-C Plug-In Frama-C Plug-In Frama-C Plug-In External Tool

FRAMA-C CORE COMPONENTS Frama-C Kernel Impact & Slicing Plug-In Value Plug-In Abstract Interpretation

ANALYZING INTRINSIC FAULTS SCADASYSTEMS Can we guarantee the absence of defaults in large system-level code? Pinpoint all runtime errors and help investigate their cause > 100+ kloc > C source code > Highest certification requirements Structural properties on memory separation and cyclic behaviors. > 80% code coverage > 200 alarms Using collaborative, automated analyses. Justification and certification to IEC60880 Class 1

2552 #ifndef OPENSSL_NO_HEARTBEATS 2553 int 2554 tls1_process_heartbeat(ssl *s) 2555 { 2556 unsigned char *p = &s->s3->rrec.data[0], *pl; [ ] 2561 /* Read type and payload length first */ 2562 hbtype = *p++; 2563 n2s(p, payload); 2564 pl = p; [ ] 2571 if (hbtype == TLS1_HB_REQUEST) 2572 { [ ] 2583 /* Enter response type, length and copy payload */ 2584 *bp++ = TLS1_HB_RESPONSE; 2585 s2n(payload, bp); 2586 memcpy(bp, pl, payload); 2587 bp += payload; 2588 /* Random padding */ 2589 RAND_pseudo_bytes(bp, padding); 2590 2591 r = ssl3_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 3 + payload + padding); 2592 2593 if (r >= 0 && s->msg_callback) 2594 s->msg_callback(1, s->version, TLS1_RT_HEARTBEAT,

DETECTING SECURITY FLAWS COTS LIBRARY How do we reach the sophisticated last vulnerabilities in core IT components? Detect all occurrences of a given category of vulnerabilities. Using automated code analyses Handling general-purpose code constructs Working with ANSSI, ETSI, and NIST on cybersecurity Fixed a condition where QLZ_MEMORY_SAFE could fail detecting corrupted data. Thanks to Pascal Cuoq and Kerstin Hartig who used Frama- C's value analysis!

FRAMA-C CORE COMPONENTS Frama-C Kernel WP Plug-In Deductive Verification Coq, Alt-Ergo Why

DEDUCTIVE VERIFICATION AVIONICS How do we prove that embedded software properties are satisfied? Automate unit proofs on critical code Using C code and ACSL stubs A380, A350 & A400M programs Qualification and certification to DO178B/C level A SAFETY Code Analysis : 1 : while (x>=1000) { 2 : x= x-a; 3 : } 4 : P1 : init(x) P2 : (1000 x) (P1 P3) P3 : P2[x+a] P4 : (x<1000) (P1 P3) Research of pre-conditions for infinite loops (Threat example) x 1000 a < 0 3 1 2 4

SECURITY POLICY VALIDATION CLOUD COMPUTING Can we instantiate and verify security-policies on a custom execution platform? App One App Two Formal interactive verification of the page allocation algorithm H Y P E R V I S O R Software property specifications for confidentiality Derived from system-level specifications 0101001 1011001 0101100 0110111 0101011 1001001 1001010 1000011 0110110

ALGORITHMIC CONFORMANCE PROOF ATC?

FRAMA-C CORE COMPONENTS Frama-C Kernel Path-Crawler Plug-In Structural exploration

/* Binary search of a given element in a given ordered array returning 1 if the element is present and 0 if not. In this example, the array dimension is fixed. The example is interesting because of - the loop with a varaible number of iterations - the precondition that the input array is ordered and - an example of an oracle which is a more inefficient implementation of the same algorithm. */int Bsearch( int A[10], int elem){ int low, high, mid, found ; low = 0 ; high = 9 ; found = 0 ; while( ( high > low ) ) /* line 18 */ { mid = (low + high) / 2 ; if( elem == A[mid] ) /* line 21 */ found = 1; if( elem > A[mid] ) /* line 23 */ low = mid + 1 ; else high = mid - 1; } mid = (low + high) / 2 ; if( ( found!= 1) && ( elem == A[mid]) ) /* line 30 */ found = 1; return found ;} All-Paths Exploration

FRAMA-C CORE COMPONENTS Frama-C Kernel Frama-C Open Source Distribution Path-Crawler Plug-In Impact & Slicing Plug-In Value Plug-In WP Plug-In Aoraï Plug-In Coq, Alt-Ergo Why

LINEAR TEMPORAL LOGICS Can we specify timing constraints on sequential behaviors? Function call automatas including counters and guarded parameters Frama-C/Aoraï translate states and transitions to code-level annotations Use in conjunction with Frama- C/WP or Frama-C/Value to perform ACSL-level verification /*@ requires aorai_state_s_0 == 1 aorai_state_s_1 == 1...; requires aorai_state_s_0 == 1 = has_possible_transition_s0;... ensures aorai_state_s_2 == 1 aorai_state_s_3 == 1...; ensures \old(aorai_state_s_0 == aorai_state_s_2 == 1...;... ensures aorai_state_s_2 == 1 == program_state_when_in_s_2;... */

RUNTIME MONITORING AND VERIFICATION Is it possible to toughen runtime checks in dynamic and compositional systems? int div (int x, int y) { // make sure y!= 0; return x / y; } Automate monitor generation from formal specifications Benefit from static analyses to infer specifications and minimize overhead Use in conjunction with hardware enablers int div (int x, int y) { if (y==0) e_acsl_fail(); return x / y; }

HYBRID ANALYSES Can we to refine static analysis results using dynamic techniques? False alarms are raised statically, but never occur dynamically Use automated test case generation techniques to reach alarm points Simplify program exploration by factoring out non-relevant constructs

GAMIFYING CYBERSECURITY Is it possible to make CWE verification more cost-effective? Leverage crowd-sourcing and gaming communities Create easy questions on anonymized software items. Merge partial results into a global rigorous verification Check viability on large, opensource codebases

MORE ON FRAMA- C.COM

Binary CEA LIST VERIFICATION TOOLS APRON Executable ASTRÉE/THÉSÉE Models Source Code COMPCERT

WHAT WE DO LIST Research and technology: software safety & security tools For intrinsically secure, high-confidence software and systems Contributing to normative and defacto standards Supporting component certification and tool deployment

Software Security Laboratory Software & Systems Engineering Department CEA LIST Florent Kirchner florent.kirchner@cea.fr This document is the property of CEA. It can not be copied or disseminated without its authorization.