Axel Naumann. Outline  Static Code Analysis  Coverity  Reporting Tools, Report Quality  "Demo": Examples 2010-01-20Axel Naumann Application Area Meeting2.

Slides:



Advertisements
Similar presentations
Software Assurance Metrics and Tool Evaluation (SAMATE) Michael Kass National Institute of Standards and Technology
Advertisements

Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Guide To UNIX Using Linux Third Edition
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
Personal Software Process Overview CIS 376 Bruce R. Maxim UM-Dearborn.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
CSCI 5801: Software Engineering
Open Source: It's Already Here Dave Cross Magnum Solutions Ltd
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
Cmpe 589 Spring Software Quality Metrics Product  product attributes –Size, complexity, design features, performance, quality level Process  Used.
Open Source Software An Introduction. The Creation of Software l As you know, programmers create the software that we use l What you may not understand.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each.
University of Maryland Bug Driven Bug Finding Chadd Williams.
Development Strategies for Web Applications Jonathan Babbage National Superconducting Cyclotron Laboratory.
Project Tracking. Questions... Why should we track a project that is underway? What aspects of a project need tracking?
Natalia Yastrebova What is Coverity? Each developer should answer to some very simple, yet difficult to answer questions: How do I find new.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
M1G Introduction to Database Development 6. Building Applications.
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Software Project Documentation. Types of Project Documents  Project Charter  Requirements  Mockups and Prototypes  Test Cases  Architecture / Design.
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
Use of Coverity & Valgrind in Geant4 Gabriele Cosmo.
Security - Why Bother? Your projects in this class are not likely to be used for some critical infrastructure or real-world sensitive data. Why should.
Linux Essentials Chapter 2: Investigating Linux’s Principles and Philosophy.
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Static Analysis James Walden Northern Kentucky University.
Chapter 7 Pointers: Java does not have pointers. Used for dynamic memory allocation.
The HTTP is a standard that all Web browsers and Web servers must speak in order for the Web portion of the Internet to work.
Storing and Retrieving Data
Highly Scalable Distributed Dataflow Analysis Joseph L. Greathouse Advanced Computer Architecture Laboratory University of Michigan Chelsea LeBlancTodd.
WHAT IS SERVER SIDE SCRIPTING? Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the.
Debugging 1/6/2016. Debugging 1/6/2016 Debugging  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a program.
Software Quality Assurance SOFTWARE DEFECT. Defect Repair Defect Repair is a process of repairing the defective part or replacing it, as needed. For example,
Sampling Dynamic Dataflow Analyses Joseph L. Greathouse Advanced Computer Architecture Laboratory University of Michigan University of British Columbia.
By Douglas Copas and Mark Perry.  Currently available small business based commercial inventory management systems are either prohibitively expensive.
Announcements You will receive your scores back for Assignment 2 this week. You will have an opportunity to correct your code and resubmit it for partial.
Aaron Corso COSC Spring What is LAMP?  A ‘solution stack’, or package of an OS and software consisting of:  Linux  Apache  MySQL  PHP.
CGS 3066: Web Programming and Design Spring 2016 Introduction to Server-Side Programming.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
CS 5150 Software Engineering Lecture 21 Reliability 2.
Pyragen A PYTHON WRAPPER GENERATOR TO APPLICATION CORE LIBRARIES Fernando PEREIRA, Christian THEIS - HSE/RP EDMS tech note:
Analyzing Open Source Code February, 2009 David Maxwell Open Source Strategist For Southern California Linux Expo.
Code improvement: Coverity static analysis Valgrind dynamic analysis GABRIELE COSMO CERN, EP/SFT.
CGS 3066: Web Programming and Design Spring 2017
Content Coverity Static Analysis Use cases of Coverity Examples
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Protecting Memory What is there to protect in memory?
YAHMD - Yet Another Heap Memory Debugger
Types for Programs and Proofs
Protecting Memory What is there to protect in memory?
Introduction and Principles
Verification and Validation
Secure Software Development: Theory and Practice
Issue Tracking Systems
Call to Fix QuickBooks Error C=343
Database Driven Websites
High Coverage Detection of Input-Related Security Faults
Module 1 Introduction to PHP 11/30/2018 CS346 PHP.
Introduction to Static Analyzer
IntroductionToPHP Static vs. Dynamic websites
An Introduction to JavaScript
Web Application Development Using PHP
Presentation transcript:

Axel Naumann

Outline  Static Code Analysis  Coverity  Reporting Tools, Report Quality  "Demo": Examples Axel Naumann Application Area Meeting2

Axel Naumann Application Area Meeting3

Relevance  US Dept Homeland Security contract for 150 Open Source tools  Consequence: 6000 bugs fixed "security hole in X Windows that allows any user with a login to gain root privileges" CNET: "Key bugs in core Linux code squashed" Samba: "errors found by Scan can save the reputation of a project" Axel Naumann Application Area Meeting4

Static Code Analysis  Only looking at sources  Code does not run  "Replacement" for compiler  Reflects theoretically possible code path Axel Naumann Application Area Meeting5 if (a) delete p;... if (x) p->call();

Static vs Dynamic Analysis  Dynamic closer to reality: all actual code paths  Static more thorough: all possible code paths  Major issues with static analysis: false positives ("noise") cannot distinguish relevant from hypothetical complex, time consuming analysis Axel Naumann Application Area Meeting6

The Company Behind the Tool Axel Naumann Application Area Meeting7

Coverity: Open Source Scans  Famous for their annual open source reports with static checker Prevent, e.g. Linux, FreeBSD, NetBSD Apache, Samba, Squid, Postfix MySQL, PostgreSQL Perl, Python, PHP, gcc OpenSSH, libjpeg, libtiff, pcre Firefox, Thunderbird Axel Naumann Application Area Meeting8

Coverity: Commercial Clients  >900 customers  ARM, Philips, RIM, Samsung, UBS, Symbian, Palm, RSA, Yahoo, McAfee  Used to large (i.e. huge) software bases, n*10M LOC  Used to funny build systems Axel Naumann Application Area Meeting9

Coverity as Company  Founded 2002  About 150 employees  Headquarters in San Francisco  European sales office (UK)  Engineers currently based in US Axel Naumann Application Area Meeting10

First Contact  I want code quality for ROOT, CERN  They want increased visibility in Europe "Free check for you, press release for us"  Need more than Coverity's free open source support Responsiveness Customization "We want it, too": cernvm, ALICE, CMS,… Axel Naumann Application Area Meeting11

Offer Waiting for written offer from Coverity; agreement:  Update code and re-run checker on their servers "for life", for free  Training: one engineer for one week upload code configure build run checker Axel Naumann Application Area Meeting12

Visualization and Tracking Of Reports Axel Naumann Application Area Meeting13

Reporting Tools  Web interface  Code hierarchy products ("ROOT") components ("Math", "CINT") files, functions, individual  Evolution over time  Used to assign, mark, comment defects  Customizable DB queries  Graphs Axel Naumann Application Area Meeting14

Annotated Source  Reports embedded in actual source so you see what’s wrong (see demo)  Identifiers linked, to jump into call etc  enormous amount of data: each defect has its own source "view" Axel Naumann Application Area Meeting15

Triage  Flag defects as pending / false / intentional / bug  Determine action fix / resolved / ignore  Assess severity  Assign to owner Axel Naumann Application Area Meeting16

Report Quality  Thousands of reports for ROOT's 2MLOC  Of the handled defects, 35 times more true than false reports  Reason e.g.: scanner looks for context  Watch out: defects are painful! Axel Naumann Application Area Meeting17 case kFunc: func(); // intentional fallthrough case kWhatever:...

Checkers  Checker analyze code for defect type uninitialized variables use after delete unused code array bounds stack size …  Documentation with each checker Axel Naumann Application Area Meeting18

Checkers' Reach  C / C++ checkers bad free, infinite loop, return local, pass by value, missing break…  Security overflows (string, int), unchecked user input, time of check vs. time of use…  Concurrency atomicity, lock, sleep,… Axel Naumann Application Area Meeting19

Examples  Historical Samba reports  Examples from ROOT Axel Naumann Application Area Meeting20