Fuzz Testing the Compiled Code in R Packages

被引:0
|
作者
Kolla, Akhila Chowdary [1 ]
Groce, Alex [1 ]
Hocking, Toby Dylan [1 ]
机构
[1] No Arizona Univ, Flagstaff, AZ 86011 USA
关键词
fuzzing; R language; C plus plus libraries; automated test generation; statistical software; memory errors;
D O I
10.1109/ISSRE52982.2021.00040
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
R packages written in the widely used Rcpp framework are typically tested using expected input/output pairs that are manually coded by package developers. These manually written tests are validated under various CRAN checks, using both static and dynamic analysis. Such manually written tests allow for subtle bugs, since they do not anticipate all possible inputs and miss important code paths. Fuzzers pass random, unexpected, potentially invalid inputs to a function, in order to identify bugs missed by manually written tests. This paper presents RcppDeepState, an R package that uses the DeepState framework to provide automatic fuzzing and symbolic execution for R packages written using the Rcpp framework. Using RcppDeepState, a package developer can systematically fuzz test their Rcpp functions, without having to manually write any inputs nor expected outputs. Randomly generated inputs are passed to each Rcpp function, and Valgrind is used to check for various memory access violations and memory leaks. In our system, a test harness can be used to fuzz test an Rcpp function using different backend fuzzers including afl, libFuzzer, and HonggFuzz. For even more flexibility, R package developers can write their own random generation functions and assertions. We implemented random generation functions for 8 of the most common Rcpp data types, then used these functions to fuzz test 1,185 Rcpp packages. Valgrind reported issues for more than 2,000 functions (over nearly 500 packages) which were not detected using standard CRAN checks on manually specified test/example inputs. Developers confirmed for several of these issues that the problem was reproducible and represented missing or flawed code. These results suggest that RcppDeepState is useful for finding subtle flaws in Rcpp packages.
引用
收藏
页码:300 / 308
页数:9
相关论文
共 50 条
  • [21] Fuzz Testing based on Sulley Framework
    Guo, Zhong
    Li, Nan
    CURRENT TRENDS IN COMPUTER SCIENCE AND MECHANICAL AUTOMATION, VOL 1, 2017, : 181 - 187
  • [22] Bud hunting with directed fuzz testing and source code vulnerability detection with advanced graph neural networks
    Le Traon, Yves
    Xie, Tao
    SOFTWARE TESTING VERIFICATION & RELIABILITY, 2024, 34 (02):
  • [23] Fuzz Testing for Rust Library Functions
    Guo, Yongjian
    Xiao, Xi
    Lin, Yuanyi
    Li, Hao
    Wu, Xiangbo
    Zhou, Tao
    2023 IEEE 22ND INTERNATIONAL CONFERENCE ON TRUST, SECURITY AND PRIVACY IN COMPUTING AND COMMUNICATIONS, TRUSTCOM, BIGDATASE, CSE, EUC, ISCI 2023, 2024, : 990 - 997
  • [24] Fuzz Testing Based on Virtualization Technology
    Zhou, Longbin
    Li, Zhoujun
    PROCEEDINGS OF 2018 INTERNATIONAL CONFERENCE ON COMPUTING AND ARTIFICIAL INTELLIGENCE (ICCAI 2018), 2018, : 57 - 61
  • [25] A Novel Protocol Fuzz Testing Approach
    Li Haifeng
    Shuai Bo
    Wang Jian
    Tang Chaojing
    PROCEEDINGS OF THE 2015 4TH NATIONAL CONFERENCE ON ELECTRICAL, ELECTRONICS AND COMPUTER ENGINEERING ( NCEECE 2015), 2016, 47 : 1067 - 1072
  • [26] A functional shell that dynamically combines compiled code
    van Weelden, A
    Plasmeijer, R
    IMPLEMENTATION OF FUNCTIONAL LANGUAGES, 2004, 3145 : 36 - 52
  • [27] Fuzz Testing Projects in Massive Courses
    Sridhara, Sumukh
    Hou, Brian
    Lu, Jeffrey
    DeNero, John
    PROCEEDINGS OF THE THIRD (2016) ACM CONFERENCE ON LEARNING @ SCALE (L@S 2016), 2016, : 361 - 367
  • [28] CIDFuzz: Fuzz testing for continuous integration
    Zhang, Jiaming
    Cui, Zhanqi
    Chen, Xiang
    Yang, Huiwen
    Zheng, Liwei
    Liu, Jianbin
    IET SOFTWARE, 2023, 17 (03) : 301 - 315
  • [29] Fuzz Testing in Practice: Obstacles and Solutions
    Liang, Jie
    Wang, Mingzhe
    Chen, Yuanliang
    Jiang, Yu
    Zhang, Renwei
    2018 25TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2018), 2018, : 562 - 566
  • [30] Hardware trace reconstruction of runtime compiled code
    Sharma, Suchakrapani Datt
    Dagenais, Michel R.
    SOFTWARE-PRACTICE & EXPERIENCE, 2018, 48 (05): : 1042 - 1055