Lune

USENIX Security2024顶会

Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention Inferences

Dinghao Liu, Zhipeng Lu, Shouling Ji, Kangjie Lu, Jianhai Chen, Zhenguang Liu, Dexin Liu, Renyi Cai, Qinming He

摘要

Modern operating system kernels, typically written in lowlevel languages such as C and C++, are tasked with managing extensive memory resources. Memory-related errors, such as memory leak and memory corruption, are common occurrences and constantly introduced. Traditional detection methods often rely on taint analysis, which suffer from scalability issues (i.e., path explosion) when applied to complex OS kernels. Recent research has pivoted towards leveraging techniques like function pairing or similarity analysis to overcome this challenge. These approaches identify memory errors by referencing code that is either frequently used or semantically similar. However, these techniques have limitations when applied to customized code, which may lack a sufficient corpus of code snippets to facilitate effective function pairing or similarity analysis. This deficiency hinders their applicability in kernel analysis where unique or proprietary code is prevalent. In this paper, we propose a novel methodology for detecting memory bugs based on inconsistent memory management intentions (IMMI). Our insight is that many memory bugs, despite their varied manifestations, stem from a common underlying issue: the ambiguity in ownership and lifecycle management of memory objects, especially when these objects are passed across various functions. Memory bugs emerge when the memory management strategies of the caller and callee functions misalign for a given memory object. IMMI aims to model and clarify these inconsistent intentions, thereby mitigating the prevalence of such bugs. Our methodology offers two primary advantages over existing techniques: (1) It utilizes a fine-grained memory management model that obviates the need for extensive data-flow tracking, and (2) it does not rely on similarity analysis or the identification of function pairs, making it highly effective in the context of customized code. To enhance the capabilities of IMMI, we have integrated a large language model (LLM) to assist in the interpretation of implicit kernel resource management mechanisms. We have Shouling Ji and Qinming He are the co-corresponding authors. implemented IMMI and evaluated it against the Linux kernel. IMMI effectively found 80 new memory bugs (including 23 memory corruptions and 57 memory leaks) with 35% false discovery rate. Most of them are missed by the state-of-the-art memory bug detection tools.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

免费注册,获取答案

无需绑卡

脉络

  • Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 APISan: Sanitizing API Usages through Semantic Cross-Checking
  • Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
  • One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery 引用了 FUZE: Towards Facilitating Exploit Generation for Kernel Use-After-Free Vulnerabilities
  • One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery 引用了 APISan: Sanitizing API Usages through Semantic Cross-Checking
  • One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery 引用了 Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
  • Death by a Thousand Drips: Uncovering Critical Resource Leaks in the Windows Ecosystem 引用了 APISan: Sanitizing API Usages through Semantic Cross-Checking
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. One Bug, Hundreds Behind: LLMs for Large-Scale Bug DiscoveryQiushi Wu, Yue Xiao, Dhilung Kirat, Kevin Eykholt 等ICML 2026 · 5 次引用
  2. SYSYPHUZZ: the Pressure of More CoverageZezhong Ren, Han Zheng, Zhiyao Feng, Qinying Wang 等NDSS 2026 · 1 次引用
  3. Death by a Thousand Drips: Uncovering Critical Resource Leaks in the Windows EcosystemFeng Dong, Jianting Gao, Yunpeng Tian, Weifeng Yuan 等USENIX Security 2026
  4. Feature Slice Matching for Precise Bug DetectionKe Ma, Jianjun Huang, Wei You, Bin Liang 等FSE 2026
  5. The Digital Cybersecurity Expert: How Far Have We Come?Dawei Wang, Geng Zhou, Xianglong Li, Yu Bai 等S&P 2025

它引用的 Paper被引最多的 5 篇,共 20 篇

  1. Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 次引用
  2. GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program AnalysisYuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu 等ICSE 2024 · 131 次引用
  3. FUZE: Towards Facilitating Exploit Generation for Kernel Use-After-Free VulnerabilitiesWei Wu, Yueqi Chen, Jun Xu, Xinyu Xing 等USENIX Security 2018 · 124 次引用
  4. APISan: Sanitizing API Usages through Semantic Cross-CheckingInsu Yun, Changwoo Min, Xujie Si, Yeongjin Jang 等USENIX Security 2016 · 107 次引用
  5. Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 次引用

相关 Paper

  1. MLEE: Effective Detection of Memory Leaks on Early-Exit Paths in OS KernelsWenwen WangUSENIX ATC 2021 · 15 次引用
  2. Goshawk: Hunting Memory Corruptions via Structure-Aware and Object-Centric Memory Operation SynopsisYunlong Lyu, Yi Fang, Yiwei Zhang, Qibin Sun 等S&P 2022 · 26 次引用
  3. K-Miner: Uncovering Memory Corruption in LinuxDavid Gens, Simon Schmitt, Lucas Davi, Ahmad-Reza SadeghiNDSS 2018 · 58 次引用
  4. Non-Distinguishable Inconsistencies as a Deterministic Oracle for Detecting Security BugsQingyang Zhou, Qiushi Wu, Dinghao Liu, Shouling Ji 等CCS 2022 · 2 次引用
  5. OZZ: Identifying Kernel Out-of-Order Concurrency Bugs with In-Vivo Memory Access ReorderingDae R. Jeong, Yewon Choi, Byoungyoung Lee, Insik Shin 等SOSP 2024 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖