首页> 外文会议>IEEE International Symposium on Software Reliability Engineering Workshops >Detecting Struct Member-Related Memory Leaks Using Error Code Analysis in Linux Kernel
【24h】

Detecting Struct Member-Related Memory Leaks Using Error Code Analysis in Linux Kernel

机译:使用Linux内核中的错误代码分析检测结构与成员相关的内存泄漏

获取原文

摘要

Struct member-related memory leak can become a serious problem. Linux kernel is not an exception. According to our study of Linux Kernel patches, 54.6% of all memory leak-related patches within the last two years were related to the leak of struct members. This occurs when a struct is freed before freeing its dynamically allocated struct members. Detecting these bugs in large-scale software requires to reduce analysis cost for scalability and effectively collect the state of a struct and its members.In this paper, we present a simple static-analysis approach to detect struct member-related memory leak in the Linux Kernel. Our analysis first collects alloc/free information by conducting a path-insensitive analysis. To efficiently conduct inter-procedural analysis, we introduce error-code analysis, which is an optimization to efficiently pass back the alloc/free information by focusing on the return value of callee and its use in the caller. When detecting a struct free, we scan through the collected information to detect any member that remains unfreed, and generate warnings to them. We evaluated our method by analyzing the Linux Kernel 5.3-rc4, and found two new bugs. Both of the bugs were reviewed and confirmed by Linux Kernel developers.
机译:结构成员相关的内存泄漏可能成为一个严重的问题。 Linux内核也不例外。根据我们的Linux内核补丁的研究,在过去两年内的所有内存泄漏相关的修补程序的54.6%与结构成员的泄漏。这当结构正在释放其动态分配结构成员之前释放发生。在大型软件检测这些缺陷,需要减少对可扩展性的分析成本和有效地收集一个结构的状态及其members.In本文中,我们提出了一个简单的静态分析方法来检测在Linux结构体成员相关的内存泄漏核心。我们的分析首先收集分配/免费通过进行路径不敏感的分析信息。为了有效地进行,程序间的分析中,我们引入错误代码分析,这是一个优化的重点被叫的返回值及其在呼叫者使用效率,传回分配/免费信息。当检测一个结构自由的,我们通过所收集的信息进行扫描,以检测剩余unfreed任何成员,并且生成警告他们。我们通过分析Linux内核5.3 RC4评估我们的方法,并发现了两个新的bug。这两个错误的进行了审查,并通过Linux内核开发人员的证实。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号