文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > ABSTRACT EXE Automatically Generating Inputs of Death
侵权投诉

ABSTRACT EXE Automatically Generating Inputs of Death

This paper presents EXE, an effective bug-finding tool that automatically generates inputs that crash real code. Instead of running code on manually or randomly constructed input, EXE runs it on symbolic input initially allowed to be “anything.” As check

EXE:AutomaticallyGeneratingInputsofDeath

CristianCadar,VijayGanesh,PeterM.Pawlowski,DavidL.Dill,DawsonR.Engler

ComputerSystemsLaboratory

StanfordUniversityStanford,CA94305,U.S.A

{cristic,vganesh,piotrek,dill,engler}@cs.stanford.eduABSTRACT

ThispaperpresentsEXE,ane ectivebug- ndingtoolthatautomaticallygeneratesinputsthatcrashrealcode.Insteadofrunningcodeonmanuallyorrandomlyconstructedinput,EXErunsitonsymbolicinputinitiallyallowedtobe“any-thing.”Ascheckedcoderuns,EXEtrackstheconstraintsoneachsymbolic(i.e.,input-derived)memorylocation.Ifastatementusesasymbolicvalue,EXEdoesnotrunit,butinsteadaddsitasaninput-constraint;allotherstatementsrunasusual.Ifcodeconditionallychecksasymbolicex-pression,EXEforksexecution,constrainingtheexpressiontobetrueonthetruebranchandfalseontheother.Be-causeEXEreasonsaboutallpossiblevaluesonapath,ithasmuchmorepowerthanatraditionalruntimetool:(1)itcanforceexecutiondownanyfeasibleprogrampathand(2)atdangerousoperations(e.g.,apointerdereference),itdetectsifthecurrentpathconstraintsallowanyvaluethatcausesabug.Whenapathterminatesorhitsabug,EXEautomaticallygeneratesatestcasebysolvingthecurrentpathconstraintsto ndconcretevaluesusingitsownco-designedconstraintsolver,STP.BecauseEXE’sconstraintshavenoapproximations,feedingthisconcreteinputtoanuninstrumentedversionofthecheckedcodewillcauseittofollowthesamepathandhitthesamebug(assumingdeter-ministiccode).

EXEworkswellonrealcode, ndingbugsalongwithinputsthattriggerthemin:theBSDandLinuxpacket lterimplementations,theudhcpdDHCPserver,thepcreregularexpressionlibrary,andthreeLinux lesystems.

CategoriesandSubjectDescriptors

D.2.5[SoftwareEngineering]:TestingandDebugging—Testingtools,Symbolicexecution

GeneralTerms

Reliability,Languages

Keywords

Bug nding,testcasegeneration,constraintsolving,sym-bolicexecution,dynamicanalysis,attackgeneration.

Permissiontomakedigitalorhardcopiesofallorpartofthisworkforpersonalorclassroomuseisgrantedwithoutfeeprovidedthatcopiesarenotmadeordistributedforpro torcommercialadvantageandthatcopiesbearthisnoticeandthefullcitationonthe rstpage.Tocopyotherwise,torepublish,topostonserversortoredistributetolists,requirespriorspeci cpermissionand/orafee.

CCS’06,October30–November3,2006,Alexandria,Virginia,USA.Copyright2006ACM1-59593-518-5/06/0010...$5.00.

1.INTRODUCTION

Attacker-exposedcodeisoftenatangledmessofdeeply-nestedconditionals,labyrinthinecallchains,hugeamountsofcode,andfrequent,abusiveuseofcastingandpointeroperations.Forsafety,thiscodemustexhaustivelyvetin-putreceiveddirectlyfrompotentialattackers(suchassys-temcallparameters,networkpackets,evendatafromUSBsticks).However,attemptingtoguardagainstallpossibleattacksaddssigni cantcodecomplexityandrequiresaware-nessofsubtleissuessuchasarithmeticandbu erover owconditions,whichthehistoricalrecordunequivocallyshowsprogrammersreasonaboutpoorly.

Currently,programmerscheckforsucherrorsusingacom-binationofcodereview,manualandrandomtesting,dy-namictools,andstaticanalysis.Whilehelpful,thesetech-niqueshavesigni cantweaknesses.Thecodefeaturesde-scribedabovemakemanualinspectionevenmorechalleng-ingthanusual.Thenumberofpossibilitiesmakesman-ualtestingfarfromexhaustive,andevenlesssowhencom-poundedbyprogrammer’slimitedabilitytoreasonaboutallthesepossibilities.Whilerandom“fuzz”testing[35]often ndsinterestingcornercaseerrors,evenasingleequalityconditionalcanderailit:satisfyinga32-bitequalityinabranchconditionrequirescorrectlyguessingonevalueoutoffourbillionpossibilities.Correctlygettingasequenceofsuchconditionsishopeless.Dynamictoolsrequiretestcasestodrivethem,andthushavethesamecoverageproblemsasbothrandomandmanualtesting.Finally,whilestaticanalysisbene tsfromfullpathcoverage,thefactthatitinspectsratherthanexecutescodemeansthatitreasonspoorlyaboutbugsthatdependonaccuratevalueinforma-tion(theexactvalueofanindexorsizeofanobject),point-ers,andheaplayout,amongmanyothers.

ThispaperdescribesEXE(“EXecutiongeneratedExe-cutions”),anunusualbute ectivebug- ndingtoolbuilttodeeplycheckrealcode.ThemaininsightbehindEXEisthatcodecanautomaticallygenerateitsown(potentiallyhighlycomplex)testcases.Insteadofrunningcodeonmanuallyorrandomlyconstructedinput,EXErunsitonsymbolicin-putthatisinitiallyallowedtobe“anything.”Ascheckedcoderuns,ifittriestooperateonsymbolic(i.e.,input-derived)expressions,EXEreplacestheoperationwithitscorrespondinginput-constraint;itrunsallotheroperationsasusual.Whencodeconditionallychecksasymbolicex-pression,EXEforksexecution,constrainingtheexpressiontobetrueonthetruebranchandfalseontheother.Whenapathterminatesorhitsabug,EXEautomaticallygeneratesatestcasethatwillrunthispathbysolvingthepath’scon-

第1页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email