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 条
  • [1] Efficient Fuzz Testing Leveraging Input, Code, and Execution
    Havrikov, Nikolas
    PROCEEDINGS OF THE 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C 2017), 2017, : 417 - 420
  • [2] Polar: Function Code Aware Fuzz Testing of ICS Protocol
    Luo, Zhengxiong
    Zuo, Feilong
    Jiang, Yu
    Gao, Jian
    Jiao, Xun
    Sun, Jiaguang
    ACM TRANSACTIONS ON EMBEDDED COMPUTING SYSTEMS, 2019, 18 (05)
  • [3] Fuzz Testing with Dynamic Taint Analysis based Tools for Faster Code Coverage
    Paduraru, Ciprian
    Melemciuc, Marius-Constantin
    Ghimis, Bogdan
    ICSOFT: PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON SOFTWARE TECHNOLOGIES, 2019, : 82 - 93
  • [4] Evaluating Fuzz Testing
    Klees, George
    Ruef, Andrew
    Cooper, Benji
    Wei, Shiyi
    Hicks, Michael
    PROCEEDINGS OF THE 2018 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY (CCS'18), 2018, : 2123 - 2138
  • [5] Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data
    Gerber, Florian
    Mosinger, Kaspar
    Furrer, Reinhard
    COMPUTERS & GEOSCIENCES, 2017, 104 : 109 - 119
  • [6] Evaluting Unit Testing Practices in R Packages
    Vidoni, Melina
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2021), 2021, : 1523 - 1534
  • [7] TYPE SUBSTITUTION IN COMPILED CODE
    ZIMMER, JA
    SOFTWARE-CONCEPTS AND TOOLS, 1995, 16 (01): : 20 - 30
  • [8] Fuzz testing for software assurance
    Vadim, Okun
    Fong, Elizabeth
    CrossTalk, 2015, 28 (02): : 35 - 37
  • [9] On the Effectiveness of Scheduling Fuzz Testing
    Chen, Wei-Jun
    Tyan, Hsiao-Rong
    Huang, Shih-Kun
    INTELLIGENT SYSTEMS AND APPLICATIONS (ICS 2014), 2015, 274 : 841 - 849
  • [10] Web Application Fuzz Testing
    Andrianto, Ivan
    Liem, M. M. Inggriani
    Asnar, Yudistira Dwi Wardhana
    PROCEEDINGS OF 2017 INTERNATIONAL CONFERENCE ON DATA AND SOFTWARE ENGINEERING (ICODSE), 2017,