Programming Language Vulnerabilities within the ISO/IEC Standardization Community Stephen Michell International Convenor JTC 1/SC 22 WG 23 Programming.

Slides:



Advertisements
Similar presentations
Blue Pilot Consulting, Inc. 1 A new type of Working Group used for a new SC22 Working Group OWG: Vulnerability John Benito JTC 1/SC 22 WG14.
Advertisements

1 Report of Progress of ISO/IEC 24772, Programming Language Vulnerabilities, in ISO/IEC JTC 1/SC 22 John Benito, Convener Jim Moore, Secretary ISO/IEC.
1 OWG: Vulnerability ISO working group on Guidance for Avoiding Vulnerabilities through language selection and use John Benito, Convener Jim Moore, Secretary.
For C Language WG, 2006 March, Berlin 1 A New Standards Project on Avoiding Programming Language Vulnerabilities Jim Moore Liaison Representative from.
1 ISO/IEC JTC 1/SC 22/WG 23 ISO working group on Guidance for Avoiding Vulnerabilities through language selection and use John Benito, Convener Jim Moore,
Control Structures Ranga Rodrigo. Control Structures in Brief C++ or JavaEiffel if-elseif-elseif-else-end caseinspect for, while, do-whilefrom-until-loop-end.
Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
Control Structures Any mechanism that departs from straight-line execution: –Selection: if-statements –Multiway-selection: case statements –Unbounded iteration:
SIGAda2001© 2001, The MITRE Corporation. Permission is granted to reproduce without modification.James W. Moore - 1 ISO/IEC Standardization James W. Moore.
International Standards for Software & Systems Documentation Ralph E. Robinson R 2 Innovations.
Chapter 7:: Data Types Programming Language Pragmatics
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development.
ISO/IEC JTC1 SC37 Overview
QinetiQ Proprietary AN ISO standard for high integrity software.
ISO/IEC Software Testing
Examining the Code [Reading assignment: Chapter 6, pp ]
Language Evaluation Criteria
© 2007 Carnegie Mellon University Secure Coding Initiative Jason A. Rafail Monday, May 14 th, 2007.
TOSCA Technical Committee Kick-off December 12, 2011.
Halifax, 31 Oct – 3 Nov 2011ICT Accessibility For All ICT Accessibility Standardization Dr. Jim Carter, ISACC Document No: GSC16-PLEN-57r2 Source: ISACC.
SC 37 “Biometrics” and correlations with JTC1 Special Working Group on Accessibility Ing. Mario Savastano IBB (CNR) and DIEL (Federico II University of.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Design Principles and Common Security Related Programming Problems
Chapter 19: Building Systems with Assurance Dr. Wayne Summers Department of Computer Science Columbus State University
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
ISO17799 / BS ISO / BS Introduction Information security has always been a major challenge to most organizations. Computer infections.
ISO/IEC Software Testing The New International Software Testing Standard By Tafline Murnane and Stuart Reid ISO/IEC JTC1/SC7 WG26 Software Testing.
Programming Language History and Evolution
Secure Coding Rules for C++ Copyright © 2016 Curt Hill
ISO/IEC Software Testing
Software Testing.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Chapter 7: Expressions and Assignment Statements
ISO/IEC JTC 1/SC 7 Working Group 42 - Architecture Johan Bendz
Types for Programs and Proofs
Security Issues Formalization
Module 30 (Unix/Linux Security Issues II)
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Chapter 11 Object-Oriented Design
Lecture 16: Introduction to Data Types
ISO/IEC Software Testing
CS 326 Programming Languages, Concepts and Implementation
C++ and Programming Language Vulnerabilities
Chapter 7: Expressions and Assignment Statements
Secure Coding Initiative
Chapter 8: Control Structures
Secure Coding Rules for C++ Copyright © Curt Hill
Levels of Software Assurance in SPARK
Programming Language History and Evolution
Setting Actuarial Standards
Frances Cleveland Convenor WG15
Expressions and Assignment Statements
Chapter 19: Building Systems with Assurance
Ada – 1983 History’s largest design effort
Working Group November Plenary EC Closing Motion
Introduction to ISO/IEC JTC 1 SC7
Software Security Lesson Introduction
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
Coding Concepts (Basics)
Topic 3-a Calling Convention 1/10/2019.
Covering CWE with Programming Languages and Tools
Statement-Level Control Structures
Standardization Management Board Decisions How They Affect Your TAG!
ETS WG meeting 6-7 September 2006
Overview of Programming Paradigms
Expressions and Assignment Statements
Presentation transcript:

Programming Language Vulnerabilities within the ISO/IEC Standardization Community Stephen Michell International Convenor JTC 1/SC 22 WG 23 Programming Language Vulnerabilities Canadian HoD to ISO/IEC/JTC 1SC 22 Programming Language Subcommittee stephen.michell@maurya.on.ca

Meet JTC 1 ISO is the International Standards Organization IEC is the International Electrotechnical Commission Both have international treaties to develop International Standards Both work through internationally manned Technical Committees to develop standards e.g. ISO 9001 Quality IEC 61508 Safety Why? - International standards can be readily adopted by countries and put into national regulations. Work is done by consensus Wide agreement, no strong sustained opposition

ISO and IEC jointly formed the Joint Technical Committee 1(circa 1988) JTC 1 ISO and IEC jointly formed the Joint Technical Committee 1(circa 1988) Everything IT Printers, media, network protocols, databases. software engineering, big data and oh yes programming languages Has own procedures and Subcommittees to do the work

Meet Subcommittee(SC) 22 Programming languages and their environments APL COBOL Fortran Basic Mumps POSIX Pascal Ada Internationalization C Lisp Prolog Modula 2 Formal Methods C++ Vulnerabilities

Meet SC 22 (cont) Member Countries (20 P members) Austria Canada China France Denmark Germany Japan Korea Spain Switzerland USA UK and others that are not usually in plenary Also O Members Belgium New Zealand Singapore India Italy Argentina

How Standardized? National Body (NB) participation and voting Project steps New Work Item Proposal (NB approval) Working Draft (technical expert consensus) Committee Draft (national body consensus) Draft International Standard (JTC 1 vote) Standard Countries provide technical experts that do the work Documents iterate through the projects steps with international votes Last one (FDIS) -> Standard!

How Standardized? Also produce other international products Technical Corrigendum to standard Amendment to standard Technical Specification (pre-standard) Technical Report

What about innovation? Working with some of the best in the world Adding new capabilities and ideas as they mature enough to standardize Interfaces, Containers (Ada) Assertions, Ravenscar profile (Ada) Bounded Libraries(C) Concurrency features, Static Assertions (C) Parallelism (fine-grained) (Ada, C, C++, Fortran) Concepts, Lambdas (C++) Async methods (C#, C++) Interfacing to C (Fortran) OO (Fortran, COBOL)

Programming Language Vulnerabilities (WG 23) Develop a Technical Report on language independent vulnerabilities with language-dependent annexes to map each language to the common ones. Published as TR 24772:2010 Revised 2012 with annexes for C, Ada, Ruby, Python, Spark and PHP. Revising TR 24772 to add more vulnerabilities (OO, Time) and more languages (Fortran, C++) Published FDIS 17960 Code Signing for Source Code

Outreach Work with other groups ISO/IEC/JTC 1/SC 27 Security (liaison) Programming language WG’s (WG 9 Ada, WG 14 C, WG 5 Fortran, etc) IEC SC 65 for Safety (liaison being initiated)

Vulnerabilities Various groups look at programming language vulnerabilities MITRE/Homeland Security Common Vulnerabilities and Exposures (CVE) Enumerates every vulnerability instance reported by type, OS, application (thousands) Common Weakness Exposures (CWE) Groups reported vulnerabilities by type (about 900) SANS/CWE Top 10 Open Wasp Application Project OWASP Top 25

Different look at vulnerabilities Vulnerabilities (WG 23) Different look at vulnerabilities More than Security – Safety also Consider much more than attacks Programming mistakes From classic to obscure Consider real time issues Weaknesses that can be attacked Aggregated more than CWE Document about 90 vulnerabilities that match 900 CWE weaknesses Consider how vulnerabilities appear in specific programming languages Separate annex for each programming language

What WG 23 has not done Coding Standards Many levels of integrity (safety and security) will use this document Many programming domains will use documents, from general usage to real time community Concerns of each community is different and the ways that they address vulnerabilities will differ No hope that a single coding standard will meet the needs of any (let alone all) community Writing to the people that create coding standards WG 23, however, is consolidating common guidance that many will use as coding guidelines

Vulnerabilities (WG 23) Intend that document will be used to develop coding standards Provide explicit guidance to programmer to avoid vulnerability Use static analysis tools Adopt specific coding conventions Always check for error return Recommend to language designers on steps to eliminate vulnerability from language Provide move/copy/etc operations that obey buffer size and boundaries

Vulnerabilities (WG 23) Vulnerabilities covered Type system Bit representation Floating point arithmetic Enumeration issues Numeric conversion issues String termination Issues Buffer boundary violations Unchecked array indexing Unchecked array copying Pointer type changes Pointer arithmetic Null pointer dereference

Vulnerabilities (WG 23) Vulnerabilities covered (more) Identifier name reuse Unused variable Operator precedence / order of evaluation Switch statements and static analysis Ignored status return and unhandled exceptions OO Issues (overloading, inheritance, etc) Concurrency Issues (activation, directed termination, premature termination, concurrent data access) Time Issues (time jumps, jitter, representation)

Vulnerabilities (WG 23) Application Vulnerabilities Design errors that cannot be traced to language weaknesses Adherence to least privilege (not) Loading/executing untrusted code Unrestricted file upload Resource exhaustion Cross site scripting Hard coded password Insufficiently protected credentials

Vulnerabilities (WG 23) Look at one vulnerability 6.5 Enumerator Issues [CCB] 6.5.1 Description of Vulnerability What is enumeration Issue of non-default representation, duplicate values, Issue of arrays indexed by enumerations Holes Issue of static coverage 6.5.2 References Reference CWE counterpart, MISRA C and C++ rules, CERT C guidelines, JSF AV rules, Ada Quality Style and Guide

Vulnerabilities (WG 23) 6.5.3 Mechanism of Failure Interplay between order of enumerators in list, how (and where) new members added, and changes in representation. Expressions that depend on any of these are fragile Incorrect assumptions can lead to unbounded behaviours 6.5.4 Applicable Language Characteristics Languages that permit incomplete mappings (to theoretical enumeration) Languages that provide only mapping of integer to enumerator Languages that have no enumerator capability

Vulnerabilities (WG 23) 6.5.6 Implications for Standardization 6.5.5 Avoiding Vulnerability & Mitigating Effects Use static analysis tools to detect problematic use Ensure coverage of all enumeration values Use enumeration types selected from limited set of values 6.5.6 Implications for Standardization Provide a mechanism to prevent arithmetic operations on enumeration types Provide mechanisms to enforce static matching between enumerator definitions and initialization expressions

Vulnerabilities (WG 23) Ada’s response to Enumerator Issues Complete coverage mandatory Order must be preserved, but holes in representation permitted Arrays indexed by enumeration type may have holes (implementation dependent) When “others” option used in enumeration choice, unintended consequences can occur Guidance Do not use “others” choice for case statements & aggregates Mistrust subranges as choices after enumeration values added in middle

Vulnerabilities (WG 23) C’s response on Enumerator Issues Follow guidance of main part Use enumerators starting at 0 and incrementing by 1 Avoid loops that step over enumerator with non-default representation Select from limited set of choices, and use static analysis tools

Vulnerabilities (WG 23) Python’s response on Enumerator Issues Python only has named integers and sets of strings Variable can be rebound at any time, so no consistent use as an enumerator

Vulnerabilities (WG 23) First version of TR 24772 published in 2010 No language specific annexes ready Second edition published in 2012 Language annexes for Ada, C, Python, Ruby, Spark, PHP New vulnerabilities for concurrency but no language- specific response

Vulnerabilities (WG 23) Ongoing work Separate 1 document into main part (24772-1) and language-specific parts (Ada -2, C -3, etc) Simplifies maintenance Add more language-specific annexes Fortran Java C++ COBOL Add writeups for concurrency vulnerabilities in language-specific annexes Improve a number of vulnerability writeups

Vulnerabilities (WG 23) Ongoing Work (cont) Add vulnerabilities Floating point Have one, but very general Object Orientation Examination of C++, etc, show missing areas Time Consider application-level vulnerabilities Have we addressed issues such as “heartbleed”? Think about coding standards and design standards for application- level vulnerabilities Consider creation of top-10/12 avoidance techniques

Contact Programming Languages is an exciting field, especially in a world of “too many cores”. If you are interested in programming languages or standardization in general, Your National body representative Or me, stephen.michell@maurya.on.ca