检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:万明 刘嘉华 鄂龙慧 朱江 Wan Ming;Liu Jiahua;E Longhui;Zhu Jiang(NARI Information&Communication Technology Co.,Ltd.,Nanjing 210003,Jiangsu,China)
机构地区:[1]南京南瑞信息通信科技有限公司,江苏南京210003
出 处:《计算机应用与软件》2022年第4期21-26,45,共7页Computer Applications and Software
基 金:国家电网公司科技项目“开源软件安全监测关键技术研究与应用”(科计[2018]20号项目240号)。
摘 要:带有系统底层特性的高级语言(C、C++等)通常采用的是弱类型系统,允许不同类型变量之间的混合运算。因此,在涉及到赋值等操作时,如果源变量和目的变量类型不一致,则需要进行类型转换,而转换过程稍有疏忽就会引入安全性问题。现有的检测技术大多在程序运行时进行类型转换问题的检测,产生较大额外开销的同时,也会影响程序的执行速度。基于LLVM编译器提出一种针对C/C++隐式类型转换的安全性检测方法。该方法作用于LLVM中间代码,筛选出含有变量声明和引用的语句;对于声明变量的语句,提取其类型信息并按相应的数据结构存储;对于引用变量的语句,匹配定义的类型转换的不安全操作集和转换模式,以检测其中的类型转换操作是否安全。实验结果表明,该方法能够在编译阶段有效地检测出存在安全隐患的类型转换操作。High-level languages with the underlying features of the system(C, C++, etc.) usually use a weakly typed system and allow mixed operations between different types of variables. Therefore, when an operation such as assignment is involved, if the source variable and the destination variable type are inconsistent, type conversion is required, and security problem will be introduced if the conversion process is slightly neglected. Most of the existing detection technologies detect the type conversion problem when the program is running, which causes a large additional overhead and also affects the execution speed of the program. This paper proposes a security detection method for C/C++ implicit type conversion based on LLVM compiler. It acted on the LLVM intermediate code to filter out statements containing variable declarations and references. For statements that declare variables, the type information was extracted and stored according to the corresponding data structure. For statements that use variables, the unsafe operation set and conversion mode were checked to detect whether the type conversion operation is safe. The experimental results show that the proposed method can effectively detect type conversion operations with security risks during the compilation phase.
分 类 号:TP305[自动化与计算机技术—计算机系统结构]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.145.83.240