信息网络安全 ›› 2015, Vol. 15 ›› Issue (6): 47-54.doi: 10.3969/j.issn.1671-1122.2015.06.008

• 技术研究 • 上一篇    下一篇

软件安全中基于判断逻辑的空指针引用故障检测

王锐强, 金大海()   

  1. 北京邮电大学网络技术研究院,北京100876
  • 收稿日期:2015-03-02 出版日期:2015-06-20 发布日期:2018-07-16
  • 作者简介:

    作者简介: 王锐强(1987-),男,陕西,硕士研究生,主要研究方向:计算机科学、软件测试;金大海(1974-)男,辽宁,副教授,博士,主要研究方向:软件测试。

  • 基金资助:
    国家自然科学基金[91318301]

Null Pointer Dereference Detect Based on Judgment Logical in Software Security

Rui-qiang WANG, Da-hai JIN()   

  1. Institute of Network Technology, Beijing University of Posts and Telecommunications, Beijing 100876, China
  • Received:2015-03-02 Online:2015-06-20 Published:2018-07-16

摘要:

空指针引用故障导致的软件安全问题不断出现,给各个方面带来了极大困扰和损失。文章研究利用静态测试的方法对一类空指针引用故障进行静态检测分析,同时提出一种利用判断逻辑信息进行空指针引用检测的方法。文章首先给出与基于判断逻辑的空指针引用故障相关的一些定义和故障分类。接着,提出使用函数摘要技术提取间接判空点和间接解引用点,定义该函数摘要为函数特征信息和后置约束信息的集合,研究了判断逻辑函数摘要生成和传递的方法。最后,利用有限状态机建立基于判断逻辑的空指针引用故障模型,给出故障模型描述,并利用状态机状态转换和函数摘要完成对此类空指针引用故障的检测。在静态检测工具DTS中实现了文中的方法并且对6个开源Java工程进行了测试,测试结果表明文中方法可以检测出更多的BUG并且同样适用于检测大型软件系统。

关键词: 软件安全, 静态缺陷检测, 空指针引用, 判空信息, 函数摘要

Abstract:

Software security problems caused by null pointer dereference continue to emerge and bring great distress and loss to all aspects. In this paper, we apply static testing method to analyze and detect a kind of null pointer dereference. This paper present a method to detect null pointer dereference using judgment logical information. First, give some definitions and fault classifications about based on logic judgment to detect null pointer dereference fault (BLJDNPDF). Then, using method summary technology to extract indirect null judgment point and indirect pointer dereference point, define method summary’s contents, which contain method feature and post condition, do research on how to generate and transform method summary. Finally, using finite state machine to build model of BLJDNPDF, describe fault model description, and use state machine’s state change and method summary to complete BLJDNPDF detection.

Key words: software security, static analysis, null pointer dereference, null check, method summary

中图分类号: