Syntax-Aware Mutation for Testing the Solidity Compiler

被引:0
|
作者
Mitropoulos, Charalambos [1 ]
Sotiropoulos, Thodoris [2 ]
Ioannidis, Sotiris [1 ]
Mitropoulos, Dimitris [3 ]
机构
[1] Tech Univ Crete, Khania, Greece
[2] Swiss Fed Inst Technol, Zurich, Switzerland
[3] Univ Athens, Athens, Greece
来源
关键词
Fuzzing; compilers; smart contracts; Solidity;
D O I
10.1007/978-3-031-51479-1_17
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
We introduce fuzzol, the first syntax-aware mutation fuzzer for systematically testing the security and reliability of solc, the standard Solidity compiler. fuzzol addresses a challenge of existing fuzzers when dealing with structured inputs: the generation of inputs that get past the parser checks of the system under test. To do so, fuzzol introduces a novel syntax- aware mutation that breaks into three strategies, each of them making different kind of changes in the inputs. Contrary to existing mutations, our mutation is able to change constructs, statements, and entire pieces of code, in a fine-grained manner that conforms to the syntactic rules of the Solidity grammar. Moreover, to explore new paths in the compiler's codebase faster, we introduce a mutation strategy prioritization algorithm that allows fuzzol to identify and apply only those mutation strategies that are most effective in exercising new interesting paths. To evaluate fuzzol, we test 33 of the latest solc stable releases, and compare fuzzol with (1) Superion, a grammar-aware fuzzer, (2) AFL-compiler-fuzzer, a text-mutation fuzzer and (3) two grammarblind fuzzers with advanced test input generation schedules: AFLFast and MOpt-AFL. fuzzol identified 19 bugs in total (7 of which were previously unknown to Solidity developers), while the other fuzzers missed half of these bugs. Also, fuzzol outperforms all fuzzers in terms of line, function, and branch coverage (from 3.75% to 408.8% improvement), while it is the most effective one when it comes to test input generation. Finally, our experiments indicate that our prioritization algorithm makes fuzzol explore new paths roughly one day (similar to 24 h) faster.
引用
收藏
页码:327 / 347
页数:21
相关论文
共 50 条
  • [1] Differential testing solidity compiler through deep contract manipulation and mutation
    Tian, Zhenzhou
    Wang, Fanfan
    Chen, Yanping
    Chen, Lingwei
    [J]. SOFTWARE QUALITY JOURNAL, 2024, 32 (02) : 765 - 790
  • [2] A Syntax-Aware Encoder for Authorship Attribution
    Liu, Jianbo
    Hu, Zhiqiang
    Zhang, Jiasheng
    Lee, Roy Ka-Wei
    Shao, Jie
    [J]. WEB INFORMATION SYSTEMS ENGINEERING - WISE 2021, PT I, 2021, 13080 : 403 - 411
  • [3] Towards syntax-aware token embeddings
    Popa, Diana Nicoleta
    Perez, Julien
    Henderson, James
    Gaussier, Eric
    [J]. NATURAL LANGUAGE ENGINEERING, 2021, 27 (06) : 691 - 720
  • [4] Syntax-Aware Representation for Aspect Term Extraction
    Zhang, Jingyuan
    Xu, Guangluan
    Wang, Xinyi
    Sun, Xian
    Huang, Tinglei
    [J]. ADVANCES IN KNOWLEDGE DISCOVERY AND DATA MINING, PAKDD 2019, PT I, 2019, 11439 : 123 - 134
  • [5] SADT: Syntax-Aware Differential Testing of Certificate Validation in SSL/TLS Implementations
    Quan, Lili
    Guo, Qianyu
    Chen, Hongxu
    Xie, Xiaofei
    Li, Xiaohong
    Liu, Yang
    Hu, Jing
    [J]. 2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 524 - 535
  • [6] Syntax-aware Multilingual Semantic Role Labeling
    He, Shexia
    Li, Zuchao
    Zhao, Hai
    [J]. 2019 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING AND THE 9TH INTERNATIONAL JOINT CONFERENCE ON NATURAL LANGUAGE PROCESSING (EMNLP-IJCNLP 2019): PROCEEDINGS OF THE CONFERENCE, 2019, : 5350 - 5359
  • [7] Towards Syntax-Aware Editors for Visual Languages
    Costagliola, Gennaro
    Deufemia, Vincenzo
    Polese, Giuseppe
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 127 (04) : 107 - 125
  • [8] Syntax-Aware Neural Semantic Role Labeling
    Xia, Qingrong
    Li, Zhenghua
    Zhang, Min
    Zhang, Meishan
    Fu, Guohong
    Wang, Rui
    Si, Luo
    [J]. THIRTY-THIRD AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE / THIRTY-FIRST INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE CONFERENCE / NINTH AAAI SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2019, : 7305 - 7313
  • [9] Syntax-aware on-the-fly code completion
    Takerngsaksiri, Wannita
    Tantithamthavorn, Chakkrit
    Li, Yuan-Fang
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 165
  • [10] Building syntax-aware editors for visual languages
    Costagliola, G
    Deufemia, V
    Polese, G
    Risi, M
    [J]. JOURNAL OF VISUAL LANGUAGES AND COMPUTING, 2005, 16 (06): : 508 - 540