USENIX Security2024Top-tier venue
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
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6adab397-e0d9-443c-ad97-dd2b83ab8633Cited by top-tier papers5
- One Bug, Hundreds Behind: LLMs for Large-Scale Bug DiscoveryQiushi Wu, Yue Xiao, Dhilung Kirat, Kevin Eykholt et al.ICML 2026 · 5 citations
- SYSYPHUZZ: the Pressure of More CoverageZezhong Ren, Han Zheng, Zhiyao Feng, Qinying Wang et al.NDSS 2026 · 1 citation
- Death by a Thousand Drips: Uncovering Critical Resource Leaks in the Windows EcosystemFeng Dong, Jianting Gao, Yunpeng Tian, Weifeng Yuan et al.USENIX Security 2026
- Feature Slice Matching for Precise Bug DetectionKe Ma, Jianjun Huang, Wei You, Bin Liang et al.FSE 2026
- The Digital Cybersecurity Expert: How Far Have We Come?Dawei Wang, Geng Zhou, Xianglong Li, Yu Bai et al.S&P 2025
Builds on20
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 citations
- GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program AnalysisYuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu et al.ICSE 2024 · 131 citations
- FUZE: Towards Facilitating Exploit Generation for Kernel Use-After-Free VulnerabilitiesWei Wu, Yueqi Chen, Jun Xu, Xinyu Xing et al.USENIX Security 2018 · 124 citations
- APISan: Sanitizing API Usages through Semantic Cross-CheckingInsu Yun, Changwoo Min, Xujie Si, Yeongjin Jang et al.USENIX Security 2016 · 107 citations
- Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
Related papers
- MLEE: Effective Detection of Memory Leaks on Early-Exit Paths in OS KernelsWenwen WangUSENIX ATC 2021 · 15 citations
- Goshawk: Hunting Memory Corruptions via Structure-Aware and Object-Centric Memory Operation SynopsisYunlong Lyu, Yi Fang, Yiwei Zhang, Qibin Sun et al.S&P 2022 · 26 citations
- K-Miner: Uncovering Memory Corruption in LinuxDavid Gens, Simon Schmitt, Lucas Davi, Ahmad-Reza SadeghiNDSS 2018 · 58 citations
- Non-Distinguishable Inconsistencies as a Deterministic Oracle for Detecting Security BugsQingyang Zhou, Qiushi Wu, Dinghao Liu, Shouling Ji et al.CCS 2022 · 2 citations
- OZZ: Identifying Kernel Out-of-Order Concurrency Bugs with In-Vivo Memory Access ReorderingDae R. Jeong, Yewon Choi, Byoungyoung Lee, Insik Shin et al.SOSP 2024 · 4 citations
