{"title":"A Static CFG Extraction Scheme for RISC-V Runtime CFI","authors":"Wenxin Li, Weike Wang, Senyang Li, Zhenliang An","doi":"10.1109/ISSSR58837.2023.00073","DOIUrl":null,"url":null,"abstract":"The Control Flow Graph represents all possible paths a program may take during execution. Control Flow Integrity is a critical concern in embedded system security, and the CFG can be integrated with hardware circuit design to validate CFI. In this paper, we present a static CFG extraction scheme for RISC-V program based on the executable files. During the construction of CFGs, information such as instructions in each basic blocks, basic block length, transfer instructions of basic blocks, and transfer targets can be extracted. Additionally, data such as hash values for basic blocks can be calculated. Those metadata elements are sensitive information for the subsequent runtime CFI check. We use this extraction scheme to perform static analysis on several benchmark programs, and experimental results demonstrate that this scheme can generate correct CFGs and key sensitive information for runtime CFI verification.","PeriodicalId":185173,"journal":{"name":"2023 9th International Symposium on System Security, Safety, and Reliability (ISSSR)","volume":"37 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 9th International Symposium on System Security, Safety, and Reliability (ISSSR)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISSSR58837.2023.00073","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The Control Flow Graph represents all possible paths a program may take during execution. Control Flow Integrity is a critical concern in embedded system security, and the CFG can be integrated with hardware circuit design to validate CFI. In this paper, we present a static CFG extraction scheme for RISC-V program based on the executable files. During the construction of CFGs, information such as instructions in each basic blocks, basic block length, transfer instructions of basic blocks, and transfer targets can be extracted. Additionally, data such as hash values for basic blocks can be calculated. Those metadata elements are sensitive information for the subsequent runtime CFI check. We use this extraction scheme to perform static analysis on several benchmark programs, and experimental results demonstrate that this scheme can generate correct CFGs and key sensitive information for runtime CFI verification.