{"title":"基于语义增强SAT评估的智能合约重入漏洞检测","authors":"Long He;Xiangfu Zhao;Yichen Wang","doi":"10.1109/TR.2024.3488814","DOIUrl":null,"url":null,"abstract":"Reentrancy, a specific vulnerability in smart contracts, frequently leads to security incidents. However, existing detection tools encounter challenges related to low precision, limited mainly by eight typical false positive (FP) types. To address these challenges, we proposed enriching the control flow to construct a constraint reentrancy control flow graph (CRCFG) at the source code level. The CRCFG includes specific control flows interacting with attackers and corresponding constraint relationships. This enhancement facilitates modeling of the reentrancy process and leverages Boolean satisfiability (SAT) solvers for vulnerability detection, thereby enhancing the precision of the detection. Specifically, first, we present the concepts of five different kinds of basic blocks to build a CRCFG. Then, we encode the CRCFG by converting it into a conjunctive normal form file. Finally, we call a SAT solver to examine all scenarios in the CRCFG and determine the presence of reentrancy vulnerabilities. Based on the above-mentioned steps, we developed a tool, ReenSAT, to detect reentrancy vulnerabilities. We conducted experiments on a verified real-world dataset. Experimental results show that ReenSAT outperforms state-of-the-art tools by an impressive <bold>34.72%</b> in precision, while effectively addressing eight typical types of false positives within these tools. In addition, when processing complex large contract datasets, ReenSAT's vulnerability detection efficiency outperforms that of most state-of-the-art tools.","PeriodicalId":56305,"journal":{"name":"IEEE Transactions on Reliability","volume":"74 2","pages":"2708-2722"},"PeriodicalIF":5.7000,"publicationDate":"2024-11-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"ReenSAT: Reentrancy Vulnerability Detection in Smart Contracts Using Semantic-Enhanced SAT Evaluation\",\"authors\":\"Long He;Xiangfu Zhao;Yichen Wang\",\"doi\":\"10.1109/TR.2024.3488814\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Reentrancy, a specific vulnerability in smart contracts, frequently leads to security incidents. However, existing detection tools encounter challenges related to low precision, limited mainly by eight typical false positive (FP) types. To address these challenges, we proposed enriching the control flow to construct a constraint reentrancy control flow graph (CRCFG) at the source code level. The CRCFG includes specific control flows interacting with attackers and corresponding constraint relationships. This enhancement facilitates modeling of the reentrancy process and leverages Boolean satisfiability (SAT) solvers for vulnerability detection, thereby enhancing the precision of the detection. Specifically, first, we present the concepts of five different kinds of basic blocks to build a CRCFG. Then, we encode the CRCFG by converting it into a conjunctive normal form file. Finally, we call a SAT solver to examine all scenarios in the CRCFG and determine the presence of reentrancy vulnerabilities. Based on the above-mentioned steps, we developed a tool, ReenSAT, to detect reentrancy vulnerabilities. We conducted experiments on a verified real-world dataset. Experimental results show that ReenSAT outperforms state-of-the-art tools by an impressive <bold>34.72%</b> in precision, while effectively addressing eight typical types of false positives within these tools. In addition, when processing complex large contract datasets, ReenSAT's vulnerability detection efficiency outperforms that of most state-of-the-art tools.\",\"PeriodicalId\":56305,\"journal\":{\"name\":\"IEEE Transactions on Reliability\",\"volume\":\"74 2\",\"pages\":\"2708-2722\"},\"PeriodicalIF\":5.7000,\"publicationDate\":\"2024-11-13\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IEEE Transactions on Reliability\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://ieeexplore.ieee.org/document/10752786/\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Reliability","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/10752786/","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE","Score":null,"Total":0}
ReenSAT: Reentrancy Vulnerability Detection in Smart Contracts Using Semantic-Enhanced SAT Evaluation
Reentrancy, a specific vulnerability in smart contracts, frequently leads to security incidents. However, existing detection tools encounter challenges related to low precision, limited mainly by eight typical false positive (FP) types. To address these challenges, we proposed enriching the control flow to construct a constraint reentrancy control flow graph (CRCFG) at the source code level. The CRCFG includes specific control flows interacting with attackers and corresponding constraint relationships. This enhancement facilitates modeling of the reentrancy process and leverages Boolean satisfiability (SAT) solvers for vulnerability detection, thereby enhancing the precision of the detection. Specifically, first, we present the concepts of five different kinds of basic blocks to build a CRCFG. Then, we encode the CRCFG by converting it into a conjunctive normal form file. Finally, we call a SAT solver to examine all scenarios in the CRCFG and determine the presence of reentrancy vulnerabilities. Based on the above-mentioned steps, we developed a tool, ReenSAT, to detect reentrancy vulnerabilities. We conducted experiments on a verified real-world dataset. Experimental results show that ReenSAT outperforms state-of-the-art tools by an impressive 34.72% in precision, while effectively addressing eight typical types of false positives within these tools. In addition, when processing complex large contract datasets, ReenSAT's vulnerability detection efficiency outperforms that of most state-of-the-art tools.
期刊介绍:
IEEE Transactions on Reliability is a refereed journal for the reliability and allied disciplines including, but not limited to, maintainability, physics of failure, life testing, prognostics, design and manufacture for reliability, reliability for systems of systems, network availability, mission success, warranty, safety, and various measures of effectiveness. Topics eligible for publication range from hardware to software, from materials to systems, from consumer and industrial devices to manufacturing plants, from individual items to networks, from techniques for making things better to ways of predicting and measuring behavior in the field. As an engineering subject that supports new and existing technologies, we constantly expand into new areas of the assurance sciences.