{"title":"Design and Implementation of OOM Module based on Rust","authors":"Linhan Li, Qianying Zhang, Shijun Zhao, Zhiping Shi, Yong Guan","doi":"10.1109/QRS-C57518.2022.00129","DOIUrl":null,"url":null,"abstract":"The Linux kernel plays an important role in various application scenarios such as computers, mobile devices, and vehicles, in which security-sensitive information is stored. Undefined behavior in the C programming language is usually the cause of Linux kernel vulnerabilities, among which memory safety vulnerabilities are the most threatening. At present, the methods based on static/dynamic analysis and runtime software and hardware defense to ensure memory safety have the problems of poor performance, false positives, and poor compatibility. This paper presents the design and implementation of the OOM (out of memory) module based on the safe programming language Rust. We leverage the Rust FFI mechanism to design a foreign interface layer and a safe foreign interface layer to enable the reconstructed OOM module to invoke other Linux functionalities, and then use Rust to reconstruct the OOM module. The safety features of Rust language are used to avoid undefined behaviors, so as to improve the safety of the kernel. Finally, we export the C interface of the module to enable the invocation by the Linux kernel. Tests show that the OOM module performance and memory consumption after reconstruction are comparable to the original module.","PeriodicalId":183728,"journal":{"name":"2022 IEEE 22nd International Conference on Software Quality, Reliability, and Security Companion (QRS-C)","volume":"9 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE 22nd International Conference on Software Quality, Reliability, and Security Companion (QRS-C)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/QRS-C57518.2022.00129","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
The Linux kernel plays an important role in various application scenarios such as computers, mobile devices, and vehicles, in which security-sensitive information is stored. Undefined behavior in the C programming language is usually the cause of Linux kernel vulnerabilities, among which memory safety vulnerabilities are the most threatening. At present, the methods based on static/dynamic analysis and runtime software and hardware defense to ensure memory safety have the problems of poor performance, false positives, and poor compatibility. This paper presents the design and implementation of the OOM (out of memory) module based on the safe programming language Rust. We leverage the Rust FFI mechanism to design a foreign interface layer and a safe foreign interface layer to enable the reconstructed OOM module to invoke other Linux functionalities, and then use Rust to reconstruct the OOM module. The safety features of Rust language are used to avoid undefined behaviors, so as to improve the safety of the kernel. Finally, we export the C interface of the module to enable the invocation by the Linux kernel. Tests show that the OOM module performance and memory consumption after reconstruction are comparable to the original module.