SafeOSL: Ensuring memory safety of C via ownership-based intermediate language

被引:1
|
作者
Yin, Xiaohua [1 ]
Huang, Zhiqiu [1 ,2 ,3 ]
Kan, Shuanglong [1 ,4 ]
Shen, Guohua [1 ,2 ,3 ]
Chen, Zhe [1 ]
Liu, Yang [5 ]
Wang, Fei [6 ]
机构
[1] Nanjing Univ Aeronaut & Astronaut, Coll Comp Sci & Technol, Nanjing 211106, Peoples R China
[2] Collaborat Innovat Ctr Novel Software Technol & I, Nanjing, Peoples R China
[3] Minist Ind & Informat Technol, Key Lab Safety Crit Software, Nanjing, Peoples R China
[4] TU Kaiserslautern, Dept Comp Sci, Kaiserslautern, Germany
[5] Nanyang Technol Univ, Sch Comp Sci & Engn, Singapore, Singapore
[6] Suzhou Univ Sci & Technol, Sch Elect & Informat Engn, Suzhou, Peoples R China
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2022年 / 52卷 / 05期
基金
中国国家自然科学基金;
关键词
C; memory errors; memory safety; ownership system; Rust; RUNTIME VERIFICATION; SEMANTICS;
D O I
10.1002/spe.3057
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The unsafe features of C make it a big challenge to ensure memory safety of C programs, and often lead to memory errors that can result in vulnerabilities. Various formal verification techniques for ensuring memory safety of C have been proposed. However, most of them either have a high overhead, such as state explosion problem in model checking, or have false positives, such as abstract interpretation. In this article, by innovatively borrowing ownership system from Rust, we propose a novel and sound static memory safety analysis approach, named SafeOSL. Its basic idea is an ownership-based intermediate language, called ownership system language (OSL), which captures the features of the ownership system in Rust. Ownership system specifies the relations among variables and memory locations, and maintains invariants that can ensure memory safety. The semantics of OSL is formalized in K-framework, which is a rewriting-logic based tool. C programs to be checked are first transformed into OSL programs and then detected by OSL semantics. Experimental results have demonstrated that SafeOSL is effective in detecting memory errors of C. Moreover, the translations and experiments indicate that the intermediate language OSL could be reused by other programming languages to detect memory errors.
引用
收藏
页码:1114 / 1142
页数:29
相关论文
共 9 条
  • [1] MemSafe: ensuring the spatial and temporal memory safety of C?at runtime
    Simpson, Matthew S.
    Barua, Rajeev K.
    SOFTWARE-PRACTICE & EXPERIENCE, 2013, 43 (01): : 93 - 128
  • [2] MemSafe: Ensuring the Spatial and Temporal Memory Safety of C at Runtime
    Simpson, Matthew S.
    Barua, Rajeev K.
    2010 10TH IEEE INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION, 2010, : 199 - 208
  • [3] Static analysis of C programs via region-based memory model
    Dong, Yu-Kun
    Jin, Da-Hai
    Gong, Yun-Zhan
    Xing, Ying
    Ruan Jian Xue Bao/Journal of Software, 2014, 25 (02): : 357 - 372
  • [4] Boosting CO2 electroreduction towards C2+ products via CO* intermediate manipulation on copper-based catalysts
    Xiang, Kaisong
    Shen, Fenghua
    Fu, Yingxue
    Wu, Lin
    Wang, Zhujiang
    Yi, Huimin
    Liu, Xudong
    Wang, Pingshan
    Liu, Min
    Lin, Zhang
    Liu, Hui
    ENVIRONMENTAL SCIENCE-NANO, 2022, 9 (03) : 911 - 953
  • [5] Intermediate-based virtual screening of c-Kit kinase inhibitors as potential anti-tumor agents via ab inito folding, molecular dynamics simulation, and molecular docking
    Jin, Lu
    Qian, Chunguo
    Wei, Zhao
    Zhang, Dongxu
    Xi, Jiayue
    Sun, Dingkang
    Fu, Linke
    Liu, Xueying
    Zhang, Xinlei
    ARABIAN JOURNAL OF CHEMISTRY, 2024, 17 (10)
  • [6] Poly I:C-based rHBVvac therapeutic vaccine eliminates HBV via generation of HBV-specific CD8+ effector memory T cells
    Zhao, Hua-Jun
    Han, Qiu-Ju
    Wang, Guan
    Lin, Ang
    Xu, Dong-Qing
    Wang, Ya-Qun
    Zhao, Lian-Hui
    Tian, Zhi-Gang
    Zhang, Jian
    GUT, 2019, 68 (11) : 2032 - 2043
  • [7] Poly I:C-based rHBVvac therapeutic vaccine eliminates HBV via generation of HBV-specific CD8+ effector memory T cells
    Zhao, H.
    Zhang, J.
    EUROPEAN JOURNAL OF IMMUNOLOGY, 2019, 49 : 1676 - 1677
  • [8] Design and synthesis of bis-coumarinyl methanes from 4-hydroxy-coumarin and aldehydes catalysed by Amberlyst 15 via dual C–C coupling: introducing coumarin based thin film organic nano-materials for memory devices
    Abhijit Rudra Paul
    Surajit Sarkar
    Jewel Hossain
    Syed Arshad Hussain
    Swapan Majumdar
    Research on Chemical Intermediates, 2022, 48 : 4963 - 4985
  • [9] Design and synthesis of bis-coumarinyl methanes from 4-hydroxy-coumarin and aldehydes catalysed by Amberlyst 15 via dual C-C coupling: introducing coumarin based thin film organic nano-materials for memory devices
    Paul, Abhijit Rudra
    Sarkar, Surajit
    Hossain, Jewel
    Hussain, Syed Arshad
    Majumdar, Swapan
    RESEARCH ON CHEMICAL INTERMEDIATES, 2022, 48 (12) : 4963 - 4985