Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Fine-grained Coverage-based Fuzzing

Published: 04 June 2024 Publication History
  • Get Citation Alerts
  • Abstract

    Fuzzing is a popular software testing method that discovers bugs by massively feeding target applications with automatically generated inputs. Many state-of-the-art fuzzers use branch coverage as a feedback metric to guide the fuzzing process. The fuzzer retains inputs for further mutation only if branch coverage is increased. However, branch coverage only provides a shallow sampling of program behaviors and hence may discard interesting inputs to mutate. This work aims to take advantage of the large body of research in defining finer-grained code coverage metrics (such as control-flow, data-flow, or mutation coverage) and to evaluate how fuzzing performance is impacted when using these metrics to select interesting inputs for mutation. We propose to make branch coverage-based fuzzers support most fine-grained coverage metrics out of the box (i.e., without changing fuzzer internals). We achieve this by making the test objectives defined by these metrics (such as conditions to activate or mutants to kill) explicit as new branches in the target program. Fuzzing such a modified target is then equivalent to fuzzing the original target, but the fuzzer will also retain inputs covering the additional metric objectives for mutation. In addition, all the fuzzer mechanisms to penetrate hard-to-cover branches will help in covering the additional metric objectives. We use this approach to evaluate the impact of supporting two fine-grained coverage metrics (multiple condition coverage and weak mutation) over the performance of two state-of-the-art fuzzers (AFL++ and QSYM) with the standard LAVA-M and MAGMA benchmarks. This evaluation suggests that our mechanism for runtime fuzzer guidance, where the fuzzed code is instrumented with additional branches, is effective and could be leveraged to encode guidance from human users or static analyzers. Our results also show that the impact of fine-grained metrics over fuzzing performance is hard to predict before fuzzing and most of the time either neutral or negative. As a consequence, we do not recommend using them to guide fuzzers, except maybe in some possibly favorable circumstances yet to be investigated, like for limited parts of the code or to complement classical fuzzing campaigns.

    References

    [1]
    Barton P. Miller, Louis Fredriksen, and Bryan So. 1990. An empirical study of the reliability of UNIX utilities. Commun. ACM 33, 12 (Dec. 1990), 32–44. DOI:
    [2]
    Yuekang Li, Bihuan Chen, Mahinthan Chandramohan, Shang-Wei Lin, Yang Liu, and Alwen Tiu. 2017. Steelix: Program-state based binary fuzzing. In Joint Meeting on Foundations of Software Engineering (ESEC/FSE’17). Association for Computing Machinery.
    [3]
    Sanjay Rawat, Vivek Jain, Ashish Kumar, Lucian Cojocar, Cristiano Giuffrida, and Herbert Bos. 2017. VUzzer: Application-aware evolutionary fuzzing. In Proceedings of the Network and Distributed System Security Symposium (NDSS’17).
    [4]
    American fuzzy lop - a security-oriented fuzzer. n.d. Received December 12, 2021, from https://github.com/google/AFL.
    [5]
    Andrea Fioraldi, Dominik Maier, Heiko Eißfeldt, and Marc Heuse. 2020. AFL++: Combining incremental steps of fuzzing research. In 14th USENIX Workshop on Offensive Technologies (WOOT’20). USENIX Association.
    [6]
    Cornelius Aschermann, Sergej Schumilo, Tim Blazytko, Robert Gawlik, and Thorsten Holz. 2019. REDQUEEN: Fuzzing with input-to-state correspondence. In Proceedings of the Network and Distributed System Security Symposium (NDSS’19).
    [7]
    Cristian Cadar, Daniel Dunbar, and Dawson Engler. KLEE: Unassisted and automatic generation of high-coverage tests for complex systems programs. In USENIX Conference on Operating Systems Design and Implementation (OSDI’08).
    [8]
    Insu Yun, Sangho Lee, Meng Xu, Yeongjin Jang, and Taesoo Kim. 2018. QSYM: A practical concolic execution engine tailored for hybrid fuzzing. In Proceedings of the 27th USENIX Conference on Security Symposium (SEC’18). USENIX Association.
    [9]
    Paul Ammann and Jeff Offutt. 2008. Introduction to Software Testing (1st ed.). Cambridge University Press.
    [10]
    Rohan Padhye, Caroline Lemieux, Koushik Sen, Laurent Simon, and Hayawardh Vijayakumar. 2019. FuzzFactory: Domain-specific fuzzing with waypoints. Proc. ACM Program. Lang. 3, OOPSLA, Article 174 (Oct. 2019), 29 pages. DOI:
    [11]
    N. Coppik, O. Schwahn, and N. Suri. 2019. MemFuzz: Using memory accesses to guide fuzzing. In 2019 12th IEEE Conference on Software Testing, Validation and Verification (ICST’19). IEEE Computer Society, Los Alamitos, CA, 48–58. DOI:
    [12]
    Sebastian Österlund, Kaveh Razavi, Herbert Bos, and Cristiano Giuffrida. 2020. ParmeSan: Sanitizer-guided greybox fuzzing. In Proceedings of the 29th USENIX Conference on Security Symposium (SEC’20). USENIX Association, Article 129, 18 pages.
    [13]
    Sébastien Bardin, Nikolai Kosmatov, Michaël Marcozzi, and Mickaël Delahaye. 2021. Specify and measure, cover and reveal: A unified framework for automated test generation. Science of Computer Programming 207 ( 2021), 102641. DOI:
    [14]
    Ali Parsai and Serge Demeyer. 2020. Comparing mutation coverage against branch coverage in an industrial setting. Int. J. Softw. Tools Technol. Transf. 22, 4 (Aug. 2020), 365–388. DOI:
    [15]
    A. Jefferson Offutt and Jeffrey M. Voas. 1996. Subsumption of condition coverage techniques by mutation testing. Department of Information and Software Systems Engineering, George Mason University, Tech. Rep. ISSE-TR-96-100.
    [16]
    Glenford J. Myers, Corey Sandler, and Tom Badgett. 2011. The Art of Software Testing. John Wiley & Sons.
    [17]
    Brendan Dolan-Gavitt, Patrick Hulin, Engin Kirda, Tim Leek, Andrea Mambretti, Wil Robertson, Frederick Ulrich, and Ryan Whelan. 2016. LAVA: Large-scale automated vulnerability addition. DOI:
    [18]
    Ahmad Hazimeh, Adrian Herrera, and Mathias Payer. 2020. Magma: A ground-truth fuzzing benchmark. Proc. ACM Meas. Anal. Comput. Syst. 4, 3, Article 49 (Nov. 2020), 29 pages. DOI:
    [19]
    Ruixiang Qian, Quanjun Zhang, Chunrong Fang, and Lihua Guo. 2022. Investigating coverage guided fuzzing with mutation testing. In Proceedings of the 13th Asia-Pacific Symposium on Internetware (Internetware’22). Association for Computing Machinery, New York, NY, 272–281. DOI:
    [20]
    Alessandro Mantovani, Andrea Fioraldi, and Davide Balzarotti. 2022. Fuzzing with data dependency information. In 7th IEEE European Symposium on Security and Privacy (EuroS&P’22). IEEE
    [21]
    Adrian Herrera, Mathias Payer, and Antony L. Hosking. n.d. Registered report: DATAFLOW. In Proceedings of the 1st International Fuzzing Workshop (FUZZING’22).
    [22]
    Valentin J. M. Manès, HyungSeok Han, Choongwoo Han, Sang Kil Cha, Manuel Egele, Edward J. Schwartz, and Maverick Woo. 2021. The art, science, and engineering of fuzzing: A survey. IEEE Transactions on Software Engineering 47, 11 (2021), 2312–2331. DOI:
    [23]
    Jun Li, Bodong Zhao, and Chao Zhang. 2018. Fuzzing: A survey. Cybersecurity 1, 6 (2018). DOI:
    [24]
    Nick Stephens, John Grosen, Christopher Salls, Andrew Dutcher, Ruoyu Wang, Jacopo Corbetta, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. 2016. Driller: Augmenting fuzzing through selective symbolic execution. In Proceedings of the Network and Distributed System Security Symposium (NDSS’16).
    [25]
    P. Ammann, J. Offutt, and Hong Huang. 2003. Coverage criteria for logical expressions. In 14th International Symposium on Software Reliability Engineering, 2003 (ISSRE’03).99–107. DOI:
    [26]
    Paul Ammann and Jeff Offutt. 2016. Introduction to Software Testing. Cambridge University Press.
    [27]
    Lingming Zhang, Tao Xie, Lu Zhang, Nikolai Tillmann, Jonathan De Halleux, and Hong Mei. 2010. Test generation via dynamic symbolic execution for mutation testing. In Proceedings of the 2010 IEEE International Conference on Software Maintenance (ICSM’10). IEEE, 1–10.
    [28]
    R. A. DeMillo, R. J. Lipton, and F. G. Sayward. 1978. Hints on test data selection: Help for the practicing programmer. Computer 11, 4 (1978), 34–41. DOI:
    [29]
    A. J. Offutt and S. D. Lee. 1994. An empirical evaluation of weak mutation. IEEE Transactions on Software Engineering 20, 5 (1994), 337–344. DOI:
    [30]
    Michaël Marcozzi, Sébastien Bardin, Nikolai Kosmatov, Mike Papadakis, Virgile Prevosto, and Loïc Correnson. 2018. Time to clean your test objectives. In Proceedings of the 40th International Conference on Software Engineering (ICSE’18). Association for Computing Machinery, New York, NY, 456–467. DOI:
    [31]
    Mike Papadakis, Yue Jia, Mark Harman, and Yves Le Traon. 2015. Trivial compiler equivalence: A large scale empirical study of a simple, fast and effective equivalent mutant detection technique. In Proceedings of the 37th International Conference on Software Engineering (ICSE’15), Vol. 1. 936–946. DOI:
    [32]
    Sébastien Bardin, Omar Chebaro, Mickaël Delahaye, and Nikolai Kosmatov. 2014. An all-in-one toolkit for automated white-box testing. In Proceedings of the 8th International Conference on Tests and Proofs (TAP’14), Vol. 8570.
    [33]
    Sébastien Bardin, Nikolai Kosmatov, and François Cheynier. 2014. Efficient leveraging of symbolic execution to advanced coverage criteria. In Proceedings of the IEEE International Conference on Software Testing, Verification and Validation (ICST’14). 173–182. DOI:
    [34]
    Michaël Marcozzi, Mickaël Delahaye, Sébastien Bardin, Nikolai Kosmatov, and Virgile Prevosto. Generic and effective specification of structural test objectives. In 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST’17).
    [35]
    Chris Lattner and Vikram Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO’04).
    [36]
    Andrea Arcuri and Lionel Briand. 2011. A practical guide for using statistical tests to assess randomized algorithms in software engineering. In Proceedings of the 33rd International Conference on Software Engineering (ICSE’11). Association for Computing Machinery, New York, NY, 1–10. DOI:
    [37]
    Stefan Nagy, Anh Nguyen-Tuong, Jason D. Hiser, Jack W. Davidson, and Matthew Hicks. 2021. Breaking through binaries: Compiler-quality instrumentation for better binary-only fuzzing. In 30th USENIX Security Symposium (USENIX Security’21). USENIX Association, 1683–1700. https://www.usenix.org/conference/usenixsecurity21/presentation/nagy.
    [38]
    Cornelius Aschermann, Sergej Schumilo, Ali Abbasi, and Thorsten Holz. 2020. Ijon: Exploring deep state spaces via fuzzing. In 2020 IEEE Symposium on Security and Privacy (SP’20). 1597–1612. DOI:
    [39]
    Jinghan Wang, Yue Duan, Wei Song, Heng Yin, and Chengyu Song. Be sensitive and collaborative: Analyzing impact of coverage metrics in greybox fuzzing. In Proceedings of the 22nd International Symposium on Research in Attacks, Intrusions and Defenses (RAID’19).
    [40]
    Jinghan Wang, Chengyu Song, and Heng Yin. 2021. Reinforcement learning-based hierarchical seed scheduling for greybox fuzzing. In Proceedings of the Network and Distributed System Security Symposium (NDSS’21).
    [41]
    Valentin J. M. Manès, Soomin Kim, and Sang Kil Cha. 2020. Ankou: Guiding grey-box fuzzing towards combinatorial difference. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering (ICSE’20). ACM.
    [42]
    Andrea Fioraldi, Daniele Cono D’Elia, and Davide Balzarotti. 2021. The use of likely invariants as feedback for fuzzers. In 30th USENIX Security Symposium (USENIX Security’21).
    [43]
    laf-intel. n.d. Retrieved August 16, 2016, from https://lafintel.wordpress.com/.
    [44]
    Isabella Laybourn, Vasudev Vikram, Rafaello Sanna, Ao Li, and Rohan Padhye. 2022. Guiding Greybox Fuzzing with Mutation Testing. Program Analysis, Software Testing, and Applications Laboratory, Carnegie Mellon University, Technical Report. (2022).
    [45]
    Alex Groce, Goutamkumar Tulajappa Kalburgi, Claire Le Goues, Kush Jain, and Rahul Gopinath. n.d. Registered report: First, fuzz the mutants. In Proceedings of the 1st International Fuzzing Workshop (FUZZING’22).
    [46]
    Rahul Gopinath, Philipp Görz, and Alex Groce. 2022. Mutation Analysis: Answering the Fuzzing Challenge. arXiv preprint arXiv:2201.11303 (2022).

    Cited By

    View all
    • (2023)DiPri: Distance-Based Seed Prioritization for Greybox Fuzzing (Registered Report)Proceedings of the 2nd International Fuzzing Workshop10.1145/3605157.3605172(21-30)Online publication date: 17-Jul-2023
    • (2023)FCEVALComputers and Security10.1016/j.cose.2023.103354132:COnline publication date: 1-Sep-2023

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Software Engineering and Methodology
    ACM Transactions on Software Engineering and Methodology  Volume 33, Issue 5
    June 2024
    952 pages
    ISSN:1049-331X
    EISSN:1557-7392
    DOI:10.1145/3618079
    • Editor:
    • Mauro Pezzè
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 04 June 2024
    Online AM: 14 March 2023
    Accepted: 13 February 2023
    Revised: 23 January 2023
    Received: 16 June 2022
    Published in TOSEM Volume 33, Issue 5

    Check for updates

    Author Tags

    1. Fuzzing
    2. code coverage criteria
    3. mutation testing

    Qualifiers

    • Research-article

    Funding Sources

    • European Union Horizon 2020 research and innovation program
    • France FUI CAESAR project and from the Chateaubriand Fellowship Program of the Embassy of France in the United States

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)372
    • Downloads (Last 6 weeks)35
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)DiPri: Distance-Based Seed Prioritization for Greybox Fuzzing (Registered Report)Proceedings of the 2nd International Fuzzing Workshop10.1145/3605157.3605172(21-30)Online publication date: 17-Jul-2023
    • (2023)FCEVALComputers and Security10.1016/j.cose.2023.103354132:COnline publication date: 1-Sep-2023

    View Options

    Get Access

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Full Text

    View this article in Full Text.

    Full Text

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media