Netinfo Security ›› 2022, Vol. 22 ›› Issue (8): 1-7.doi: 10.3969/j.issn.1671-1122.2022.08.001

Previous Articles     Next Articles

Reentrancy Vulnerability Detection in Smart Contracts Based on Local Graph Matching

ZHANG Yujian1,2(), LIU Daifu1, TONG Fei1,2   

  1. 1. School of Cyber Science and Engineering, Southeast University, Nanjing 211189, China
    2. Jiangsu Province Engineering Research Center of Security for Ubiquitous Network, Nanjing 211189, China
  • Received:2022-04-11 Online:2022-08-10 Published:2022-09-15
  • Contact: ZHANG Yujian E-mail:yjzhang@seu.edu.cn

Abstract:

Aiming at the reentrancy vulnerability detection in smart contracts, this paper presents a code vulnerability detection method based on graph matching neural network, which realizes a function-level code vulnerability detection. Firstly, the smart contract source code is compiled into abstract syntax tree(AST), which is pruned according to the characteristics of reentrance vulnerabilities. Then, the control flow graph and data flow graph containing richer structural information are extracted from the abstract syntax tree, and then the local abstract semantic graph(ASG) data containing syntax and semantic information is generated. Furthermore, the graph matching neural network is used to train and test the local graph. Finally, an open-source vulnerability sample data set is used to evaluate the proposed method. Experimental results show that the proposed method effectively improves the ability of detecting reentrancy vulnerability.

Key words: smart contract, graph matching neural network, reentrancy vulnerability, abstract semantic graph

CLC Number: