RTDMiner: 基于数据挖掘的引用计数更新缺陷检测方法
作者:
作者单位:

作者简介:

边攀(1987-),男,博士,CCF专业会员,主要研究领域为软件缺陷检测,缺陷自动修复;梁彬(1973-),男,博士,教授,博士生导师,CCF专业会员,主要研究领域为信息安全,软件分析;黄建军(1986-),男,博士,讲师,CCF专业会员,主要研究领域为软件安全分析,移动应用安全;游伟(1988-),男,博士,副教授,CCF专业会员,主要研究领域为安全漏洞挖掘,恶意程序分析,移动安全,Web安全;石文昌(1964-),男,博士,教授,博士生导师,CCF杰出会员,主要研究领域为网络空间系统安全,网络空间安全治理,网络空间安全科学;张健(1969-),男,博士,研究员,博士生导师,CCF会士,主要研究领域为自动推理与约束求解,软件测试及分析.

通讯作者:

梁彬,E-mail:liangb@ruc.edu.cn

中图分类号:

TP311

基金项目:

国家自然科学基金(U1836209,62132020,61802413,62002361)


RTDMiner: Detecting Reference Count Update Bugs Based on Data Mining
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    在Linux内核等大型底层系统中广泛采用引用计数来管理共享资源. 引用计数需要与引用资源的对象个数保持一致, 否则可能导致不恰当引用计数更新缺陷, 使得资源永远无法释放或者被提前释放. 为检测不恰当引用计数更新缺陷, 现有静态检测方法通常需要知道哪些函数增加引用计数, 哪些函数减少引用计数. 而手动获取这些关于引用计数的先验知识过于费时且可能有遗漏. 基于挖掘的缺陷检测方法虽然可以减少对先验知识的依赖, 但难以有效检测像不恰当引用计数更新缺陷这类路径敏感的缺陷. 为此, 提出一个将数据挖掘技术和静态分析技术深度融合的不恰当引用计数更新缺陷检测方法RTDMiner. 首先, 根据引用计数的通用规律, 利用数据挖掘技术从大规模代码中自动识别增加或减少引用计数的函数. 然后, 采用路径敏感的静态分析方法检测增加了引用计数但没有减少引用计数的缺陷路径. 为了降低误报, 在检测阶段再次利用数据挖掘技术来识别例外模式. 在Linux内核上的实验结果表明, 所提方法能够以将近90%的准确率自动识别增加或减少引用计数的函数. 而且RTDMiner检测到的排行靠前的50个疑似缺陷中已经有24个被内核维护人员确认为真实缺陷.

    Abstract:

    Reference counts are widely employed in large-scale low-level systems including Linux kernel to manage shared resources, and should be consistent with the number of objects referring to resources. Otherwise, bugs of improper update of reference counts may be caused, and resources can never be released or will be released earlier. To detect improper updates of reference counts, available static detection methods have to know the functions which increase reference counts or decrease the counts. However, manually collecting prior knowledge of reference counts is too time-consuming and may be incomplete. Though mining-based methods can reduce the dependency on prior knowledge, it is difficult to effectively detect path-sensitive bugs containing improper updates of reference counts. To this end, this study proposes a method RTDMiner that deeply integrates data mining into static analysis to detect improper updates of reference counts. First, according to the general principles of reference counts, the data mining technique is leveraged to identify functions that raise or reduce reference counts. Then, a path-sensitive static analysis method is employed to detect defective paths that increase reference counts instead of decreasing the counts. To reduce false positives, the study adopts the data mining technique to identify exceptional patterns during detection. The experiment results on the Linux kernel demonstrate that the proposed method can automatically identify functions increasing or decreasing reference counts with the precision of nearly 90%. Moreover, 24 out of the top 50 suspicious bugs detected by RTDMiner have been confirmed to be real bugs by kernel maintainers.

    参考文献
    相似文献
    引证文献
引用本文

边攀,梁彬,黄建军,游伟,石文昌,张健. RTDMiner: 基于数据挖掘的引用计数更新缺陷检测方法.软件学报,2023,34(10):4724-4742

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2021-06-11
  • 最后修改日期:2021-12-18
  • 录用日期:
  • 在线发布日期: 2023-04-04
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号