Goshawk: Hunting Memory Corruptions via Structure-Aware and Object-Centric Memory Operation Synopsis
Yunlong Lyu, Yi Fang, Yiwei Zhang, Qibin Sun, Siqi Ma, Elisa Bertino, Kangjie Lu, Juanru Li
摘要
Existing tools for the automated detection of memory corruption bugs are not very effective in practice. They typically recognize only standard memory management (MM) APIs (e.g., malloc and free) and assume a naive paired-use model—an allocator is followed by a specific deallocator. However, we observe that programmers very often design their own MM functions and that these functions often manifest two major characteristics: (1) Custom allocator functions perform multi-object or nested allocation which then requires structure-aware deallocation functions. (2) Custom allocators and deallocators follow an unpaired-use model. A more effective detection thus needs to adapt those characteristics and capture memory bugs related to non-standard MM behaviors. In this paper, we present a MM function aware memory bug detection technique by introducing the concept of structure-aware and object-centric Memory Operation Synopsis (MOS). A MOS abstractly describes the memory objects of a given MM function, how they are managed by the function, and their structural relations. By utilizing MOS, a bug detection could explore much less code but is still capable of handling multi-object or nested allocations and does not rely on the paired-use model. In addition, to extensively find MM functions and automatically generate MOS for them, we propose a new identification approach that combines natural language processing (NLP) and data flow analysis, which enables the efficient and comprehensive identification of MM functions, even in very large code bases. We implement a MOS-enhanced memory bug detection system, Goshawk, to discover memory bugs caused by complex and custom MM behaviors. We applied Goshawk to well-tested and widely-used open source projects including OS kernels, server applications, and IoT SDKs. Goshawk outperforms the state-of-the-art data flow analysis driven bug detection tools by an order of magnitude in analysis speed and the number of accurately identified MM functions, reports the discovered bugs with a developer-friendly, MOS based description, and successfully detects 92 new double-free and use-after-free bugs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
- One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery 引用了 Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention Inferences
- One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-Analysis 引用了 PeX: A Permission Check Analysis Framework for Linux Kernel
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-Analysis 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
- PeX: A Permission Check Analysis Framework for Linux Kernel 引用了 Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels
引用它的顶会 Paper13
- "Get in Researchers; We're Measuring Reproducibility": A Reproducibility Study of Machine Learning Papers in Tier 1 Security ConferencesDaniel Olszewski, Allison Lu, Carson Stillman, Kevin Warren 等CCS 2023 · 19 次引用
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-AnalysisDinghao Liu, Shouling Ji, Kangjie Lu, Qinming HeUSENIX Security 2024 · 13 次引用
- Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention InferencesDinghao Liu, Zhipeng Lu, Shouling Ji, Kangjie Lu 等USENIX Security 2024 · 6 次引用
- One Bug, Hundreds Behind: LLMs for Large-Scale Bug DiscoveryQiushi Wu, Yue Xiao, Dhilung Kirat, Kevin Eykholt 等ICML 2026 · 5 次引用
- Strengthening Supply Chain Security with Fine-grained Safe Patch IdentificationChanghua Luo, Wei Meng, Shuai WangICSE 2024 · 1 次引用
它引用的 Paper11
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid FuzzingInsu Yun, Sangho Lee, Meng Xu, Yeongjin Jang 等USENIX Security 2018 · 537 次引用
- Precise and Scalable Detection of Double-Fetch Bugs in OS KernelsMeng Xu, Chenxiong Qian, Kangjie Lu, Michael Backes 等S&P 2018 · 95 次引用
- PeX: A Permission Check Analysis Framework for Linux KernelTong Zhang, Wenbo Shen, Dongyoon Lee, Changhee Jung 等USENIX Security 2019 · 77 次引用
- K-Miner: Uncovering Memory Corruption in LinuxDavid Gens, Simon Schmitt, Lucas Davi, Ahmad-Reza SadeghiNDSS 2018 · 58 次引用
相关 Paper
- SAVER: scalable, precise, and safe memory-error repairSeongjoon Hong, Junhee Lee, Jeongsoo Lee, Hakjoo OhICSE 2020 · 28 次引用
- CMASan: Custom Memory Allocator-aware Address SanitizerJunwha Hong, Wonil Jang, Mijung Kim, Lei Yu 等S&P 2025
- Reorder Pointer Flow in Sound Concurrency Bug PredictionYuqi Guo, Shihao Zhu, Yan Cai, Liang He 等ICSE 2024 · 1 次引用
- Detecting API Post-Handling Bugs Using Code and Description in PatchesMiaoqian Lin, Kai Chen, Yang XiaoUSENIX Security 2023
- Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
