20
1 Caolán McNamara Coverity, Crash Testing, Fuzzing The Numbers Caolán McNamara, Red Hat 2016-09-09

Coverity, Crash Testing, Fuzzing The Numbers · 2017. 8. 24. · 3 Caolán McNamara Process integration Run about twice a week Those are the nums of slots coverity makes available

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • 1 Caolán McNamara

    Coverity, Crash Testing,Fuzzing

    The NumbersCaolán McNamara,Red Hat2016-09-09

  • 2 Caolán McNamara

    ● Coverity Status● Crash Testing Status● Fuzzing Status

  • 3 Caolán McNamara

    Process integration

    ● Run about twice a week● Those are the nums of slots coverity makes available to

    a project of this size● Typically back to back

    ● One to collect warnings● One after warnings fixed

    ● Results now mailed to the list● Takes about 4-6 hours to build● Takes about 12+ hours to analyze server-side

  • 4 Caolán McNamara

    Defect Density 2015

    2014 density at conference time was 0.08

  • 5 Caolán McNamara

    Defect Density 2016

  • 6 Caolán McNamara

    Defects over time

    Here, “ignored” third party module warnings are counted.

    std::runtimeexception

    coverity 8.5.0.2

    gcc 6.1

    0 LibreOffice defects

  • 7 Caolán McNamara

    What’s Changed

    ● We’ve 16,856 less lines of code apparently● Now using latest version of coverity 8.5.0.2● Works with gcc 6.1, previous release doesn’t● Has extra warnings for C++11

  • 8 Caolán McNamara

    Extra C++11 related Warnings (1/2)

    ● Wrapper Object use after free knows about std::unique_ptr

    ● std::begin/std::end support on arrays seems broken (Illegal Address computation)

    ● Confusing “Misused comma operator” report for accessing static member variables through pointer/ref to an instance

  • 9 Caolán McNamara

    Extra C++11 related Warnings (2/2)

    ● MISSING_MOVE_ASSIGNMENT● MMA is where the 0.02 comes from● Mixture of implementing move assignment, removing

    unnecessary temp objects, removing non-default methods which block the generation of the default move assignment

    ● Some new java warnings for changes in java apis from 1.6 to 1.7

    ● Resource leak on an exceptional path where stuff grew a “close” api we don’t call

  • 10

    Caolán McNamara

    Crash Testing

  • 11 Caolán McNamara

    What it does

    ● Loads a bunch of documents● 118 different columns for formats in output

    ● Includes staroffice binary formats, which are ~supported again?● See if anything crashes or triggers an assert

    ● Saves a bunch of documents● Exports to 12 different formats from all the compatible

    import formats● Export to doc, docx, odb, odg, odp, ods, odt, ppt, pptx, rtf,

    xls, xlsx

  • 12 Caolán McNamara

    Process integration

    ● Typically run once or two a week● Takes about two days to complete

    ● Approx 93,000 documents in the document horde● Up 10,000 from last year● Mostly populated from get-bugzilla-by-mimetype● + w3c svg test documents● + various interesting documents that have caused

    trouble for some app or other in the past

  • 13 Caolán McNamara

    Horde Updating

    ● Typically fairly rarely● Full update takes about 12/13 hours● Downloads are cached, so only new documents are

    updated● Bugzilla is trusted wrt the mime-type

    ● Lots of miscategorized stuff● Doesn't really matter, rtfs pretending to be docs, etc● Just made doc import filter look a little worse than it was

  • 14 Caolán McNamara

    Import Failures 2016

    Build 1 is 31 Aug 2015, final build was 1 Sep 2016

    1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 910

    50

    100

    150

    200

    250

    300

    350

    Import Crashes

    2016

    build

    failu

    res

    Missing Item ClonesTable Styles

  • 15 Caolán McNamara

    Export Failures 2016

    Build 1 is 31 Aug 2015, final build was 1 Sep 2016

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 870

    100

    200

    300

    400

    500

    600

    700

    800

    Export Failures

    2016

    build

    failu

    res

    NPAPI removal

    VCL Event Dispatch

  • 16 Caolán McNamara

    This week

    ● ~40 coverity warnings● 0 import failure● 1 export failure

  • Caolán McNamara

    Fuzzing Stuff

  • 18 Caolán McNamara

    American-fuzzy-lop integration

    ● fftester is the streamlined file format loader for format testing

    ● Cuts out some slow config-related paths● Supports afl-server mode● afl-cmin over the crashtesting horde to find best spread

    of unique inputs for given format● Then throw out the big ones

    ● Tend to get most of the good stuff early on● Then long pauses and flurries of activity

  • Caolán McNamara

    This years fuzzing Yields

    08/12/15 08/01/16 08/02/16 08/03/16 08/04/16 08/05/16 08/06/16 08/07/16 08/08/160

    5

    10

    15

    20

    25

    30

    35

    40

    date

    cras

    hes

    lwp start rtf start

  • 20 Caolán McNamara

    Thanks for your time

    Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20